Skip to content

rulvar API reference


rulvar API reference / @rulvar/rulvar / AgentEvents

Type Alias: AgentEvents

ts
type AgentEvents = 
  | {
  agentType: string;
  label?: string;
  type: "agent:queued";
}
  | {
  agentType: string;
  label?: string;
  model: string;
  role: string;
  type: "agent:start";
}
  | {
  agentType: string;
  costUsd: number;
  entryRef: number;
  label?: string;
  status: string;
  type: "agent:end";
  usage: Usage;
}
  | {
  agentType: string;
  error: WireError;
  label?: string;
  type: "agent:error";
  willRetry: boolean;
}
  | {
  agentType: string;
  attempt: number;
  maxAttempts: number;
  type: "agent:schema-retry";
}
  | {
  delta: string;
  type: "agent:stream";
};

Defined in: packages/core/dist/index.d.ts

Agent lifecycle.