Skip to main content
This example maps to examples/python-sdk/meeting_swarm_subagent_modal_minimal.py. It is the main “real app” reference for the current SDK shape.

What it demonstrates

  • App(...) with stable project_name
  • subagent-first composition with @app.subagent(...)
  • API-triggered subagent hook ingress (subagent_hook(...))
  • cron workflow (@app.subagent(..., schedule=cron(...)))
  • explicit command hook (@app.hook(..., command="python3 health_check.py"))
  • runtime files + startup entrypoint via runtime(...), local_file(...), entrypoint(...)

Declared subagents/workflows

Primary subagents:
  • booking-coordinator
  • calendar-strategist
  • followup-writer
Additional hook workflow:
  • swarm-health-hook (scheduled command execution)

Why this is a good baseline

  • Uses only primitives that are stable in current SDK implementation
  • Exercises both task-style and command-style workflow paths
  • Exercises both runtime invoke (run) and ingress (events) behavior
  • Includes local-only route (@app.local_entrypoint()) for fast iteration

Run it

cd examples/python-sdk
cp .env.example .env

python3 meeting_swarm_subagent_modal_minimal.py local --input type=availability_request --input investor_name=Alex
python3 meeting_swarm_subagent_modal_minimal.py deploy
python3 meeting_swarm_subagent_modal_minimal.py run --workflow booking-coordinator --message "Need 3 slots next week"
python3 meeting_swarm_subagent_modal_minimal.py run --workflow swarm-health-hook

Test ingress path

python3 meeting_swarm_subagent_modal_minimal.py events \
  --workflow booking-coordinator \
  --event-type channel.phone.inbound \
  --channel phone \
  --source webhook \
  --message "Need 3 slots next week" \
  --input investor_name=Alex \
  --input availability_window=9-11

Pair with local web harness

To test the same bot through a browser/webhook bridge, use:
  • /examples/investor-booking-web
That project sends inbound events into this app runtime and shows diagnostics for workflow_id, event_id, and payloads.