curl -X POST https://api.playgent.com/v1/traces \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "agent_abc123",
"run_id": "run_def456",
"input": {
"messages": [{ "role": "user", "content": "What is your refund policy?" }]
},
"metadata": {
"session_id": "sess_123",
"user_id": "user_456"
}
}'
{
"trace_id": "trace_ghi789",
"root_span_id": "span_jkl012"
}
Tracing
Create Trace
Start a new trace for agent execution
POST
/
v1
/
traces
curl -X POST https://api.playgent.com/v1/traces \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "agent_abc123",
"run_id": "run_def456",
"input": {
"messages": [{ "role": "user", "content": "What is your refund policy?" }]
},
"metadata": {
"session_id": "sess_123",
"user_id": "user_456"
}
}'
{
"trace_id": "trace_ghi789",
"root_span_id": "span_jkl012"
}
Start a new trace to capture detailed execution spans. Called by the SDK at agent invocation start.
string
required
Agent being traced
string
Link trace to a test run (optional)
string
required
Unique trace identifier
string
required
Root span identifier for the trace
curl -X POST https://api.playgent.com/v1/traces \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "agent_abc123",
"run_id": "run_def456",
"input": {
"messages": [{ "role": "user", "content": "What is your refund policy?" }]
},
"metadata": {
"session_id": "sess_123",
"user_id": "user_456"
}
}'
{
"trace_id": "trace_ghi789",
"root_span_id": "span_jkl012"
}

