Install
built on Clatter Core

agent.
One toolkit for the whole agent.

agent is not a wrapper around a model API. It is a CLI, a terminal UI and a universal runtime — one install, one mental model, from the first scaffold to production.

$ curl -fsSL https://agent.clatterlabs.com/agent | sh
sh / bash · installs ag + agent

Two surfaces, one SDK

ag <command>

The CLI

Scaffold, run, bundle, deploy, diagnose. Twenty commands grouped into surfaces, build, ship, ops and core — with a help screen you can actually read.

ag tui

The TUI

A full-screen terminal user interface: workspace panel, agent loader, live chat, tool catalogue, traces and history. Runs over plain SSH.

One file. Real agent.

defineAgent declares tools, memory, model and guardrails. Everything else — the REPL, the IDE, the bundler, the trace log — reads that single definition.

defineAgentdefineToolmodel()createMemory()sandbox()hooks
Then
$ ag dev
==> support-bot (agt_9f2a41c0e7) ready
you › refund order 4192
agent › Refund issued for order 4192 (USD 39.00).
        842ms
agent.mjs
import { defineAgent, defineTool, model } from "~/.agent-sdk/lib/sdk.mjs";

defineTool("refund", async ({ orderId }) => billing.refund(orderId));

const llm = model({ model: "gpt-4o-mini" });

export default defineAgent({
  name: "support-bot",
  tools: ["refund", "search"],
  guardrails: { network: ["api.stripe.com"], writes: false },
  handler: async ({ message, tools }) => {
    const ctx = await tools.search(message);
    return llm.complete([
      { role: "system", content: "You are a support agent." },
      { role: "user", content: JSON.stringify({ message, ctx }) },
    ]);
  },
});

Why it holds up in production

Universal runtime

One agent definition compiles to Node, Bun, Deno, Vercel, AWS Lambda, Cloudflare Workers, Fly, Docker, Kubernetes and bare metal.

Traceable by default

Every run is captured with an id, duration, input and output. Replay, diff and rewind or from `ag trace`.

Sandboxed tools

Filesystem, network and shell tools carry per-tool allowlists. Paths are jailed to the working directory.

Instant loop

No containers, no queues, no cloud round-trip while you build. Hot-reload the agent module and message it again.

MCP native

Register any Model Context Protocol server, stream JSON-RPC over HTTP or SSE, and route prompts to the best matching tool.

Built on Clatter Core

agent is the developer surface. Clatter Core is the engine underneath: scheduling, memory, model adapters and sandboxing.

Command reference

Run ag with no arguments for the full grouped help screen. The complete manual ships as a PDF.

ag init <name>buildScaffold a project with config, agent module and env template
ag devbuildInteractive REPL against the local agent, hot-reloaded
ag run <message>buildOne-shot execution, ideal for scripts and CI
ag buildbuildCompile a portable bundle plus a sha256 manifest
ag tuisurfacesFull-screen terminal user interface
ag deploy <target>shipPackage for node, bun, deno, vercel, cloudflare, aws-lambda, fly, docker, k8s
ag mcp add <name> <url>opsRegister an MCP server
ag toolsopsList the built-in tool catalogue
ag traceopsPrint recent run traces
ag doctoropsDiagnose the local installation
ag upgradeopsRe-run the installer in place

The complete manual

Installation, every command, the SDK API, the TUI, MCP, deployment targets and troubleshooting — in one printable document.

Download PDF