Docs / Quickstart
SDK Quickstart
Send your first agent event to ClawTrait in under 60 seconds. No SDK package required — just fetch.
1
Get your API key
Sign up (or sign in) and grab your API key from the dashboard. Keys start with ct_.
2
Pick your language
ClawTrait works with any language that can make HTTP requests. No special SDK needed — use the built-in fetch or install a lightweight HTTP client:
npm install node-fetch # or use built-in fetch3
Send your first event
Three lines of code. That is it.
// 3 lines to send your first event
const response = await fetch('https://clawtrait.com/api/ingest', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Agent-Key': 'YOUR_API_KEY',
},
body: JSON.stringify({
task_type: 'email_reply',
model: 'claude-3.5-sonnet',
tokens_used: 1500,
status: 'success',
duration_ms: 2400,
}),
})Replace YOUR_API_KEY with your real key. The event appears in your dashboard within seconds.
4
See it in the dashboard
Open your ClawTrait dashboard — your event is already there. You will see cost per task, success rates, and behaviour baselines building automatically.
Event fields reference
Python example
import requests
requests.post('https://clawtrait.com/api/ingest',
headers={'X-Agent-Key': 'YOUR_API_KEY'},
json={
'task_type': 'email_reply',
'model': 'claude-3.5-sonnet',
'tokens_used': 1500,
'status': 'success',
'duration_ms': 2400,
}
)cURL example
curl -X POST https://clawtrait.com/api/ingest \
-H "Content-Type: application/json" \
-H "X-Agent-Key: YOUR_API_KEY" \
-d '{
"task_type": "email_reply",
"model": "claude-3.5-sonnet",
"tokens_used": 1500,
"status": "success",
"duration_ms": 2400
}'Next steps
- Full API reference — all endpoints and response formats
- Try the demo dashboard — see what your data looks like
- Open your dashboard — requires signup