Getting Started
Trakr instruments any AI agent workflow in two lines of code. After setup, every LLM call is automatically tracked with cost, latency, tokens, and tool use.
1. Create an account
Sign up at the Trakr dashboard and complete onboarding to get your API key.
2. Install the SDK
Choose your language:
- TypeScript SDK —
npm install @trakr/monitor(source on GitHub) - Python SDK —
pip install trakr-monitor(source on GitHub)
SDK issues and feature requests: github.com/oasystems/trakr-monitor/issues
3. Initialize and run
import Trakr from '@trakr/monitor';
Trakr.init({ apiKey: process.env.TRAKR_API_KEY });
All Anthropic and OpenAI client calls are automatically captured after initialization.
4. View runs in the dashboard
Open the dashboard to see real-time cost per run, error rates, and workflow breakdowns. Set up alerts for cost spikes and error rate on Starter (email). Loop-detected and latency alert rules, plus Slack and PagerDuty, require Pro or Scale.
5. Export to Grafana or CI
Create a read access token in the dashboard under Settings → API Keys. Use the REST quickstart to pull runs, workflows, and alert events into scripts, GitHub Actions, or Grafana.
See the Dashboard API reference for authentication, allowlisted routes, and copy-paste examples.
Next steps
- Dashboard API reference — read tokens, REST routes, Grafana and CI examples
- TypeScript SDK reference
- Python SDK reference
- Ingest API overview