Jump to a page
- Getting started
- Adopt a pre-built agent
- The SEO crew
- Capability bundles
- Agent Studio
- AI Studio
- Studio plugins
- Skill store
- Knowledge & tools
- Audiences
- Agent config
- Approval modes
- Model providers
- Task lists
- Attachments
- Sub-org scopes
- Client tools
- @nightowlsdev/core
- @nightowlsdev/hooks
- @nightowlsdev/engine-mastra
- @nightowlsdev/engine-ai-sdk
- @nightowlsdev/engine-a2a
- @nightowlsdev/engine-openai-agents
- @nightowlsdev/engine-trigger-chat
- @nightowlsdev/engine-eve
- @nightowlsdev/react
- @nightowlsdev/theme
- @nightowlsdev/ui
- @nightowlsdev/graph-react
- @nightowlsdev/cli
- @nightowlsdev/mcp
- @nightowlsdev/connectors
- @nightowlsdev/skills
- @nightowlsdev/integration-native
- @nightowlsdev/integration-composio
- @nightowlsdev/mcp-server
- @nightowlsdev/provider-anthropic
- @nightowlsdev/provider-openai
- @nightowlsdev/provider-openrouter
- @nightowlsdev/provider-vercel-gateway
- @nightowlsdev/provider-ollama
- @nightowlsdev/provider-groq
- @nightowlsdev/storage-local
- @nightowlsdev/storage-supabase
- @nightowlsdev/knowledge
- @nightowlsdev/graph
- @nightowlsdev/metrics
- @nightowlsdev/runner-background
- @nightowlsdev/runner-nextjs
- @nightowlsdev/telemetry-core
- @nightowlsdev/telemetry-langfuse
- @nightowlsdev/telemetry-otel
- @nightowlsdev/auth-supabase
- @nightowlsdev/auth-auth0
- @nightowlsdev/auth-jwt
- @nightowlsdev/auth-sessions
- @nightowlsdev/eval
- @nightowlsdev/gepa
- @nightowlsdev/agent-kit
- @nightowlsdev/agent-builder
- @nightowlsdev/agent-researcher
- @nightowlsdev/agent-marketer
- @nightowlsdev/agent-designer
- @nightowlsdev/agent-writer
- @nightowlsdev/agent-seo
- @nightowlsdev/agent-diagnostics
Night Owls reference
A TypeScript framework for building multi-agent swarms. Dependencies flow one way, core to adapters to UI to apps, and the engine stays wrapped behind a stable public API. Below: the long-form guides, then the full module index.
Guides
Long-form walkthroughs for the concepts that span more than one package.
Getting started
Install the framework, define your first agent, and run it locally on just a model key. Then wire model, storage, and runner adapters.
Read the guide →Adopt a pre-built agent
Pull a researcher, marketer, designer, writer, or agent-builder into your swarm: curated skill import, runtime injection, tier config, and approvals, the full journey once.
Read the guide →The SEO crew: read-only analyst, metered researcher
Wire the pre-built SEO crew over the Google Search Console + GA4 connectors: why the read-only analyst and the researcher are two agents, the fail-closed data-tool admission, the five curated skills, metered paid providers, and the three measurement-honesty invariants (anonymised-query incompleteness, quota-as-stop, free-first).
Read the guide →Capability bundles
Package agents, their rules, workflows, and connector grants into one reusable, versioned unit. Compose, publish, apply, and upgrade without clobbering local tuning.
Read the guide →The Agent Studio (experimental)
Mount the experimental <AgentStudio> to manage agent config from the database: roster, full editor, tool and skill grants, audiences, and version history with CAS-safe publish and rollback. Authorization stays server-side; the component is untrusted UI.
Read the guide →The AI Studio
Compose agents, skills, knowledge, tools, and the graph workbench into one operator console with a section registry. A section you don't wire never appears, a section nobody opens costs nothing, and readOnly can only ever narrow what the server already permits.
Read the guide →Ship a studio section with your package
A capability package can bring its own AI Studio section: client, discovery, copy, and UI in one object a host registers in a line. Declare the tier your routes enforce, gate them on the same admin plane the console uses, and keep the plugin's identity stable so the section never remounts under the operator.
Read the guide →The skill store
Browse skill providers behind a policy floor, check for updates without installing them, and import third-party instruction text through a server-issued preview token rather than caller assertions.
Read the guide →Knowledge and tools
Enumerate and delete knowledge sources, ask who holds a capability before revoking it, manage integration connections, and register outbound MCP servers over an HTTP-only table.
Read the guide →Audience-scoped agents
Scope which agents each caller can see and address. AuthContext.audiences is intersected with each agent's audiences, fail-closed across the roster, addressing, resume, and delegation.
Read the guide →Host-facing agent-config surface
List grantable capabilities, read and validate an agent, and apply rules, workflow, memory, and grants per agent over default-deny admin routes with CAS-safe publish. The server-side surface behind the Agent Studio.
Read the guide →Approval modes and the tool risk vector
Annotate a tool with six tri-state risk axes, get one computed danger level, and let the deployment pick manual, auto, or permissive. Composition narrows only, unknown stays unsafe, and a deployment that sets nothing behaves byte-identically.
Read the guide →Model providers and model discovery
Register model providers, list what each one actually exposes, write provider-qualified allow-list entries, and price every run at the provider that ran it. Wire no registry and everything degrades to the shipped free-text field.
Read the guide →Per-conversation task lists
A persisted checklist every agent in a conversation reads as the shared plan and the user can edit at the same time. Compare-and-swap under a lock, server-assigned ids, a restore only a human can reach, and a deterministic nudge when items are still open.
Read the guide →Attachments: let an agent see the file
A user attaches a screenshot or a PDF and the agent actually reads it. Refs cross the wire, never bytes or URLs; you own the bucket and the resolver. Includes what each engine can carry, and the v1 trades — approval and attachments are mutually exclusive within one turn on two of the three engines.
Read the guide →Sub-org scopes: departments inside one org
orgScope partitions knowledge, skills, runs and threads by department inside a single org, without touching the hard org_id boundary. Host-resolved, never a tool argument; reads see their own scope and its ancestors, writes land at exactly one scope, and undefined stays unrestricted so an existing deployment sees no change.
Read the guide →Client tools: let an agent act in the browser
Client tools are tools the model calls but your browser runs: frame a camera, read the selection, upload a file, apply to the live scene. The FR-002 seam (defineClientTool, useClientTools, swarm.client_action) shipped earlier; as of @nightowlsdev/react@2.8.0 you register them with one prop on <SwarmChat>, no raw-hook rebuild.
Read the guide →Every package, documented
Grouped by category. Each page has its install command, key exports, and a usage snippet.
Engine
8 modules@nightowlsdev/core
MastraThe engine core: define agents, skills, tools and swarms, then run them, the @mastra-backed brain behind every Night Owls host.
@nightowlsdev/hooks
The @mastra-free decision-hook substrate: the plain types and dispatcher the platform's billing, approval, and mutation gates hang off.
@nightowlsdev/engine-mastra
The default engine as a named package, a mastraEngine() factory + MastraEngine re-export; installing it changes imports, not behavior.
@nightowlsdev/engine-ai-sdk
The second native engine, a governed ai@^7 streamText loop. Single-agent v1 (no delegation/workflows/semantic recall yet), full HITL + governance, tier-3 events.
@nightowlsdev/engine-a2a
The A2A (Agent2Agent) protocol adapter engine, renders any A2A v1.0 endpoint (Bedrock AgentCore, Azure AI Foundry/Copilot Studio, Google ADK/Vertex Agent Engine) as a single Night Owls agent. Adapter tier: reduced governance, tier-1 events (opaque remote, no tool visibility).
@nightowlsdev/engine-openai-agents
The third native engine, a governed @openai/agents run() loop with full governance (fail-closed tool gate, cost caps, secrets), native handoffs/guardrails. Single-agent v1 (multi-agent handoffs planned v1.1).
@nightowlsdev/engine-trigger-chat
The Trigger.dev chat.agent remote adapter engine, renders a deployed chat.agent Session as a Night Owls agent. Adapter tier: reduced governance, tier-2 events (tool calls visible, no delegation); durable park/resume on the Trigger runtime.
@nightowlsdev/engine-eve
The Vercel Eve protocol adapter engine, renders a running Eve app's NDJSON session as a single Night Owls agent. Adapter tier: reduced governance, tier-2 events (tool calls + usage visible, no delegation); durable park/resume on Vercel Workflows.
UI
4 modules@nightowlsdev/react
Drop-in React + Tailwind chat UI for Night Owls swarms, plus a fully headless hooks layer that renders live run state.
@nightowlsdev/theme
Framework-agnostic design tokens and theme presets for the Night Owls chat/agent UI.
@nightowlsdev/ui
The shared app-chrome kit for Night Owls surfaces: full-page layout (Container/Section), site chrome (NavBar/Footer), primitives (Button/Card/Badge), and a light/dark ThemeProvider.
@nightowlsdev/graph-react
The React workbench for the knowledge-graph plane: search, a force-directed canvas, entity pages, the bi-temporal timeline, and the review queue, with no CSS build step and no d3.
Adapter/Tooling
6 modules@nightowlsdev/mcp
MastraConnect external MCP servers as Night Owls tools, approval-gated, output-fenced, and engine-wall-safe.
@nightowlsdev/connectors
Declare an external service's actions once, materialize them into approval-gated, output-fenced tools, plus event triggers and out-of-band human-in-the-loop over Slack/email.
@nightowlsdev/skills
Browse, import, and refresh external skills (skills.sh, GitHub, https) into storage-backed, versioned, grantable instruction-only skills, third-party guidance, safely fenced.
@nightowlsdev/integration-native
The fully-open DEFAULT IntegrationProvider backend, self-run OAuth, an authed auto-refreshing proxy, provider-direct webhooks, and a minimal poller, with credentials on your own infrastructure (no vendor catalog, no Nango).
@nightowlsdev/integration-composio
The Composio IntegrationProvider backend, the first catalog-owning connector backend: 1000+ apps' tools and triggers come from Composio, which also runs the tool and holds the credentials.
@nightowlsdev/mcp-server
Expose a Night Owls swarm AS an MCP server, ask-only `ask_<agent>` tools, no workflow execution.
Adapter/Model
6 modules@nightowlsdev/provider-anthropic
Anthropic Claude model provider for Night Owls swarms, backed by the native AI SDK.
@nightowlsdev/provider-openai
OpenAI model provider for Night Owls swarms, backed by the native AI SDK.
@nightowlsdev/provider-openrouter
Any model via OpenRouter for Night Owls swarms, using `provider/model` ids.
@nightowlsdev/provider-vercel-gateway
Any model via the Vercel AI Gateway for Night Owls swarms, one key, all providers.
@nightowlsdev/provider-ollama
Run Night Owls swarms on local models via Ollama, no API key, no per-token cost.
@nightowlsdev/provider-groq
Run Night Owls swarms on Groq's fast OpenAI-compatible inference, one API key.
Adapter/Storage
5 modules@nightowlsdev/storage-local
MastraA local LibSQL-backed Mastra snapshot store for the CLI bootstrap runtime, run a swarm on just a model key, before Supabase.
@nightowlsdev/storage-supabase
MastraA Supabase/Postgres-backed StorageAdapter for Night Owls, agents, runs, events, messages, a Realtime event bus, a versioned agent repo, and a durable Mastra store.
@nightowlsdev/knowledge
An optional pgvector document knowledge base, RAG over arbitrary documents (guides, brand voice, reference docs), plus a ready tenant-scoped `search_knowledge` tool.
@nightowlsdev/graph
A bi-temporal, provenance-anchored knowledge graph plane, push any source in and get resolved entities and relations that remember when a fact was true, when you believed it, and who told you.
@nightowlsdev/metrics
A dimensionless, org-scoped metric-series store, `(orgId, orgScope, metric, at, dims) → value` with calendar bucketing and a fully-pinned period-over-period `compare()`, the honest home for numbers that change over time.
Runner
2 modules@nightowlsdev/runner-background
The durable runner for Night Owls, runs a swarm turn in Trigger.dev v4 or Vercel Workflow so an ask-suspended run can park for days and resume across process death.
@nightowlsdev/runner-nextjs
The interactive runner for Night Owls, Next.js App Router routes that authenticate server-side and stream a swarm run to the browser as an AI SDK v7 UI Message Stream.
Telemetry
3 modules@nightowlsdev/telemetry-core
Shared SwarmSpan-to-OpenTelemetry replay engine that the OTLP and Langfuse telemetry adapters are built on.
@nightowlsdev/telemetry-langfuse
Langfuse v5 (OTel-native) telemetry exporter for @nightowlsdev/core swarm runs.
@nightowlsdev/telemetry-otel
OTLP/HTTP telemetry exporter for @nightowlsdev/core that ships swarm traces to any OpenTelemetry-compatible backend.
Auth
4 modules@nightowlsdev/auth-supabase
Stateless Supabase AuthProvider that maps an already-verified Supabase session into a Night Owls AuthContext.
@nightowlsdev/auth-auth0
Stateless, offline-capable Auth0 AuthProvider that verifies access tokens against Auth0's public JWKS.
@nightowlsdev/auth-jwt
Dependency-free JWT primitives (HS256 sign/verify + ES256/RS256 JWKS verify) and signed-session helpers, on node:crypto only.
@nightowlsdev/auth-sessions
A small, pg-backed revocable session store, logout, log-out-everywhere, and admin kill without shortening JWT TTLs.
Quality
2 modules@nightowlsdev/eval
The scoring plane, run an agent over a fixture dataset, score each run's event trajectory, aggregate into a per-version EvalReport.
@nightowlsdev/gepa
A reflective, metric-gated prompt optimizer, reflect on eval feedback to propose better persona fields, keep the best.
Pre-built agents
8 modules@nightowlsdev/agent-kit
The shared foundation for the pre-built agent family: curated skills.sh manifests + governed batch import, fail-loud tool contracts, progressive-disclosure skill-library tools, and persisted-store lifecycle helpers.
@nightowlsdev/agent-builder
The meta-agent that knows the nightowls agent anatomy end to end: researches external skills, drafts + validates agents/bundles, and, behind a rule-enforced human-approval floor, imports skills and publishes definitions.
@nightowlsdev/agent-researcher
Deep research with a fail-loud tool contract: plans sub-questions with stop criteria, searches broad-then-narrow, triages sources primary-first, gap-checks, and delivers a cited synthesis.
@nightowlsdev/agent-marketer
Product-in-market analysis, positioning + ICP, evidence-based competitor profiling, channels as prioritized bets, that asks for what it lacks instead of inventing it.
@nightowlsdev/agent-designer
Design directions you choose from: proposes 2-3 named approaches via the ask tool, then applies the chosen one from an 18-skill curated design library read on demand, impeccable, ui-ux-pro-max, the taste-skill family.
@nightowlsdev/agent-writer
Content + copy craft, tool-less by design: brief-first, on-voice, channel-native, and fabrication-free (a missing fact becomes a [placeholder: …] the human fills, never a plausible invention).
@nightowlsdev/agent-seo
The pre-built SEO crew: a read-only, fail-closed `seo-analyst` and a competitor/SERP `seo-researcher` over the Google Search Console + GA4 connectors, with measurement honesty encoded, not just documented.
@nightowlsdev/agent-diagnostics
The pre-built diagnostics crew: a read-only run `inspector` and an approval-gated `bug-reporter`, so a stalled lane and a vague apology become which call failed, whether it recovered, and a report a developer can act on.