Agents#
The specialist agents the strategizer delegates to.
adda.StrategizerAgent
#
Default orchestrator agent for f3dasm agentic runs.
Source code in src/adda/_src/agents/strategizer.py
460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 | |
custom_tools: dict = {}
class-attribute
instance-attribute
#
model: str | None = None
class-attribute
instance-attribute
#
backend: str | None = None
class-attribute
instance-attribute
#
base_url: str | None = None
class-attribute
instance-attribute
#
base_prompt: str | None = None
class-attribute
instance-attribute
#
mcp_servers: dict = {}
class-attribute
instance-attribute
#
extra_allowed_tools: frozenset[str] = frozenset()
class-attribute
instance-attribute
#
max_history_pairs: int = 5
class-attribute
instance-attribute
#
derivation: bool = False
class-attribute
instance-attribute
#
ledgered_evaluations: bool = False
class-attribute
instance-attribute
#
subscribes: dict = {}
class-attribute
instance-attribute
#
report_sections: tuple[str, ...] = ('### Actions taken', '### Conclusions', '### Numbers')
class-attribute
instance-attribute
#
system_prompt = STRATEGIZER_SYSTEM_PROMPT + deliverable_includes('deliverable_authoring')
class-attribute
instance-attribute
#
tools = frozenset({'WriteNote', 'ReadNote', 'WriteDeliverable', 'WriteCell', 'ShowNotebook', 'RunNotebook', 'RunScratch', 'Wait', 'FollowUp', 'HypothesisPropose', 'HypothesisUpdate', 'HypothesisList', 'MilestoneList', 'MilestoneSet', 'QueryStore', 'OracleStatus', 'ReadProblemStatement', 'RequestSpawn', 'Retire'})
class-attribute
instance-attribute
#
reset_on_checkpoint = False
class-attribute
instance-attribute
#
handbook_audience = ('strategizer',)
class-attribute
instance-attribute
#
description = 'Orchestrates the run: forms hypotheses, plans delegations, synthesises evidence into a final conclusion. Entry node.'
class-attribute
instance-attribute
#
forward() -> None
#
ADAS hook — override for inspectable Python orchestration.
Source code in src/adda/_src/backends/base.py
516 517 | |
runtime_closures(study_dir: Path, **kwargs) -> dict
#
Every Python tool this agent's adapter receives: the closures of
:meth:build_closure_tools and the plain functions listed in
tools. The runtime, the run diagram and the viewer all read this
one method, so a custom tool reaches all three the same way.
Source code in src/adda/_src/backends/base.py
519 520 521 522 523 524 525 | |
build_closure_tools(study_dir, delegation_id=None, lit_reviewer_notes_dir=None) -> dict
#
Base corpus tools, plus the on-demand f3dasm API lookup.
The strategizer chooses samplers and optimizers without writing them, so it needs to know what f3dasm provides natively -- and without a lookup it guesses (CMA-ES and a GP were both once claimed as built in).
Source code in src/adda/_src/agents/strategizer.py
470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 | |
adda.ImplementerAgent = F3dasmImplementerAgent
module-attribute
#
adda.DataGeneratorAgent
#
The universal oracle standardizer.
Conforms ANY evaluation source — a compiled binary, an external solver (FEM/CFD/Julia), a dataset with a quirky convention, raw physics, or a plain-language spec — into one validated f3dasm DataGenerator, and writes a registration manifest so the runtime can register it as the canonical oracle (reached by the implementer through get_evaluator()).
Validates the interface on exactly one sample and the model against
expectations that come from outside the code (feature
model_verification); does NOT run large-scale experiments,
choose samplers, or optimize. Consults the literature reviewer for
methodology on novel physics before implementing.
Source code in src/adda/_src/agents/datagenerator.py
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 | |
custom_tools: dict = {}
class-attribute
instance-attribute
#
model: str | None = None
class-attribute
instance-attribute
#
backend: str | None = None
class-attribute
instance-attribute
#
base_url: str | None = None
class-attribute
instance-attribute
#
base_prompt: str | None = None
class-attribute
instance-attribute
#
mcp_servers: dict = {}
class-attribute
instance-attribute
#
extra_allowed_tools: frozenset[str] = frozenset()
class-attribute
instance-attribute
#
max_history_pairs: int = 5
class-attribute
instance-attribute
#
derivation: bool = False
class-attribute
instance-attribute
#
ledgered_evaluations: bool = False
class-attribute
instance-attribute
#
subscribes: dict = {}
class-attribute
instance-attribute
#
system_prompt = DATA_GENERATOR_SYSTEM_PROMPT
class-attribute
instance-attribute
#
tools = frozenset({'Bash', 'Edit', 'Read', 'Write', 'Glob', 'Grep', 'ReportEvals', 'QueryStore', 'OracleStatus', 'HypothesisList', 'BashOutput', 'KillShell', 'ReadProblemStatement', 'ToolBox', 'RequestSpawn', 'Retire'})
class-attribute
instance-attribute
#
reset_on_checkpoint = True
class-attribute
instance-attribute
#
handbook_audience = ('datagenerator',)
class-attribute
instance-attribute
#
description = 'The universal oracle standardizer: conforms ANY evaluation source — compiled binary, external solver (FEM/CFD), a dataset with an odd convention, raw physics, or a plain-language spec — into one validated f3dasm DataGenerator, plus a registration manifest so the runtime registers it as the canonical oracle. Validates on one sample; does not run experiments or optimize.'
class-attribute
instance-attribute
#
report_sections = ('### Actions taken', '### Conclusions', '### Numbers', '### Retrospective')
class-attribute
instance-attribute
#
forward() -> None
#
ADAS hook — override for inspectable Python orchestration.
Source code in src/adda/_src/backends/base.py
516 517 | |
runtime_closures(study_dir: Path, **kwargs) -> dict
#
Every Python tool this agent's adapter receives: the closures of
:meth:build_closure_tools and the plain functions listed in
tools. The runtime, the run diagram and the viewer all read this
one method, so a custom tool reaches all three the same way.
Source code in src/adda/_src/backends/base.py
519 520 521 522 523 524 525 | |
build_closure_tools(study_dir, delegation_id=None, lit_reviewer_notes_dir=None) -> dict
#
Base corpus tools, plus the on-demand f3dasm API lookup.
Only the two agents that WRITE f3dasm carry this tool. Every tool costs catalog tokens in every model call for the agent holding it, so a lookup the critic and strategizer never need does not go to them.
super() is called, so the literature-corpus tools survive: this agent wants papers for methodology AND the API for mechanics.
Source code in src/adda/_src/agents/datagenerator.py
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 | |
adda.AbaqusDataGeneratorAgent
#
DataGeneratorAgent that can read the Abaqus reference manual.
Set ADDA_ABAQUS_DOC_CORPUS to a corpus directory, or pass
corpus_dir= to the constructor. With neither, the tool is WITHHELD and
this agent is indistinguishable from its base class -- see
build_abaqus_docs_closures for why that is safer than declaring a tool
that cannot answer.
Source code in src/adda/_src/agents/abaqus_datagenerator.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |
system_prompt = DATA_GENERATOR_SYSTEM_PROMPT
class-attribute
instance-attribute
#
tools = frozenset({'Bash', 'Edit', 'Read', 'Write', 'Glob', 'Grep', 'ReportEvals', 'QueryStore', 'OracleStatus', 'HypothesisList', 'BashOutput', 'KillShell', 'ReadProblemStatement', 'ToolBox', 'RequestSpawn', 'Retire'})
class-attribute
instance-attribute
#
custom_tools: dict = {}
class-attribute
instance-attribute
#
reset_on_checkpoint = True
class-attribute
instance-attribute
#
description = 'The universal oracle standardizer: conforms ANY evaluation source — compiled binary, external solver (FEM/CFD), a dataset with an odd convention, raw physics, or a plain-language spec — into one validated f3dasm DataGenerator, plus a registration manifest so the runtime registers it as the canonical oracle. Validates on one sample; does not run experiments or optimize.'
class-attribute
instance-attribute
#
model: str | None = None
class-attribute
instance-attribute
#
backend: str | None = None
class-attribute
instance-attribute
#
base_url: str | None = None
class-attribute
instance-attribute
#
base_prompt: str | None = None
class-attribute
instance-attribute
#
mcp_servers: dict = {}
class-attribute
instance-attribute
#
extra_allowed_tools: frozenset[str] = frozenset()
class-attribute
instance-attribute
#
max_history_pairs: int = 5
class-attribute
instance-attribute
#
derivation: bool = False
class-attribute
instance-attribute
#
ledgered_evaluations: bool = False
class-attribute
instance-attribute
#
handbook_audience = ('datagenerator',)
class-attribute
instance-attribute
#
subscribes: dict = {}
class-attribute
instance-attribute
#
report_sections = ('### Actions taken', '### Conclusions', '### Numbers', '### Retrospective')
class-attribute
instance-attribute
#
_abaqus_corpus_dir = corpus_dir
instance-attribute
#
forward() -> None
#
ADAS hook — override for inspectable Python orchestration.
Source code in src/adda/_src/backends/base.py
516 517 | |
runtime_closures(study_dir: Path, **kwargs) -> dict
#
Every Python tool this agent's adapter receives: the closures of
:meth:build_closure_tools and the plain functions listed in
tools. The runtime, the run diagram and the viewer all read this
one method, so a custom tool reaches all three the same way.
Source code in src/adda/_src/backends/base.py
519 520 521 522 523 524 525 | |
build_closure_tools(study_dir, delegation_id=None, lit_reviewer_notes_dir=None) -> dict
#
Inherited tools plus ConsultAbaqus.
super() IS called, so the literature-corpus tools and the f3dasm API lookup survive: this agent wants papers for methodology, the f3dasm API for plumbing, and the solver manual for mechanics.
Source code in src/adda/_src/agents/abaqus_datagenerator.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |
adda.BasiliskDataGeneratorAgent
#
DataGeneratorAgent that can read the Basilisk source tree.
Set ADDA_BASILISK_SRC to a Basilisk checkout (the directory containing
src/), or pass corpus_dir= to the constructor. With neither, the
tool is WITHHELD and this agent is indistinguishable from its base class --
see build_basilisk_docs_closures for why that is safer than declaring
a tool that cannot answer.
Source code in src/adda/_src/agents/basilisk_datagenerator.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | |
system_prompt = DATA_GENERATOR_SYSTEM_PROMPT
class-attribute
instance-attribute
#
tools = frozenset({'Bash', 'Edit', 'Read', 'Write', 'Glob', 'Grep', 'ReportEvals', 'QueryStore', 'OracleStatus', 'HypothesisList', 'BashOutput', 'KillShell', 'ReadProblemStatement', 'ToolBox', 'RequestSpawn', 'Retire'})
class-attribute
instance-attribute
#
custom_tools: dict = {}
class-attribute
instance-attribute
#
reset_on_checkpoint = True
class-attribute
instance-attribute
#
description = 'The universal oracle standardizer: conforms ANY evaluation source — compiled binary, external solver (FEM/CFD), a dataset with an odd convention, raw physics, or a plain-language spec — into one validated f3dasm DataGenerator, plus a registration manifest so the runtime registers it as the canonical oracle. Validates on one sample; does not run experiments or optimize.'
class-attribute
instance-attribute
#
model: str | None = None
class-attribute
instance-attribute
#
backend: str | None = None
class-attribute
instance-attribute
#
base_url: str | None = None
class-attribute
instance-attribute
#
base_prompt: str | None = None
class-attribute
instance-attribute
#
mcp_servers: dict = {}
class-attribute
instance-attribute
#
extra_allowed_tools: frozenset[str] = frozenset()
class-attribute
instance-attribute
#
max_history_pairs: int = 5
class-attribute
instance-attribute
#
derivation: bool = False
class-attribute
instance-attribute
#
ledgered_evaluations: bool = False
class-attribute
instance-attribute
#
handbook_audience = ('datagenerator',)
class-attribute
instance-attribute
#
subscribes: dict = {}
class-attribute
instance-attribute
#
report_sections = ('### Actions taken', '### Conclusions', '### Numbers', '### Retrospective')
class-attribute
instance-attribute
#
_basilisk_corpus_dir = corpus_dir
instance-attribute
#
forward() -> None
#
ADAS hook — override for inspectable Python orchestration.
Source code in src/adda/_src/backends/base.py
516 517 | |
runtime_closures(study_dir: Path, **kwargs) -> dict
#
Every Python tool this agent's adapter receives: the closures of
:meth:build_closure_tools and the plain functions listed in
tools. The runtime, the run diagram and the viewer all read this
one method, so a custom tool reaches all three the same way.
Source code in src/adda/_src/backends/base.py
519 520 521 522 523 524 525 | |
build_closure_tools(study_dir, delegation_id=None, lit_reviewer_notes_dir=None) -> dict
#
Inherited tools plus ConsultBasilisk.
super() IS called, so the literature-corpus tools and the f3dasm API lookup survive: this agent wants papers for methodology, the f3dasm API for plumbing, and the Basilisk tree for the simulation itself.
Source code in src/adda/_src/agents/basilisk_datagenerator.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | |
adda.LiteratureReviewAgent
#
Literature reviewer: answers epistemic questions from a corpus.
Owns runs/lit_reviewer_notes/corpus.csv and papers/ — study-scoped, shared and persisted across every run of the study, not per-run. Never answers from memory — all claims must cite exact passages. Calls ReadProblemStatement() itself for research-domain framing — every agent has this tool uniformly now, not just this one by declaration.
Source code in src/adda/_src/agents/literature.py
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 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 | |
custom_tools: dict = {}
class-attribute
instance-attribute
#
model: str | None = None
class-attribute
instance-attribute
#
backend: str | None = None
class-attribute
instance-attribute
#
base_url: str | None = None
class-attribute
instance-attribute
#
base_prompt: str | None = None
class-attribute
instance-attribute
#
max_history_pairs: int = 5
class-attribute
instance-attribute
#
derivation: bool = False
class-attribute
instance-attribute
#
ledgered_evaluations: bool = False
class-attribute
instance-attribute
#
subscribes: dict = {}
class-attribute
instance-attribute
#
handbook_audience = ('literature_reviewer',)
class-attribute
instance-attribute
#
tools = frozenset({'Read', 'Grep', 'Glob', 'ReadProblemStatement'})
class-attribute
instance-attribute
#
reset_on_checkpoint = True
class-attribute
instance-attribute
#
description = 'Searches and synthesises primary scientific literature to answer epistemic questions: what methods exist, what has been tried, what the field recommends. Use before committing to a strategy you are uncertain about, or when you need to know the state of the art. Never for questions answerable from workspace data.'
class-attribute
instance-attribute
#
report_sections = ('### Papers reviewed', '### Key findings', '### Conclusions', '### Numbers', '### Retrospective')
class-attribute
instance-attribute
#
mcp_servers = {}
class-attribute
instance-attribute
#
extra_allowed_tools = frozenset()
class-attribute
instance-attribute
#
system_prompt = LITERATURE_REVIEW_SYSTEM_PROMPT
class-attribute
instance-attribute
#
forward() -> None
#
ADAS hook — override for inspectable Python orchestration.
Source code in src/adda/_src/backends/base.py
516 517 | |
runtime_closures(study_dir: Path, **kwargs) -> dict
#
Every Python tool this agent's adapter receives: the closures of
:meth:build_closure_tools and the plain functions listed in
tools. The runtime, the run diagram and the viewer all read this
one method, so a custom tool reaches all three the same way.
Source code in src/adda/_src/backends/base.py
519 520 521 522 523 524 525 | |
build_closure_tools(study_dir, delegation_id=None, lit_reviewer_notes_dir=None)
#
Inject corpus + discovery tools as runtime closures.
Source code in src/adda/_src/agents/literature.py
158 159 160 161 162 163 164 165 | |
adda.AdversarialCritiqueAgent
#
Adversarial peer-reviewer agent.
Reads the strategizer's notes and workspace outputs, then returns a structured critique whose prior is that the current conclusion is wrong. Findings are labelled CRITICAL / MAJOR / MINOR. Holding Done, it accepts a handed-over job by closing the run, or hands it back with its review.
Pure read-only: Read + Glob + Grep + ConsultHandbook (universally injected) + QueryStore/OracleStatus/HypothesisList (store/hypothesis access), no write or execution tools.
Source code in src/adda/_src/agents/critic.py
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 | |
custom_tools: dict = {}
class-attribute
instance-attribute
#
model: str | None = None
class-attribute
instance-attribute
#
backend: str | None = None
class-attribute
instance-attribute
#
base_url: str | None = None
class-attribute
instance-attribute
#
base_prompt: str | None = None
class-attribute
instance-attribute
#
mcp_servers: dict = {}
class-attribute
instance-attribute
#
extra_allowed_tools: frozenset[str] = frozenset()
class-attribute
instance-attribute
#
max_history_pairs: int = 5
class-attribute
instance-attribute
#
derivation: bool = False
class-attribute
instance-attribute
#
ledgered_evaluations: bool = False
class-attribute
instance-attribute
#
system_prompt = ADVERSARIAL_CRITIQUE_SYSTEM_PROMPT + deliverable_includes('deliverable_context_critic')
class-attribute
instance-attribute
#
tools = frozenset({'Read', 'Glob', 'Grep', 'QueryStore', 'OracleStatus', 'HypothesisList', 'HypothesisAnnotate', 'ReadProblemStatement', 'Done'})
class-attribute
instance-attribute
#
subscribes = {'hypothesis_closed': 'async', 'monitor_escalation': 'async'}
class-attribute
instance-attribute
#
reset_on_checkpoint = True
class-attribute
instance-attribute
#
handbook_audience = ('critic',)
class-attribute
instance-attribute
#
description = 'Adversarial quality auditor. Verifies conclusions are well-evidenced, hypotheses are self-consistent, and deliverables match PROBLEM_STATEMENT requirements.'
class-attribute
instance-attribute
#
report_sections = ('### Actions taken', '### Findings', '### Numbers', '### Retrospective')
class-attribute
instance-attribute
#
forward() -> None
#
ADAS hook — override for inspectable Python orchestration.
Source code in src/adda/_src/backends/base.py
516 517 | |
runtime_closures(study_dir: Path, **kwargs) -> dict
#
Every Python tool this agent's adapter receives: the closures of
:meth:build_closure_tools and the plain functions listed in
tools. The runtime, the run diagram and the viewer all read this
one method, so a custom tool reaches all three the same way.
Source code in src/adda/_src/backends/base.py
519 520 521 522 523 524 525 | |
build_closure_tools(study_dir: Path, delegation_id: str | None = None, lit_reviewer_notes_dir: Path | None = None) -> dict
#
Return runtime closure tools for this agent.
Called by the runtime when constructing the worker adapter so agents can inject Python callables (e.g. corpus management tools) without declaring them in Agent.tools.
The default gives EVERY agent read-only lookup against the study's persistent literature corpus (ConsultLiterature) — the corpus is shared, queryable infrastructure (see LiteratureCorpus), the same way QueryStore lets every node read the canonical evaluation ledger without delegating to the data generator. ACQUIRING a new paper (CorpusAdd, external search) stays literature_reviewer-only: finding and vetting a new paper needs judgment a raw tool call can't supply, so it stays gated behind an actual delegation — see LiteratureReviewAgent.build_closure_tools, which overrides this method entirely (the same ConsultLiterature plus CorpusAdd) and does not call super().
Override in a subclass to replace this default entirely.
Source code in src/adda/_src/backends/base.py
527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 | |
adda.DebuggerAgent
#
Specialist agent for diagnosing and tracing bugs.
Receives a failing command or traceback from the Strategizer, reproduces the failure, traces it to its root cause, and optionally applies a minimal fix. Returns a structured Report with root_cause and fix_applied numbers.
Source code in src/adda/_src/agents/debugger.py
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | |
custom_tools: dict = {}
class-attribute
instance-attribute
#
model: str | None = None
class-attribute
instance-attribute
#
backend: str | None = None
class-attribute
instance-attribute
#
base_url: str | None = None
class-attribute
instance-attribute
#
base_prompt: str | None = None
class-attribute
instance-attribute
#
mcp_servers: dict = {}
class-attribute
instance-attribute
#
extra_allowed_tools: frozenset[str] = frozenset()
class-attribute
instance-attribute
#
max_history_pairs: int = 5
class-attribute
instance-attribute
#
derivation: bool = False
class-attribute
instance-attribute
#
subscribes: dict = {}
class-attribute
instance-attribute
#
system_prompt = DEBUGGER_SYSTEM_PROMPT
class-attribute
instance-attribute
#
handbook_audience = ('debugger',)
class-attribute
instance-attribute
#
tools = frozenset({'Bash', 'Read', 'Grep', 'Edit', 'Write', 'QueryStore', 'OracleStatus', 'HypothesisList', 'BashOutput', 'KillShell', 'ReadProblemStatement'})
class-attribute
instance-attribute
#
ledgered_evaluations = True
class-attribute
instance-attribute
#
reset_on_checkpoint = True
class-attribute
instance-attribute
#
description = 'Diagnoses errors and applies minimal fixes. Use when a delegation returns a traceback or failure that needs root-cause analysis.'
class-attribute
instance-attribute
#
report_sections = ('### Root cause', '### Fix applied', '### Conclusions', '### Numbers')
class-attribute
instance-attribute
#
forward() -> None
#
ADAS hook — override for inspectable Python orchestration.
Source code in src/adda/_src/backends/base.py
516 517 | |
runtime_closures(study_dir: Path, **kwargs) -> dict
#
Every Python tool this agent's adapter receives: the closures of
:meth:build_closure_tools and the plain functions listed in
tools. The runtime, the run diagram and the viewer all read this
one method, so a custom tool reaches all three the same way.
Source code in src/adda/_src/backends/base.py
519 520 521 522 523 524 525 | |
build_closure_tools(study_dir: Path, delegation_id: str | None = None, lit_reviewer_notes_dir: Path | None = None) -> dict
#
Return runtime closure tools for this agent.
Called by the runtime when constructing the worker adapter so agents can inject Python callables (e.g. corpus management tools) without declaring them in Agent.tools.
The default gives EVERY agent read-only lookup against the study's persistent literature corpus (ConsultLiterature) — the corpus is shared, queryable infrastructure (see LiteratureCorpus), the same way QueryStore lets every node read the canonical evaluation ledger without delegating to the data generator. ACQUIRING a new paper (CorpusAdd, external search) stays literature_reviewer-only: finding and vetting a new paper needs judgment a raw tool call can't supply, so it stays gated behind an actual delegation — see LiteratureReviewAgent.build_closure_tools, which overrides this method entirely (the same ConsultLiterature plus CorpusAdd) and does not call super().
Override in a subclass to replace this default entirely.
Source code in src/adda/_src/backends/base.py
527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 | |
adda.MathExpertAgent
#
Specialist agent for verified symbolic derivations.
Authors and runs a Workspace-backed derivation script, mechanically checking every equality/domain/dimensional claim it makes via SymPy and reporting a genuine three-valued verdict (never coercing INCONCLUSIVE to either pole). Assumptions and other unverified claims are recorded via assume() with an ASSERTED verdict, never adjudicated. Does NOT justify why an assumption is physically valid, does NOT build the physics DataGenerator Block, and is NOT part of the default graph.
Source code in src/adda/_src/agents/math_expert.py
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 | |
custom_tools: dict = {}
class-attribute
instance-attribute
#
reset_on_checkpoint: bool = True
class-attribute
instance-attribute
#
model: str | None = None
class-attribute
instance-attribute
#
backend: str | None = None
class-attribute
instance-attribute
#
base_url: str | None = None
class-attribute
instance-attribute
#
base_prompt: str | None = None
class-attribute
instance-attribute
#
mcp_servers: dict = {}
class-attribute
instance-attribute
#
extra_allowed_tools: frozenset[str] = frozenset()
class-attribute
instance-attribute
#
max_history_pairs: int = 5
class-attribute
instance-attribute
#
ledgered_evaluations: bool = False
class-attribute
instance-attribute
#
subscribes: dict = {}
class-attribute
instance-attribute
#
system_prompt = MATH_EXPERT_SYSTEM_PROMPT
class-attribute
instance-attribute
#
tools = frozenset({'Bash', 'Edit', 'Read', 'Glob', 'Grep', 'QueryStore', 'HypothesisList', 'ReadProblemStatement'})
class-attribute
instance-attribute
#
handbook_audience = ('math_expert',)
class-attribute
instance-attribute
#
derivation = True
class-attribute
instance-attribute
#
description = 'Derives and mechanically verifies symbolic math via SymPy (Workspace scripts under runs/math_workspace/); reports CONFIRMED/REFUTED/INCONCLUSIVE per claim, never a restated confidence. Use when a modeling decision needs its algebraic consequences checked, or a published derivation needs transcribing/extending.'
class-attribute
instance-attribute
#
report_sections = ('### Actions taken', '### Verified Derivation', '### Conclusions', '### Numbers', '### Retrospective')
class-attribute
instance-attribute
#
forward() -> None
#
ADAS hook — override for inspectable Python orchestration.
Source code in src/adda/_src/backends/base.py
516 517 | |
runtime_closures(study_dir: Path, **kwargs) -> dict
#
Every Python tool this agent's adapter receives: the closures of
:meth:build_closure_tools and the plain functions listed in
tools. The runtime, the run diagram and the viewer all read this
one method, so a custom tool reaches all three the same way.
Source code in src/adda/_src/backends/base.py
519 520 521 522 523 524 525 | |
build_closure_tools(study_dir: Path, delegation_id: str | None = None, lit_reviewer_notes_dir: Path | None = None) -> dict
#
Return runtime closure tools for this agent.
Called by the runtime when constructing the worker adapter so agents can inject Python callables (e.g. corpus management tools) without declaring them in Agent.tools.
The default gives EVERY agent read-only lookup against the study's persistent literature corpus (ConsultLiterature) — the corpus is shared, queryable infrastructure (see LiteratureCorpus), the same way QueryStore lets every node read the canonical evaluation ledger without delegating to the data generator. ACQUIRING a new paper (CorpusAdd, external search) stays literature_reviewer-only: finding and vetting a new paper needs judgment a raw tool call can't supply, so it stays gated behind an actual delegation — see LiteratureReviewAgent.build_closure_tools, which overrides this method entirely (the same ConsultLiterature plus CorpusAdd) and does not call super().
Override in a subclass to replace this default entirely.
Source code in src/adda/_src/backends/base.py
527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 | |
adda.ClaudeCodeAgent
#
Source code in src/adda/_src/agents/claude_code.py
13 14 15 16 17 18 | |
custom_tools: dict = {}
class-attribute
instance-attribute
#
reset_on_checkpoint: bool = True
class-attribute
instance-attribute
#
model: str | None = None
class-attribute
instance-attribute
#
base_url: str | None = None
class-attribute
instance-attribute
#
mcp_servers: dict = {}
class-attribute
instance-attribute
#
extra_allowed_tools: frozenset[str] = frozenset()
class-attribute
instance-attribute
#
max_history_pairs: int = 5
class-attribute
instance-attribute
#
derivation: bool = False
class-attribute
instance-attribute
#
ledgered_evaluations: bool = False
class-attribute
instance-attribute
#
handbook_audience: tuple[str, ...] = ()
class-attribute
instance-attribute
#
subscribes: dict = {}
class-attribute
instance-attribute
#
report_sections: tuple[str, ...] = ('### Actions taken', '### Conclusions', '### Numbers')
class-attribute
instance-attribute
#
description = 'Plain Claude Code: the statement in, nothing from adda.'
class-attribute
instance-attribute
#
backend = 'claude'
class-attribute
instance-attribute
#
system_prompt = ''
class-attribute
instance-attribute
#
base_prompt = DEFAULT_PROMPT
class-attribute
instance-attribute
#
tools = frozenset({DEFAULT_TOOLS})
class-attribute
instance-attribute
#
forward() -> None
#
ADAS hook — override for inspectable Python orchestration.
Source code in src/adda/_src/backends/base.py
516 517 | |
runtime_closures(study_dir: Path, **kwargs) -> dict
#
Every Python tool this agent's adapter receives: the closures of
:meth:build_closure_tools and the plain functions listed in
tools. The runtime, the run diagram and the viewer all read this
one method, so a custom tool reaches all three the same way.
Source code in src/adda/_src/backends/base.py
519 520 521 522 523 524 525 | |
build_closure_tools(study_dir: Path, delegation_id: str | None = None, lit_reviewer_notes_dir: Path | None = None) -> dict
#
Return runtime closure tools for this agent.
Called by the runtime when constructing the worker adapter so agents can inject Python callables (e.g. corpus management tools) without declaring them in Agent.tools.
The default gives EVERY agent read-only lookup against the study's persistent literature corpus (ConsultLiterature) — the corpus is shared, queryable infrastructure (see LiteratureCorpus), the same way QueryStore lets every node read the canonical evaluation ledger without delegating to the data generator. ACQUIRING a new paper (CorpusAdd, external search) stays literature_reviewer-only: finding and vetting a new paper needs judgment a raw tool call can't supply, so it stays gated behind an actual delegation — see LiteratureReviewAgent.build_closure_tools, which overrides this method entirely (the same ConsultLiterature plus CorpusAdd) and does not call super().
Override in a subclass to replace this default entirely.
Source code in src/adda/_src/backends/base.py
527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 | |