Skip to content

Use casesAgent team

Split a big job across agents.

A lead agent hands parts of the job to subagents with their own instructions and tools. When it finishes, that can start the next agent or a workflow.

A job too big for one prompt, done as a chain you can inspect.

The build

From one folder to a team that hands off

  1. Scaffold the lead

    One command makes the lead's project folder, with a place for subagents inside it.

    Terminal
    $ evs init incident-review
    Created agent project incident-review/
    
      incident-review/agent.yaml        agent config (model, tools, triggers)
      incident-review/instructions.md   system prompt
      incident-review/src/              project code executed in the agent sandbox
      incident-review/skills/           markdown playbooks, loaded on demand
      incident-review/subagents/        optional nested agent projects
    
    Next: cd incident-review && evs deploy
  2. Add a folder for each subagent

    A subagent is a project of its own inside the lead's: its own file, its own instructions.

    incident-review/
    incident-review/
      agent.yaml
      instructions.md
      subagents/
        timeline/
          agent.yaml
          instructions.md
        root-cause/
          agent.yaml
          instructions.md
        follow-ups/
          agent.yaml
          instructions.md
  3. Tell the lead who it has

    Name the subagents, decide whether delegating needs to ask, and give the lead a memory to keep what the team finds.

    incident-review/agent.yaml
    name: "incident-review"
    description: Reviews last week's incidents and files the follow-ups
    model: claude-sonnet-5
    instructions: ./instructions.md
    
    permissions:
      task_mode: always # ask | always | deny
    
    tools:
      - memory_query
      - memory_store
    
    subagents:
      - ./subagents/timeline
      - ./subagents/root-cause
      - ./subagents/follow-ups
    
    triggers:
      - name: monday
        type: cron
        schedule: 0 9 * * 1
  4. Deploy the whole team at once

    One deploy sends the lead and its subagents, and links each subagent to the lead.

    Terminal
    $ evs deploy
      link timeline                 -> subordinate of parent
      link root-cause               -> subordinate of parent
      link follow-ups               -> subordinate of parent
      trigger monday                -> created (cron)
    
    Deployed incident-review. Try it:
      evs agents run incident-review "hello"
  5. Start the next agent when it finishes

    In another agent's project, an event trigger names this one. When the review ends, that agent starts by itself.

    status-update/agent.yaml
    name: "status-update"
    model: claude-sonnet-5
    instructions: ./instructions.md
    
    triggers:
      - name: after-review
        type: event
        event: session.end
        source_agent_id: <incident-review's id>
  6. Watch them work

    On Monday the lead hands each part of the review to a subagent and gathers what they return.

Good to know

Before you start

Subagents in a project are one level deep. A subagent cannot have subagents of its own.

task_mode decides whether delegating asks first, always runs or is denied.

A trigger can start a workflow instead of an agent.

Put Everstack in front of your next request

Run it yourself in a few minutes, or start on Everstack Cloud with your own provider keys.

Star on GitHubOpen source under Apache 2.0. A star helps others find it.