Skip to content

delegate_to_agent tool: delegate to static subagent by name #47

Description

@ludusrusso

Parent PRD

#34

What to build

A new delegate_to_agent tool available to the main agent (and other static agents). Looks up a static agent by name, loads its SOUL/MEMORY/config, creates a provider from the agent's model, runs a full agent loop with the agent's system prompt and tools, and returns the final text response.

The delegated session does NOT persist memory (one-shot delegation, not a full session).

Acceptance criteria

  • delegate_to_agent tool with input: agent_name (required), prompt (required)
  • Looks up agent by name via Home.Agent()
  • Loads agent's SOUL.md, MEMORY.md, and config.yaml
  • Builds system prompt using agent's identity (same as agent.Prepare flow)
  • Resolves agent's model via provider Container
  • Runs agent loop with agent's system prompt and tools
  • Returns final text response to caller
  • Does NOT run memory curation (no Finalize)
  • Error when agent doesn't exist
  • Tests with mock provider and temp agent directory

Blocked by

User stories addressed

  • User story 11 (delegate to static agent)

Metadata

Metadata

Assignees

No one assigned

    Labels

    prd/issueImplementation issue from a PRD

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions