Observed since 20 Oct, 22:49 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Shared Pydantic wire types for AgentOps SDK ↔ controlplane RPC.
Shared Pydantic wire types for the AgentOps SDK and controlplane.
Both the SDK (komodor-agentops) and the controlplane import models from this
package, giving build-time (mypy) and runtime (Pydantic v2) type safety across
the wire boundary.
pip install agentops-rpc
from agentops_rpc import RunEventIn, IngestRunEventsRequest, HOOK_EVENT_TYPE_MAP
event = RunEventIn(
event_type="span.started",
span_id="span_abc",
kind="tool",
name="Bash",
hook_event_type="tool.start",
)
event.model_dump() # JSON-safe dict
request = IngestRunEventsRequest(worker_id="wrk_1", events=[event])
| Type | Values |
|---|---|
EventType | run.started, run.completed, run.failed, span.started, span.ended, message.created, log.created, token.created, custom.created, output.updated |
RunStatus | queued, claimed, running, succeeded, failed |
SpanKind | agent, llm, tool, chain, generation |
HookEventName | SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, PostToolUseFailure, SubagentStart, SubagentStop, Notification, Stop, SessionEnd, PermissionRequest, PreCompact, PostCompact |
HookEventType | session.start, prompt.submit, tool.start, tool.end, tool.error, subagent.start, subagent.end, notification, session.stop, compaction.start, compaction.end |
AgentStatus | online, offline |
RunTransport | polling, api_sync, api_sse, a2a |
RunEventIn -- unified event sent SDK -> controlplaneTraceEventIn, LogEventIn -- structured events for DB tablesIngestRunEventsRequest / IngestRunEventsResponseBatchEventsRequestTraceEventResponse, LogEventResponse, RunMessageResponseCreateRunRequest, RunSummary, RunDetail, RunJobPollNextRunRequest, ClaimRunResponseStartRunRequest, StartRunDirectRequestCompleteRunRequest, FailRunRequest, UpdateRunOutputRequestInvokeAgentRequest / InvokeAgentResponseWorkerInvokeRequest / WorkerInvokeResponseAgentManifest, HeartbeatRequest, HeartbeatResponseAgentInstanceResponseHOOK_EVENT_TYPE_MAP -- maps Claude Code HookEventName to HookEventTypeA2AMessage, A2AMessagePartA2AMessageRequest, A2ATaskResponse| Layer | Protection |
|---|---|
| Build-time (mypy) | SDK and controlplane import the same Pydantic models -- field mismatches caught at type-check |
| Runtime (Pydantic) | Every event validated at construction and at API boundary |
| Wire (JSON) | model_dump() / model_validate() guarantee JSON matches schema |
| Hook events | HookEventType literal -- typos fail both type-check and runtime |
Four steps, none of them a Python edit. schemas/frames.schema.json is the hand-authored
source of truth; Python, Go and TypeScript are all generated from it, and no language is
privileged.
$defs, and bind it in x-agentops-frames ("my_frame": "MyFramePayload"). Leave additionalProperties out rather than setting it true — the
schema's own description explains why the two differ in generated Go.x-agentops-delivery — control (send now or fail now) or
at-least-once (buffered, retried, may deliver twice, ordered per stream). There is no
default and the generator refuses to run without one, because either default is wrong for
half the types.schemas/fixtures/ (and fixtures/invalid/ if the type has a
constraint worth proving). A per-type coverage guard fails without one.make generate-frames. This writes the Python models and registry, the Go wire
types, and the TypeScript bindings together — plus the MY_FRAME constant and the
package's __all__, so from agentops_rpc.wire import MY_FRAME, MyFramePayload works
with no further edit. make check-frames is the CI guard that the committed artifacts
match the schema.The one thing that does still cost a Python line is a payload with an inline sub-schema:
the registry binds top-level payload schemas, so a shape nested inside one is invisible to the
generator and each language names it differently. wire/__init__.py aliases it once (see
Event as RunEvent). A payload built only from $defs and scalars needs nothing.
Everything after that is feature code: a Router.on(MY_FRAME) handler on the worker side, a
caller on the control-plane side. See docs/reference/cp-worker-protocol.md
for how frames reach a worker and how a reply is correlated.
Only pydantic>=2.0. Zero internal dependencies.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.4.10 | 20 Oct 2026 | 1 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 22:49 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:d9f73809fb8e6e008a17616db1daf0bb9aae5a90036cfb00b300ec331dc68122