Skip to content

oRPC AgentGoverned capabilities for AI agents

Make agents first-class clients of your oRPC application โ€” the same typed procedures, with explicit exposure, policies, approvals, audit, and tracing.

oRPC Agent

Status: v0.1 implemented and published to npm (@orpc-agent/* at 0.1.0). These documents are the source of truth the implementation was built from; where the build forced a change, the decision records carry an as-built addendum. Independent community project, not affiliated with the oRPC maintainers.

Start here: Getting started ยท The idea in one page: Architecture overview ยท The worked example: Customer-support agent ยท Full-stack with Mastra: Task board

Documentation map โ€‹

Audience key: U = application developers using the framework ยท I = implementers/contributors building it ยท S = security reviewers.

Concepts โ€” the mental model (U) โ€‹

DocAnswersBuilds on
capabilitiesWhat is a capability; why not "tool"; granularityโ€”
registryIdentity, inclusion, filteringcapabilities
runtimeWhat executes; the result envelopecapabilities
contextActor vs execution context; ctx.agentruntime
policiesDecisions, phases, precedence โ€” normative semanticsruntime
approvalsThe lifecycle; input binding โ€” normative semanticspolicies
errorsTwo-face errors; stages; model feedbackruntime
lifecycleOne request end-to-end, narratedall of the above

Architecture โ€” normative design (I) โ€‹

DocAnswers
overviewLayers, boundaries, the five core objects
execution-pipelineThe stage-by-stage runtime spec (cited as "stage N")
package-boundariesFive packages, dependency rules, non-responsibilities
adapter-modelThe four adapter obligations; conformance
decisionsADR-001โ€ฆ012

Security โ€” binding invariants (S, U, I) โ€‹

DocAnswers
security-modelSI-1โ€ฆSI-12; the five gates; honest non-claims
authorizationFour layers; middleware authority; multi-tenancy
prompt-injectionWhat's bounded, what isn't, what's yours
sensitive-dataFive lenses; redaction defaults
idempotency-and-retriesExact guarantees and non-guarantees
threat-modelAssets, adversaries, T1โ€“T15

Adapters (U) โ€‹

ai-sdk ยท mcp ยท opentelemetry ยท testing

Guides โ€” task-oriented (U) โ€‹

defining-capabilities ยท capability-exposure ยท adding-policies ยท human-approval ยท application-context ยท auditing ยท testing-capabilities ยท migrating-existing-tools

Reference โ€” API contracts (U, I) โ€‹

core ยท metadata ยท runtime ยท events ยท errors ยท configuration

Project (I) โ€‹

DocAnswers
implementation/briefThe definitive build instructions for the coding agent
implementation/milestonesM1โ€“M9 increments with acceptance criteria
open-questionsEvery unresolved decision, in one place
roadmapWhat's v0.1, what's later, what's never
faq ยท glossaryQuick answers ยท enforced terminology
contributing/Dev setup, docs style, releases, governance

Reading paths โ€‹

Independent community project โ€” not affiliated with or endorsed by the oRPC maintainers.