Skip to main content
POST
Register Agent Run

Overview

This endpoint registers the start of a new agent interaction or “run”. It creates a new session with a unique trace_id that will be used to correlate all subsequent events for this specific agent session.
Always call this endpoint at the beginning of each new agent conversation or task to establish a tracking context.

Request

agent_id
UUID
required
The unique identifier for your agent. This should be consistent across all runs of the same agent.Example: "a1b2c3d4-e5f6-7890-1234-567890abcdef"
timestamp
datetime
required
The timestamp when the agent run is starting, in ISO 8601 format.Format: YYYY-MM-DDTHH:mm:ss.sssZExample: "2024-01-15T14:30:45.123Z"
system_prompt
string
required
The system prompt or initial instructions given to the agent for this session. This helps establish the agent’s intended behavior for security analysis.Example: "You are a helpful customer service assistant. You should be polite and professional. Never share customer personal information."

Response

trace_id
UUID
required
The unique identifier for this agent session. Use this ID for all subsequent event logging and action checking within this session.Example: "f4f4f4f4-f4f4-f4f4-f4f4-f4f4f4f4f4f4"
timestamp
datetime
required
The server timestamp when the session was registered, in ISO 8601 format.Example: "2024-01-15T14:30:45.456Z"

Examples

Response Examples

Success Response

Error Responses

Best Practices

Use the same agent_id for all runs of the same agent type. This helps with:
  • Analytics and monitoring
  • Identifying patterns across sessions
  • Debugging and troubleshooting
Include clear constraints and objectives in your system prompt:
Store the trace_id properly for the entire session:
Implement proper retry logic for transient failures:

Use Cases

Multi-Turn Conversation

Task-Based Agent

Autonomous Agent

FAQ

Create a new trace_id for:
  • Each new conversation with a user
  • Each distinct task or job
  • When the agent’s context is reset
  • After a significant time gap (e.g., new day)
No, trace_ids should be unique for each session. Reusing them will mix events from different sessions and compromise security analysis.
Events and checks submitted without a valid trace_id will be rejected with a 404 error. Always register a run first.
Trace_ids remain valid indefinitely for historical analysis, but should not be reused for new sessions after the original session ends.