{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "dreamscroll-lab-asamana--trace-llm-calls-to-debug-a-run",
 "repo": "dreamscroll-lab/asamana",
 "repo_url": "https://github.com/dreamscroll-lab/asamana",
 "repo_slug": "dreamscroll-lab-asamana",
 "title": "Trace every LLM call to debug a run",
 "page_title": "How to trace every LLM call to debug a run with Asamana",
 "summary": "Inspect prompts, responses, tokens and latency for each stage of a run.",
 "who": "A developer whose story is behaving oddly and who needs to see exactly what the model was asked and returned at each stage.",
 "problem": "Odd character behavior is hard to diagnose without seeing the prompts, outputs and cost behind each cognitive stage.",
 "outcome": "The user can find the stage and LLM call behind a specific story event, along with its prompt, response, tokens and latency.",
 "steps": [
  "Run `./deploy/asamana.sh start` with the developer tools enabled",
  "Run a world for a few steps so that LLM calls are recorded",
  "Open the `#/dev` page and select the Trace view",
  "Filter to the character or step that produced the odd behavior",
  "Compare the prompt and response with the stage it belongs to, such as perception, motivation, decision, action or feedback"
 ],
 "agent_prompt": "In the repo https://github.com/dreamscroll-lab/asamana, run a world for 3 steps and open the Trace view. Report the stage name, token count and latency of the first recorded LLM call for one character. Verify that each recorded call is linked to a stage from the five-stage pipeline.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "45 minutes",
 "basis": "readme",
 "caveat": "Trace data is shown in the developer tools, which the README says are for local development, so treat recorded prompts as potentially containing generated content.",
 "category": "Content",
 "tags": [
  "Content"
 ],
 "lang": "python",
 "requirements": [
  "Docker with Compose v2 installed (see the Installing Docker section in docs/deployment.md)",
  "git to clone the repository",
  "macOS is the recommended platform",
  "An API key for an OpenAI-compatible LLM vendor, only if you want to create or run worlds",
  "A token and spending budget, since each step makes several LLM calls per character"
 ],
 "risk": "dual-use",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.7,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/dreamscroll-lab-asamana/trace-llm-calls-to-debug-a-run/",
 "md": "https://dedupedai.com/use-cases/dreamscroll-lab-asamana/trace-llm-calls-to-debug-a-run/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/dreamscroll-lab-asamana--trace-llm-calls-to-debug-a-run.json",
 "api_version": "v1"
}
