ace_optimizer
ace_optimizer
¶
ACE agent optimizer — context evolution via the ACE Generator / Reflector / Curator triad.
ACE (ace-agent/ace <https://github.com/ace-agent/ace>_) optimizes
agent context — an annotated natural-language playbook of strategies
the agent reads at inference time — rather than mutating prompts (DSPy)
or evolving prompt populations (GEPA). The output is a textual
playbook with entries like::
[str-00001] helpful=5 harmful=0 :: When the user asks for a unit
conversion, prefer the exact
rational form before rounding.
The wrapper adapts OpenJarvis traces into ACE's
train_samples / val_samples / test_samples shape, builds a
minimal DataProcessor from the trace feedback signal, runs ACE in
offline mode, and writes the resulting final_playbook.txt as a
sidecar overlay under ~/.openjarvis/learning/ace/<task>/ for the
agent runtime to pick up on next start.
ACE is not on PyPI as of v1.0.1. The learning-ace extra installs
from the upstream git repo; if the import fails we surface a
status="error" with the install hint.
Classes¶
ACEAgentOptimizer
¶
ACEAgentOptimizer(config: ACEOptimizerConfig)
Optimize an agent's playbook context using ACE.
| PARAMETER | DESCRIPTION |
|---|---|
config
|
:class:
TYPE:
|
Source code in src/openjarvis/learning/agents/ace_optimizer.py
Functions¶
optimize
¶
Run ACE offline-mode optimization on traces from the store.
Returns a status dict mirroring DSPy / GEPA shape:
{"status": "completed" | "skipped" | "error", ...}.
Source code in src/openjarvis/learning/agents/ace_optimizer.py
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | |