Architecture
Pygent now prioritizes a simple single-agent architecture.
Core components
Agent: orchestrates messages, model calls, and tool execution.Runtime: executes commands and file operations in local or Docker workspace.Model(OpenAIModelby default): abstraction for OpenAI-compatible chat backends.toolsregistry: global registry used to expose callable actions to the model.
Default request flow
- User message enters
Agent. - Agent updates history and sends context + tool schemas to model.
- Model returns text and/or tool calls.
- Agent executes tool calls through
Runtime. - Results are appended to history and displayed.
Optional legacy layer
A separate legacy layer still exists for delegated background tasks:
pygent.task_manager.TaskManagerpygent.task_tools.register_task_tools()
This layer is opt-in and not part of the default CLI flow.