Docs
Agent Lab
Agent Lab
Run local Ollama agents, trace every execution, and build training datasets without API spend.
Agent Lab is the default way to use AITracer: run agents on Ollama, save every run as a trace, and export data for training.
Prerequisites
- Install Ollama on the machine that will run models.
- Pull a model:
ollama pull llama3.2
ollama serve- Sign in to AITracer and open Dashboard → Run agent (
/dashboard/lab).
If the app runs in Docker/Podman, set OLLAMA_BASE_URL so the container can reach the host, for example:
OLLAMA_BASE_URL=http://host.containers.internal:11434Run & trace
In Run agent:
- Pick a local model (loaded from
/api/local/models). - Set an action name (used to filter training exports later).
- Enter a prompt and click Run & trace.
Each run calls POST /api/local/run with recordTrace: true. Traces are stored with costUsd: 0.
Agent chat
Dashboard → Agent chat (/dashboard/ai/chat) runs multi-turn conversations through the same local backend. Every assistant turn is traced as agent_chat.
API (local runs)
curl -X POST http://localhost:3000/api/local/run \
-H "Content-Type: application/json" \
-H "Cookie: <session>" \
-d '{
"prompt": "Explain recursion in one paragraph.",
"model": "llama3.2",
"actionName": "agent_lab_run",
"recordTrace": true
}'List models:
curl http://localhost:3000/api/local/models -H "Cookie: <session>"Next steps
- Coach — optional paid review of local drafts
- Training data — export JSONL or build an Ollama model
- First trace — trace lifecycle and API ingestion