Skip to main content
Version: pre-release (0.0.1-beta.4)

Introduction

In plain terms: AI agents take actions on their own — searching the web, calling APIs, reading files. This SDK puts a checkpoint in front of those actions so an agent can only do what your rules allow, and so there's a record of everything it did. You add it to an agent built in Node.js with a few lines of code; you don't have to rewrite the agent.

@agent-assembly/sdk is the TypeScript and Node.js SDK for Agent Assembly. It lets you put a governance layer in front of the AI agents you build in Node — so every tool an agent calls is checked against policy before it runs, and every governance-relevant action is recorded in an audit trail.

In practice the SDK is two things working together:

  • A TypeScript client. A small, framework-friendly API — most of the time you call one function, initAssembly(...), and the SDK wires governance into the agent framework you already use (LangChain, and experimentally a few others).
  • An in-process governance shim. A native binding (compiled from Rust with napi-rs) that connects to the Agent Assembly gateway — the service that holds your policies and renders allow / deny / approval decisions. The SDK can even auto-start a local gateway for you so there is nothing to stand up by hand.

You write your agent the way you normally would. The SDK wraps each tool so the gateway sees the call first: if policy allows it, the tool runs; if it denies it, the call throws instead of executing; if it needs a human, the call waits for an approval decision.

Who this is for

  • Developers building agents in Node/TypeScript who need allow/deny enforcement, redaction, or an audit trail without rewriting their agent code.
  • Teams adopting Agent Assembly who want the fastest, in-process interception path — the SDK layer — rather than (or in addition to) the sidecar proxy and eBPF layers.

If you just want to get something running, jump to the Quick Start. If you want to understand how the pieces fit, read Core Concepts.

How the docs are organized

SectionWhat it covers
Quick StartInstall, configure, and govern your first agent — copy-paste.
Core ConceptsThe native FFI, the adapter registry, the initAssembly lifecycle, dual ESM/CJS, modes.
GuidesReal scenarios: LangChain, low-level withAssembly, experimental frameworks, handling decisions & errors.
ConfigurationGateway URL / API-key resolution, every AssemblyConfig field, modes and enforcement.
API ReferenceThe full TypeScript surface, auto-generated from the source.
Compatibility & VersioningNode LTS matrix, supported platforms, core↔SDK alignment, releasing.
TroubleshootingGateway auto-start, the native addon, configuration failure modes.

Beyond this SDK

  • agent-assembly — the core Rust runtime and the home of the protocol specification. Its documentation site is the best place to understand the gateway, the policy engine, and the three interception layers this SDK plugs into.
  • Canonical documentation hub — cross-repo platform documentation and the core↔SDK compatibility matrix.
  • Organization profile — every Agent Assembly repository and its status.