Data Investigator Agent
July 2026A project in agent loop engineering: an agentic loop that decides each step at runtime, writes and runs its own pandas (sandboxed), self-corrects from errors, and grounds every claim in a result it computed.
- Python
- FastAPI
- Anthropic API
- pandas
- Next.js
- Render
- · Hand-wrote the agent loop over the Anthropic Messages API (no framework): the model chooses each step at runtime, runs a tool, and reads the result fed back, repeating until it self-terminates (3 tools, up to 15 steps per run).
- · Built self-correction into the loop: a failed query's traceback is returned to the model as an error result to read and rewrite from, bounded by a per-step retry cap and loop/token budgets so it never spirals.
- · Grounded every conclusion against a computed result (no result, no claim); the model signals its own completion rather than stopping on a counter.