Agentic AI Architecture¶
Target agent loop¶
The planned graph uses create_deep_agent(...) with a Postgres checkpointer and a custom MicrosandboxBackend. DeepAgents supplies read/write/edit/list/search/execute tools; the custom backend maps them to executor HTTP calls.
flowchart TD
classDef default fill:#1e293b,stroke:#38bdf8,stroke-width:2px,color:#f8fafc
classDef highlight fill:#065f46,stroke:#34d399,stroke-width:2px,color:#f0fdf4
Request["User analysis request"]:::highlight --> Graph["DeepAgent / LangGraph"]
Graph --> Plan["Reason and plan"]
Plan --> Tool["Read/write/execute backend tools"]
Tool --> Executor["MicrosandboxBackend"]
Executor --> VM["Isolated executor session"]
VM --> Files["Workspace changes"]
Files --> MinIO["MinIO artifacts"]
Graph --> Checkpoint["Postgres checkpoint"]
Checkpoint --> Resume["Resume thread"]
linkStyle default stroke:#64748b,stroke-width:2px
Resumability¶
Three stores must agree: LangGraph checkpoints, a Postgres thread_id → sandbox_session_id mapping, and MinIO uploads/artifacts. Restart recovery must restore all three rather than relying on in-memory mappings.
Guardrails¶
The plan requires no network by default, audited allowlists, prebuilt images, executor CPU/memory/timeout/file limits, backend-only public access, and thread ownership checks. These are design requirements; implementation coverage must be verified when the missing backend is added.