v0.1 · open source · MIT

One contract,
every agent surface.

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/server

A capability layer, not an agent framework — unopinionated about orchestration, prompts, and memory.

Stop re-implementing the same capability N times.

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.

Contract-first by design

The pure contract ships anywhere. The handler stays server-side. Surfaces are adapters.

contracts/products.ts
// 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/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
// 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)

Every surface, one source

Each adapter is independently installable — add only the surfaces you use.

MCP

stdio + Streamable HTTP, OAuth 2.1

Vercel AI SDK

typed tool() definitions

OpenAI

Chat + Responses tool specs

HTTP

fetch handler + discovery

CLI

one subcommand per action

Typed client

browser-safe, + React hooks

The headline feature

Know how agent-ready you are.

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.

How the score works
terminal
$ npx agentora doctor
  ✓ products.search   ready
  ⚠ invoices.create   no permission hook
  ✗ accounts.delete   no idempotency key, unbounded concurrency
  Agent-readiness: 72/100

Nine packages. Install what you need.

@agentora/core@agentora/server@agentora/mcp@agentora/ai-sdk@agentora/openai@agentora/http@agentora/client@agentora/cli@agentora/doctor

Frequently asked questions

Is agentora an agent framework?

No. 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.

What does “one contract, every surface” actually mean?

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.

Do I have to install all nine packages?

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.

Can contracts ship to the browser?

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.

What is the doctor?

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.

Make your capabilities agent-ready by construction.

One typed contract, every surface, and a readiness score you can gate in CI. Open source under MIT.