Skip to content
Night Owls.dev
Jump to a page
Documentation

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.

01

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 →
02

Every package, documented

Grouped by category. Each page has its install command, key exports, and a usage snippet.

Engine

8 modules

@nightowlsdev/core

Mastra

The engine core: define agents, skills, tools and swarms, then run them, the @mastra-backed brain behind every Night Owls host.

pnpm add @nightowlsdev/core

@nightowlsdev/hooks

The @mastra-free decision-hook substrate: the plain types and dispatcher the platform's billing, approval, and mutation gates hang off.

pnpm add @nightowlsdev/hooks

@nightowlsdev/engine-mastra

The default engine as a named package, a mastraEngine() factory + MastraEngine re-export; installing it changes imports, not behavior.

pnpm add @nightowlsdev/engine-mastra

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

pnpm add @nightowlsdev/engine-ai-sdk

@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).

pnpm add @nightowlsdev/engine-a2a

@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).

pnpm add @nightowlsdev/engine-openai-agents

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

pnpm add @nightowlsdev/engine-trigger-chat

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

pnpm add @nightowlsdev/engine-eve

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.

pnpm add @nightowlsdev/agent-kit

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

pnpm add @nightowlsdev/agent-builder

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

pnpm add @nightowlsdev/agent-researcher

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

pnpm add @nightowlsdev/agent-marketer

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

pnpm add @nightowlsdev/agent-designer

@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).

pnpm add @nightowlsdev/agent-writer

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

pnpm add @nightowlsdev/agent-seo

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

pnpm add @nightowlsdev/agent-diagnostics