How arko555/deep_agent_experiement works
Deep Agent is a LangGraph-based assistant: a user request is routed once to skill-defined department agents, which run isolated tool loops; their results are checked and combined into the response. The graph also supports conversation memory, workspace file governance, dynamic tools, MCP tools, and remote A2A departments. Some subsystem links below are documented in the README or SOURCE INDEX; unsampled implementation details are not inferred.
Main entry points: graph.py Compiled graph · registry.py Tool registry · orchestrator.py Request router · subagents.py Department tool loops
Components 28
Orchestration
- Compiled graph
src/services/agent_orchestrator/graph.py - Agent state
src/services/agent_orchestrator/state.py - Request router
src/services/agent_orchestrator/orchestrator.py - Department fanout
src/services/agent_orchestrator/subagent_engine.py - Result verification
src/services/agent_orchestrator/verification.py - Result aggregation
src/services/agent_orchestrator/aggregator.py
Departments
- Skill discovery
src/services/agent_orchestrator/memory.py - Department tool loops
src/services/agent_orchestrator/subagents.py
Tools and integrations
- Tool registry
src/services/tools_integration/registry.py - Built-in tools
src/services/tools_integration/tools.py - Dynamic tools
src/services/tools_integration/discovery.py - Tool definitions
src/services/tools_integration/decorator.py - Tool shortlisting
src/services/tools_integration/relevance.py - Tool validation
src/services/tools_integration/validation.py - MCP client
src/services/tools_integration/mcp_client.py - A2A client
src/services/tools_integration/a2a_client.py - Async bridge
src/async_bridge.py
Memory and governance
- Conversation window
src/services/session_memory/window.py - Checkpoints
src/services/session_memory/checkpoint.py - Workspace safeguards
src/services/tools_integration/guardrails.py - Workspace files
workspace - Runtime configuration
src/config.py
Other components
- User
- Configured LLM
- MCP servers
- Remote agents
Connections 31
- User → CLI: submits request
README.md - User → Chat UI: chats through
README.md - CLI → Compiled graph: invokes agent
- Chat UI → Compiled graph: invokes agent
app.py - Compiled graph → Request router: runs first
src/services/agent_orchestrator/graph.py - Compiled graph → Department fanout: dispatches departments
src/services/agent_orchestrator/graph.py - Compiled graph → Result verification: checks fanout output
README.md - Compiled graph → Result aggregation: combines results
README.md - Request router → Configured LLM: routes with
README.md - Request router → Conversation window: reads message window
src/services/agent_orchestrator/orchestrator.py - Compiled graph → Checkpoints: configures checkpointing
src/services/agent_orchestrator/graph.py - Request router → Skill discovery: builds department roster
README.md - Skill discovery → Department tool loops: defines roles
README.md - Department fanout → Department tool loops: runs department loops
src/services/agent_orchestrator/subagent_engine.py - Department tool loops → Tool shortlisting: shortlists tools
README.md - Department tool loops → Tool registry: dispatches tool calls
src/services/agent_orchestrator/subagents.py - Tool registry → Built-in tools: registers built-ins
src/services/tools_integration/tools.py - Tool registry → Dynamic tools: loads dynamic tools
README.md - Dynamic tools → Tool definitions: discovers decorated tools
- Tool registry → Tool validation: validates payloads
src/services/tools_integration/registry.py - Tool registry → MCP client: dispatches MCP calls
README.md - MCP client → MCP servers: calls configured servers
README.md - MCP client → Async bridge: runs async tools through
src/services/tools_integration/mcp_client.py - Department fanout → A2A client: calls remote departments
src/services/agent_orchestrator/subagent_engine.py - A2A client → Remote agents: sends agent request
src/services/tools_integration/a2a_client.py - A2A client → Async bridge: runs async client through
src/services/tools_integration/a2a_client.py - Runtime configuration → MCP client: configures servers
src/config.py - Runtime configuration → A2A client: configures agents
src/config.py - Built-in tools → Workspace safeguards: guards file access
src/services/tools_integration/tools.py - Workspace safeguards → Workspace files: limits file operations
README.md - Compiled graph → Agent state: uses workflow state
src/services/agent_orchestrator/graph.py