Installation
Install Noir, choose the optional peers your stack uses, and verify the runtime before wiring a provider.
Noir is a TypeScript library and CLI. It runs inside your process and does not require a Noir account, hosted dashboard, or control plane.
Requirements
- Node.js 22.18 or newer
- an ESM TypeScript or JavaScript project
- one channel adapter for message ingress and delivery
- a model only when Noir owns the model loop
Install the core
npm install @noir-agent/agentNoir has optional peer integrations. Install only the ones used by your code:
npm install ai @openrouter/ai-sdk-provider
npm install zod
npm install @modelcontextprotocol/sdkThe postgres driver ships with Noir because the included durable stores use it. Passing a database URL or SQL client remains explicit; importing Noir does not connect to a database.
Create the smallest agent
import { defineAgent } from '@noir-agent/agent'
import { slack } from '@noir-agent/agent/channels/slack'
export default defineAgent({
id: 'hello',
channels: { slack: slack() },
async handle(message) {
return `You said: ${message.text}`
},
})Set the credentials used by the Slack adapter:
export SLACK_BOT_TOKEN=xoxb-...
export SLACK_SIGNING_SECRET=...Then run the local server:
npx noir dev ./agent.ts --port 3000The Slack webhook is http://localhost:3000/webhooks/slack. Expose it through your preferred tunnel while developing.
Verify the setup
npx noir doctor ./agent.ts
npx noir inspect ./agent.tsdoctor checks loadability and configured health checks. inspect prints the assembled agent surface without starting the worker. Construction itself performs no model, channel, or database request.
Package boundaries
Use the root import for core types and constructors. Optional surfaces have stable subpaths so the dependencies in an agent file remain obvious:
import { noir, tool } from '@noir-agent/agent'
import { slack } from '@noir-agent/agent/channels/slack'
import { posthog } from '@noir-agent/agent/connectors/posthog'
import { supermemory } from '@noir-agent/agent/memory/supermemory'
import { sandbox } from '@noir-agent/agent/sandbox'There is no global setup call. Create an agent, export it, and let the CLI or your host call its runtime methods.