Recipe: promote a bot to paper
# 1. Snapshot the bot (idempotent — same hash returns same version).
curl -X POST http://localhost:8000/bots `
-H "Content-Type: application/json" `
-d @configs/bots/my-bot.yaml
# 2. Backtest the bot (gates require a recent backtest_runs row).
curl -X POST http://localhost:8000/bots/<bot_id>/backtest `
-d '{"run_name":"pre-paper-check","overrides":{"start":"2024-01-01","end":"2024-06-30"}}'
# 3. Promote to paper.
curl -X POST http://localhost:8000/bots/<bot_id>/paper/start `
-d '{"run_name":"my-bot-paper-1","overrides":{}}'
The paper-metadata gate
Starting a paper session runs the strict metadata gate before launching. It rejects when:
model_urnorpipeline_urnis missing or malformed.- Either URN doesn't resolve in
entity_aspects(mlModelMetadata/pipelineMetadata). - The resolved model status isn't
ProductionorStaging.
There is no override/force flag — the gate is strict-only. See Concept: paper metadata gate for the full check order and how to seed a new config's aspects.
Risk + kill switch
The session inherits the bot's risk_layer block (BotSpec.risk_layer
in the bot's YAML). Trigger a stop:
curl -X POST http://localhost:8000/paper/stop-all
# or use the topbar kill switch in the Vite UI