Skip to main content
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"
}

Documentation Index

Fetch the complete documentation index at: https://playgent.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Start a new trace to capture detailed execution spans. Called by the SDK at agent invocation start.
agent_id
string
required
Agent being traced
run_id
string
Link trace to a test run (optional)
input
object
required
Initial input to the agent
metadata
object
Additional metadata
trace_id
string
required
Unique trace identifier
root_span_id
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"
}