Event Types Reference
ARK generates Kubernetes events throughout the AI agent execution lifecycle. These events provide visibility into system behavior and enable detailed evaluation of performance and reliability.
Event Naming Convention
Events follow a systematic naming pattern:
- Start Events:
{Operation}Start
- Marks beginning of operation - Complete Events:
{Operation}Complete
- Marks successful completion - Error Events:
{Operation}Error
- Marks operation failure
Query Resolution Events
ResolveStart
Emitted when query resolution begins.
Metadata:
queryId
: Unique query identifiersessionId
: Session identifierqueryName
: Name of the query resourcetimestamp
: Event timestamp
Example:
{
"reason": "ResolveStart",
"message": {
"Metadata": {
"queryId": "query-123",
"sessionId": "session-456",
"queryName": "example-query"
}
}
}
ResolveComplete
Emitted when query resolution completes successfully.
Metadata:
queryId
: Unique query identifiersessionId
: Session identifierduration
: Total resolution time in secondstargetsResolved
: Number of targets resolved
ResolveError
Emitted when query resolution fails.
Metadata:
queryId
: Unique query identifiersessionId
: Session identifiererror
: Error messageerrorCode
: Error classification
Agent Execution Events
AgentExecutionStart
Emitted when an agent begins execution.
Metadata:
agentName
: Name of the agentagentId
: Unique agent instance IDqueryId
: Parent query IDsessionId
: Session identifiermodelName
: LLM model being used
AgentExecutionComplete
Emitted when agent execution completes successfully.
Metadata:
agentName
: Name of the agentagentId
: Agent instance IDduration
: Execution time in secondstoolsUsed
: Number of tools calledllmCalls
: Number of LLM interactions
AgentExecutionError
Emitted when agent execution fails.
Metadata:
agentName
: Name of the agenterror
: Error messageerrorType
: Error classificationretryCount
: Number of retry attempts
Tool Call Events
ToolCallStart
Emitted when a tool is invoked.
Metadata:
toolName
: Name of the tooltoolId
: Unique tool call IDagentName
: Calling agentparameters
: Tool parameters (sanitized)timestamp
: Call timestamp
ToolCallComplete
Emitted when tool execution completes successfully.
Metadata:
toolName
: Name of the tooltoolId
: Tool call IDduration
: Execution time in secondsresultSize
: Size of result datasuccess
: Boolean success indicator
ToolCallError
Emitted when tool execution fails.
Metadata:
toolName
: Name of the toolerror
: Error messageerrorType
: Error classificationretryable
: Whether retry is possible
Team Coordination Events
TeamExecutionStart
Emitted when team execution begins.
Metadata:
teamName
: Name of the teamteamId
: Unique team instance IDmemberCount
: Number of team membersexecutionMode
: ‘sequential’ or ‘parallel’
TeamExecutionComplete
Emitted when team execution completes.
Metadata:
teamName
: Name of the teamduration
: Total execution timemembersExecuted
: Number of members that executedsuccessRate
: Team success rate
TeamExecutionError
Emitted when team execution fails.
Metadata:
teamName
: Name of the teamerror
: Error messagefailedMembers
: List of failed member agents
TeamMemberStart
Emitted when a team member begins execution.
Metadata:
teamName
: Parent team namememberName
: Member agent namememberRole
: Role in teamexecutionOrder
: Order in sequence
TeamMemberComplete
Emitted when team member completes execution.
Metadata:
teamName
: Parent team namememberName
: Member agent nameduration
: Member execution timehandoffData
: Data passed to next member
LLM Interaction Events
LLMCallStart
Emitted when LLM API call begins.
Metadata:
modelName
: LLM model namecallId
: Unique call IDagentName
: Calling agentpromptTokens
: Number of prompt tokens
LLMCallComplete
Emitted when LLM call completes.
Metadata:
modelName
: LLM model namecallId
: Call IDduration
: Call duration in secondscompletionTokens
: Number of completion tokenstotalTokens
: Total tokens used
LLMCallError
Emitted when LLM call fails.
Metadata:
modelName
: LLM model nameerror
: Error messageerrorType
: ‘rate_limit’, ‘timeout’, ‘api_error’retryAfter
: Seconds before retry (if applicable)
Memory Events
MemoryStoreStart
Emitted when memory storage begins.
Metadata:
memoryType
: Type of memory (short_term, long_term)agentName
: Agent storing memorydataSize
: Size of data being stored
MemoryStoreComplete
Emitted when memory storage completes.
Metadata:
memoryId
: Stored memory IDduration
: Storage durationindexed
: Whether memory was indexed
MemoryRetrieveStart
Emitted when memory retrieval begins.
Metadata:
queryVector
: Query vector dimensiontopK
: Number of results requestedagentName
: Requesting agent
MemoryRetrieveComplete
Emitted when memory retrieval completes.
Metadata:
resultsFound
: Number of resultsduration
: Retrieval durationrelevanceScore
: Average relevance score
Special Events
A2ACallStart
Emitted when agent-to-agent communication begins.
Metadata:
callerAgent
: Calling agent nametargetAgent
: Target agent namemessageType
: Type of communicationpriority
: Call priority
A2ACallComplete
Emitted when agent-to-agent communication completes.
Metadata:
callerAgent
: Calling agent nametargetAgent
: Target agent nameduration
: Communication durationresponseSize
: Size of response
ValidationError
Emitted when input validation fails.
Metadata:
component
: Component that failed validationvalidationType
: Type of validationerrors
: List of validation errors
RateLimitExceeded
Emitted when rate limits are exceeded.
Metadata:
component
: Rate-limited componentlimit
: Rate limit valueresetTime
: When limit resetsqueueDepth
: Current queue depth
Event Metadata Structure
All events include standard Kubernetes event fields plus custom metadata:
interface EventMetadata {
// Identity
queryId?: string;
sessionId?: string;
agentName?: string;
teamName?: string;
toolName?: string;
modelName?: string;
// Timing
timestamp?: string;
duration?: number;
startTime?: string;
endTime?: string;
// Status
success?: boolean;
error?: string;
errorType?: string;
retryCount?: number;
// Metrics
tokenCount?: number;
resultSize?: number;
memoryUsage?: number;
// Relationships
parentId?: string;
correlationId?: string;
causationId?: string;
}
Using Events in Evaluations
Events can be analyzed using semantic expressions:
# Check for specific event
expression: "events.exists(e, e.reason == 'ToolCallComplete')"
# Or using semantic helpers
expression: "tool.was_called()"
# Count events
expression: "events.filter(e, e.reason == 'AgentExecutionStart').size() >= 2"
# Or using semantic helpers
expression: "agent.get_execution_count() >= 2"
Event Filtering
Events can be filtered by:
- Query ID: Events for specific query
- Session ID: Events within a session
- Time Range: Events within time window
- Component: Events from specific component
- Status: Success/failure events
Best Practices
- Use semantic helpers instead of raw event matching when possible
- Check event metadata for detailed context
- Consider event ordering for sequence validation
- Monitor error events for failure patterns
- Aggregate metrics from complete events