Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

python-fast-api-plan-mode

A chattable agent that plans over several turns, then executes the plan on a signal — served with FastAPI.

Run

Install the CLI:

npm i -g @substructure.ai/cli

Two terminals.

1. Start the worker:

pip install -r requirements.txt
python3 main.py

2. Drive a session with the CLI. Reuse one --session across turns.

Plan:

export ANTHROPIC_API_KEY=sk-ant-...
subs run -c substructure.toml --agent planner "plan a weekend trip to Lisbon"

Flip to execution — a client.action, not a chat message, so it never lands in the transcript:

subs run -c substructure.toml \
    --session plan-demo \
    --input '{"type":"client.action","name":"set_mode","args":{"mode":"executing"}}'