Commissary is a durable, provider-neutral agent runtime for TypeScript. It separates durable Run admission from process-bound execution and keeps Models, Tools, Hooks, and storage behind typed interfaces.
Commissary is in 0.x. Public APIs can change between minor releases.
| Package | Purpose |
|---|---|
@commissary/core | Provider-neutral Agent, Model, Tool, Hook, and Runtime APIs |
@commissary/store | Typed persistence, SQL Record, and SQL Store contracts |
@commissary/store-memory | Process-local Thread Store for tests and local development |
@commissary/drizzle | Connection-free PostgreSQL, MySQL, and SQLite definitions |
@commissary/effect | Effect client adapters and the Effect AI bridge |
@commissary/stream | JavaScript and Effect execution stream adapters |
- Node.js 22.14 or later
- The current stable Bun
- The current stable Deno
- Modern browsers
- Cloudflare Workers
Repository development requires Node.js 22.14 or later and pnpm 11.16.
Install the core runtime and the development Thread Store:
pnpm add @commissary/core @commissary/store-memoryCreate and execute one Agent Run:
import{Agent,Content,Model,commissary}from"@commissary/core";import{MemoryThreadStore}from"@commissary/store-memory";constmodel=Model.define({id: "example-model",async*invoke(){yield{type: "finish",response: {message: {role: "assistant",content: [Content.text("Hello")]},finishReason: "stop",},};},});constagent=Agent.define({id: "example-agent",fragments: model});constapp=commissary({threadStore: MemoryThreadStore.make()});constthread=awaitapp.createThread();constbranch=awaitapp.createBranch({threadId: thread.id,name: "main"});constclient=app.agent(agent);constcreated=awaitclient.createRun({threadId: thread.id,branchId: branch.id,message: {role: "user",content: [Content.text("Start")]},});if(created.type==="accepted"){constexecution=awaitclient.execute(created.runId);console.log(awaitexecution.result);}MemoryThreadStore is not durable. Production hosts must provide a durable Thread Store adapter.
pnpm run bootstrap
pnpm run verify
pnpm run build
pnpm run check:imports
pnpm run smokePackage changes must include a Changeset:
pnpm changesetSee CONTRIBUTING.md for the full contribution process.
Maintainers can use the release setup and bootstrap guide for the first npm publication and remote repository settings.