@biroai/agent-events
v2026.513.0
Published
**P1.1** from `ROADMAP-NEXT.md` — the normalized Biro agent event schema.
Downloads
194
Readme
@biroai/agent-events
P1.1 from ROADMAP-NEXT.md — the normalized Biro agent event schema.
Every runtime adapter (Claude Code, Codex, OpenClaw, Cursor, Gemini, etc.) translates its native hooks into this schema. This package is schema and types only — no dispatch, no I/O, no side effects.
Event types
| Type | Description |
|------|-------------|
| agent.tool.requested | A tool call is about to execute (blocking; wires to budgets/approvals in P1.2) |
| agent.tool.completed | A tool call finished (success or failure) |
| agent.turn.completed | One LLM turn completed, with token counts and cost |
| agent.compacted | Context was compacted; token counts before/after |
| agent.subagent.spawned | A sub-agent was spawned from the parent |
| agent.subagent.completed | A sub-agent finished |
| agent.session.started | An agent session began |
| agent.session.ended | An agent session ended |
Usage
import { BiroAgentEventSchema, type BiroAgentEvent } from "@biroai/agent-events";
const event: BiroAgentEvent = BiroAgentEventSchema.parse(rawPayload);Properties
- Zod-validated: all fields are enforced at runtime via
zod ^3.24.2 - Serializable: every field is a JSON primitive; safe across
JSON.stringify/JSON.parse - Runtime-agnostic: the
runtimefield distinguishes the source adapter - Schema-only: no database, no HTTP, no event bus — adapters live in
packages/adapters/*
Supported runtimes
claude-code | codex | openclaw | cursor | gemini | opencode | pi | other
