Agent Design
BaseAgent contract
All agents inherit from BaseAgent (agents/base.py) and must implement:
_create_prompt(): returns aChatPromptTemplateprocess(state): asynchronous; returns a dict includingresponseanderror
Model selection
Agents load models via:
config/agents.yaml(preferred)- legacy env-var fallback if config is missing/incomplete
Providers are created through agents/factory.py::LLMFactory.
Adding a new agent
- Create a new agent class (subclass
BaseAgent) with a prompt andprocess. - Update
workflow.pyto:- add a new node
- include the stage in the conditional edge mappings
- update delegation logic if you want DLPFC to select it