Skip to content

Multi-agent: supervisor, handoffs & sub-agents #289

Closed

Description

@codeforstartups

Context

Coordinate multiple agents: a supervisor that routes to specialist agents, explicit handoffs, and sub-agents runnable as nodes/sub-graphs.

Scope

  • Supervisor pattern that routes tasks to named agents
  • Handoff mechanism to transfer control + context
  • Sub-agent as a node / sub-graph

Acceptance criteria

  • A supervisor delegates to ≥2 specialist agents and aggregates results
  • A handoff preserves conversation/state
  • Tests cover supervisor + handoff

References

Roadmap doc, §5 (Agent primitives — multi-agent), §3.


Part of #273 (flow).

Imported from the dynavec — Agent Orchestration Roadmap.

Activity

  1. tikhandesanket commented on Oct 5, 2026

    @tikhandesanket
    Collaborator

    Started workin on it

  2. tikhandesanket commented on Oct 6, 2026

    @tikhandesanket
    Collaborator

    @codeforstartups

    can we design the structure of the ecosystem like this
    dynalabs / ecosystem
    │
    ├── dynavec/
    │ └── Remember
    │ ├── vector search
    │ ├── BM25
    │ ├── hybrid retrieval
    │ ├── graph
    │ ├── embeddings
    │ ├── caching
    │ └── retrieval tools

    │
    ├── dynaflow/
    │ └── Build & run
    │ ├── Agent
    │ ├── Supervisor
    │ ├── Router
    │ ├── Handoff
    │ ├── Workflow
    │ └── State

    │
    ├── dynalogs/
    │ └── Observe
    │ ├── traces
    │ ├── runs
    │ ├── latency
    │ └── token/cost tracking

    │
    └── dynaevals/
    └── Measure & improve
    ├── evaluation datasets
    ├── retrieval evaluation
    ├── agent evaluation
    ├── judges
    └── regression testing

  3. tikhandesanket commented on Oct 7, 2026

    @tikhandesanket
    Collaborator

    @codeforstartups, please check this #288. This implementation is tightly coupled we need to decouple it, and the current project.toml actually supports this direction

    I have reviewed the existing agent primitives from #288 and the current project structure.

    My understanding is that the long-term ecosystem should be separated by responsibility:

    • dynavec — Remember: vector storage, graph, retrieval/memory
    • dynaflow — Build & Run: agents, Planner, ReAct, Supervisor, Handoff, Nodes/Subgraphs
    • dynalogs — Observe: tracing and execution logs
    • dynaevals — Measure & Improve: evaluation, quality metrics, and feedback

    For the current #289 implementation, I propose that we do not split the repository or create separate dynaflow/dynalogs/dynaevals packages yet. Instead, we can extend the existing dynavec.agents primitives introduced in #288.

    The main design goal should be loosely coupled / decoupled concepts. Each orchestration component should have a clear responsibility and minimal dependency on the others:

    • Agent → performs a task
    • AgentState → carries shared conversation/context
    • Handoff → transfers control from one agent to another while preserving state
    • Supervisor → decides which specialist agent should handle the next step and aggregates results
    • Planner → decomposes a goal into steps
    • Node/Subgraph → provides a reusable execution unit for larger workflows

    For example:

    User Request
         │
         ▼
     Supervisor
         │
         ├──► Specialist A
         │       │
         │       └──► shared AgentState
         │
         ├──► Specialist B
         │       │
         │       └──► shared AgentState
         │
         └──► Aggregate Results
    

    The Supervisor should not be tightly coupled to a specific agent implementation, storage backend, or LLM provider. Similarly, AgentState should be generic and not depend on DynamoDB, vector stores, or other dynavec internals.

    This loose coupling will make the primitives easier to test, reuse, and eventually move into dynaflow when the ecosystem is split into separate packages.

    For #289, the initial implementation would therefore focus on:

    1. AgentState

    2. Handoff

    3. Supervisor

    4. Minimal node/sub-agent support where required

    5. Tests for:

      • supervisor delegating to at least two specialists
      • result aggregation
      • handoff preserving conversation/state

    This keeps #289 focused on the current acceptance criteria while keeping the architecture ready for the future ecosystem.

    If this direction looks good, I’m ready to start implementing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area: agentsagent primitives & multi-agentdifficulty: advancedDeep / large scopehelp wantedGood for contributorspillar: dynaflowdynaflow — orchestration engine & visual builder

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions