Skip to content

EventsOperations

The events.* operations.

list(input, options?): Promise<Events>;

Read events for several agents.

A page returns the events after the cursor, or from the start without one. With order newest, it returns the newest events first, before the cursor or from the end. A stream returns the events after the cursor, or only new events without one. If older events were deleted past the cursor, a wardrik.events.dropped event comes first and reading continues from the oldest event kept.

Parameter Type Description
input { agents: string[]; types?: string[]; after?: string; before?: string; order?: "oldest" | "newest"; limit?: number; } -
input.agents string[] Agent IDs to read, each listed once. Each includes its conversations.
input.types? string[] The event types to return, for example wardrik.run.completed. List each type once. Defaults to all types. wardrik.events.dropped is always returned.
input.after? string Return events after this cursor. Use the next value from the previous page, an event ID from a stream, or the cursor from agent.read, agent.timeline or agent.runs.
input.before? string With order newest, return events before this cursor. Use the next value from the previous page.
input.order? "oldest" | "newest" oldest returns the oldest events first, after the cursor; newest returns the newest first, before the cursor or from the end. Defaults to oldest.
input.limit? number The maximum number to return. Defaults to 100.
options? CallOptions -

Promise<Events>


streamList(input, options?): EventStream;

Like list, then follows each new event as it's written. Starts after after, or at the end of the log. See EventStream.

Parameter Type Description
input { agents: string[]; types?: string[]; after?: string; before?: string; order?: "oldest" | "newest"; } -
input.agents string[] Agent IDs to read, each listed once. Each includes its conversations.
input.types? string[] The event types to return, for example wardrik.run.completed. List each type once. Defaults to all types. wardrik.events.dropped is always returned.
input.after? string Return events after this cursor. Use the next value from the previous page, an event ID from a stream, or the cursor from agent.read, agent.timeline or agent.runs.
input.before? string With order newest, return events before this cursor. Use the next value from the previous page.
input.order? "oldest" | "newest" oldest returns the oldest events first, after the cursor; newest returns the newest first, before the cursor or from the end. Defaults to oldest.
options? StreamOptions -

EventStream


head(input, options?): Promise<string>;

Read the latest event cursor for agents.

Parameter Type Description
input { agents: string[]; } -
input.agents string[] Agent IDs to read, each listed once. Each includes its conversations.
options? CallOptions -

Promise<string>