Define an application capability once as a typed contract, then expose it to MCP, the Vercel AI SDK, OpenAI, HTTP, a CLI, and a typed client — without re-implementing validation, auth, or error handling per surface.
$ npm i @agentora/core @agentora/serverA capability layer, not an agent framework — unopinionated about orchestration, prompts, and memory.
Exposing one capability to agents usually means a CLI command, an HTTP route, an MCP tool, a tool spec, and a typed client — each with its own validation, error shapes, and auth. They drift, and production concerns get re-solved per surface or skipped. agentora derives every surface from a single contract.
The pure contract ships anywhere. The handler stays server-side. Surfaces are adapters.
// contracts/products.ts — pure, isomorphic, shippable anywhere
import { defineContract, s } from '@agentora/core'
export const searchProducts = defineContract({
name: 'products.search',
sideEffects: 'read',
input: s.object({ query: s.string(), limit: s.number().default(10) }),
output: s.object({ results: s.array(productSchema) }),
})// server/products.ts — server-only, imports your DB
import { implement } from '@agentora/server'
export const searchProductsImpl = implement(searchProducts,
async ({ input, ctx, stream }) => {
stream.log(`searching ${input.query}`)
return { results: await ctx.catalog.search(input.query) }
})// surfaces.ts — app stays surface-agnostic; one import each
import { toMcp } from '@agentora/mcp'
import { aiSdkTools } from '@agentora/ai-sdk'
import { toFetchHandler } from '@agentora/http'
export const mcp = toMcp(app)
export const tools = aiSdkTools(app)
export default toFetchHandler(app)Each adapter is independently installable — add only the surfaces you use.
stdio + Streamable HTTP, OAuth 2.1
typed tool() definitions
Chat + Responses tool specs
fetch handler + discovery
one subcommand per action
browser-safe, + React hooks
agentora doctor lints your manifest for what agents actually need — declared idempotency on writes, permission hooks, bounded concurrency, descriptions — and scores it. Wire it into CI to gate readiness.
$ npx agentora doctor
✓ products.search ready
⚠ invoices.create no permission hook
✗ accounts.delete no idempotency key, unbounded concurrency
Agent-readiness: 72/100No. agentora is a capability layer, not an agent framework. It is deliberately unopinionated about orchestration, prompts, memory, and long-running workflows — those stay application-level. Its job is to make the capabilities you already have agent-ready by construction.
You define a capability once as a pure, typed contract. agentora compiles it to a JSON manifest, and every surface — MCP, the Vercel AI SDK, OpenAI tool specs, HTTP, a CLI, and a typed client — is derived from that single manifest. Validation, error shapes, and auth are defined once instead of per surface.
No. @agentora/core and @agentora/server are the foundation; every surface adapter is independently installable. Add only the surfaces you actually expose — installing one never pulls another into your bundle.
Yes. A contract is pure, isomorphic, and zero-dependency — it carries only metadata and input/output schemas, never a handler. It can ship to a browser, an edge runtime, or a separate client repo. The implementation lives server-side and never reaches the client.
agentora doctor is the headline feature: it lints your manifest for what agents actually need — declared idempotency on writes, permission hooks, bounded concurrency, descriptions — and scores agent-readiness from 0 to 100. The score is deterministic and monotonic, and the CLI exits non-zero on any error, so you can gate readiness in CI.
One typed contract, every surface, and a readiness score you can gate in CI. Open source under MIT.