Skip to main content

create_deep_agent

Function create_deep_agent 

Source
pub fn create_deep_agent(
    model: Arc<dyn ChatModel>,
    options: DeepAgentOptions,
) -> Result<CompiledGraph<MessageState>, SynapticError>
Expand description

Create a deep agent with the given model and options.

Assembles a middleware stack and tool set:

  1. DeepMemoryMiddleware — loads memory file into system prompt
  2. SkillsMiddleware — progressive disclosure of skills
  3. FilesystemMiddleware — 6–7 filesystem tools + large result eviction
  4. SubAgentMiddlewaretask tool for child agent spawning
  5. DeepSummarizationMiddleware — auto-summarize context on overflow
  6. PatchToolCallsMiddleware — fix malformed tool calls
  7. User-provided middleware