Agent DailyAgent Daily
tutorialintermediate

The chief of staff agent Sep 2025 • Claude Agent SDK Agent Patterns Build multi-agent systems with subagents, hooks, output styles, and plan mode features.

cookbook
View original on cookbook

This cookbook article introduces the Claude Agent SDK for building multi-agent systems, using a Chief of Staff agent for a startup as the primary example. It demonstrates key features including persistent memory via CLAUDE.md files, bash tool execution for Python scripts, and coordination of specialized subagents. The article progressively builds a comprehensive agent system that aggregates insights from multiple domains to provide executive summaries and actionable recommendations for a CEO managing a $10M Series A startup.

Key Points

  • Use CLAUDE.md files as persistent memory and context for agents—place them in the agent's working directory and set the cwd argument in ClaudeSDKClient to enable automatic context loading
  • Agents naturally prefer authoritative data sources (e.g., detailed CSVs) over high-level context; use explicit prompt instructions to guide agent behavior toward CLAUDE.md summaries when needed
  • CLAUDE.md serves as an 'onboarding document' containing high-level context, company standards, and pointers to detailed data—not as hard constraints on data source selection
  • Enable the Bash tool to allow agents to execute Python scripts for procedural knowledge, complex computations, data analysis, and integrations beyond native capabilities
  • Organize utility scripts in accessible directories (e.g., chief_of_staff_agent/scripts) and document them in CLAUDE.md or subagent MD files for discovery and execution
  • Build specialized subagents for different domains (financial analysis, recruiting, etc.) and coordinate them through a Chief of Staff agent that aggregates insights
  • Use Claude Opus 4.6 for superior planning and reasoning capabilities when building complex multi-agent systems
  • Implement allowed_tools configuration (e.g., Bash, Read) to control which tools agents can access and ensure security
  • Design scripts with clear purposes: hiring impact modeling, candidate scoring, financial forecasting, decision matrices, and quick calculations support different agent responsibilities
  • Prompt engineering matters—phrase requests to signal whether you want high-level summaries or detailed precision analysis from available data sources

Found this useful? Add it to a playbook for a step-by-step implementation guide.

Workflow Diagram

Start Process
Step A
Step B
Step C
Complete
Quality

Concepts

Artifacts (4)

Chief of Staff Agent Setuppythonscript
from dotenv import load_dotenv
from utils.agent_visualizer import (
    display_agent_response,
    print_activity,
    reset_activity_context,
    visualize_conversation,
)
from claude_agent_sdk import ClaudeAgentOptions, ClaudeSDKClient

load_dotenv()

MODEL = "claude-opus-4-6"

messages = []
async with ClaudeSDKClient(
    options=ClaudeAgentOptions(
        model=MODEL,
        cwd="chief_of_staff_agent",
        setting_sources=["project"],
    )
) as agent:
    await agent.query("What's our current runway?")
    async for msg in agent.receive_response():
        print_activity(msg)
        messages.append(msg)

display_agent_response(messages)
Agent with Bash Tool Configurationpythonscript
messages = []
async with ClaudeSDKClient(
    options=ClaudeAgentOptions(
        model=MODEL,
        allowed_tools=["Bash", "Read"],
        cwd="chief_of_staff_agent",
    )
) as agent:
    await agent.query(
        "Use your simple calculation script with a total runway of 2904829 and a monthly burn of 121938."
    )
    async for msg in agent.receive_response():
        print_activity(msg)
        messages.append(msg)

display_agent_response(messages)
CLAUDE.md Template for Chief of Stafftemplate
# Chief of Staff Agent Context

## Company Overview
- **Company**: TechStart
- **Stage**: Series A ($10M raised)
- **Team Size**: 50 people
- **Current ARR**: $2.4M growing at 15% MoM

## Financial Metrics
- **Monthly Burn Rate**: $500K (gross), $235K (net)
- **Current Runway**: 20 months
- **Series B Target**: $30M

## Compensation Benchmarks
- **Senior Engineer**: $180-220K

## Available Scripts
- `scripts/hiring_impact.py`: Model hiring scenarios
- `scripts/talent_scorer.py`: Rank engineering candidates
- `scripts/simple_calculation.py`: Quick financial metrics
- `scripts/financial_forecast.py`: ARR growth projections
- `scripts/decision_matrix.py`: Strategic decision evaluation

## Data Sources
- `financial_data/burn_rate.csv`: Month-by-month burn details
- `candidate_data/`: Recruiting pipeline

## Agent Responsibilities
Coordinate specialized subagents, aggregate insights, provide executive summaries with actionable recommendations.
Utility Script Structurepythonscript
# Example: simple_calculation.py
# Performs quick financial calculations for runway, burn rate, and quarterly metrics

def calculate_runway(total_cash, monthly_burn):
    """Calculate months of runway remaining"""
    return total_cash / monthly_burn

def calculate_quarterly_burn(monthly_burn):
    """Calculate quarterly burn rate"""
    return monthly_burn * 3

def calculate_annual_burn(monthly_burn):
    """Calculate annual burn rate"""
    return monthly_burn * 12

if __name__ == "__main__":
    import sys
    if len(sys.argv) > 2:
        total_cash = float(sys.argv[1])
        monthly_burn = float(sys.argv[2])
        runway = calculate_runway(total_cash, monthly_burn)
        print(f"Runway: {runway:.1f} months")
        print(f"Quarterly Burn: ${calculate_quarterly_burn(monthly_burn):,.0f}")
        print(f"Annual Burn: ${calculate_annual_burn(monthly_burn):,.0f}")