Repository navigation
Adding a Demo Story
The demo agents are short, scripted agents that fail in realistic ways. They need no API keys (the "models" are fixed functions), so every run reproduces exactly. They power tracedown up, the public demo, the tests and the TypeScript parity check.
Current stories: calendar (wrong date format), refund (outdated policy), loop (repeated search), pricing (made-up number), account (wrong tool chosen), checkout (says the order is confirmed when the payment failed), injection (a document that gives the model orders), order_status (the customer's details never match an account: not an agent bug).
-
Write the agent in
server/tracedown_server/demo/agents.py: a function that usestdn.run,tdn.llm_call,tdn.tool_calletc., with a fake model that returns the wrong thing. Keep it under about 40 lines and make the mistake obvious to a person reading the run. -
Register it in the
ALLdictionary at the bottom of its section:ALL["mystory"] = my_agent. -
Add a test in
server/tests/test_demo_stories.pyasserting the root cause's category and step, and that the evidence mentions the key value. -
Check the TypeScript parity test still passes (
npm testinsdk/typescript). It runs the Python agents whose names exist in the TypeScript demo; a Python-only story is fine. -
Look at it in the app:
tracedown up --db /tmp/demo.dband open the run. Does the verdict read well to someone new?
Good stories show one clear mistake, a symptom in a different step from the cause, and evidence that teaches something.
Tracedown is Apache-2.0, every feature free · Repository · Documentation · Something out of date? These pages live in wiki/: open a pull request or an issue.
Understand
Contribute
- Your First Contribution
- Development Setup
- Architecture Tour
- Writing a Detector
- Adding a Framework Integration
- Adding a Demo Story
- Reporting a Wrong Diagnosis
Run and maintain