A chattable agent that plans over several turns, then executes the plan on a signal — served with FastAPI.
Install the CLI:
npm i -g @substructure.ai/cliTwo terminals.
1. Start the worker:
pip install -r requirements.txt
python3 main.py2. 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"}}'