Public betaTypeScript agent SDK + coding CLI

Use and build agents on the same foundation.

Robota provides a TypeScript SDK for AI agents and a coding CLI built from the same public components. Build agents into your app or use the CLI in your terminal. Configure a model endpoint, tools, permissions, and sessions for your task.

Public packages · Node.js 22.12 or later · Model endpoint required

We aim to build agents that can reliably improve the systems they are built on.

01 / The shared foundation

Explore the components and run your first query.

The agent framework brings together sessions, tools, and permission checks. The coding CLI is a maintained interface built on that framework. You can also use the framework in your own Node.js app.

@robota-sdk/agent-frameworkAgent frameworksessions · tools · permissions
@robota-sdk/agent-cliCoding CLIrobota
A shared TypeScript foundation for an SDK you can embed and a CLI you can run in your terminal.
Install the SDK packages
npm install @robota-sdk/agent-framework @robota-sdk/agent-provider-openai
Single TypeScript query
import { createQuery } from '@robota-sdk/agent-framework';
import { OpenAIProvider } from '@robota-sdk/agent-provider-openai';

const model = 'your-loaded-model-id';
const query = createQuery({
  provider: new OpenAIProvider({
    apiKey: 'local',
    baseURL: 'http://127.0.0.1:1234/v1',
  }),
  model,
});

try {
  console.log(await query('Reply with one sentence.'));
} finally {
  await query.shutdown();
}

This example requires a running OpenAI-compatible server and the ID of a model loaded on it. The local port is an example. The 'local' API key is a placeholder for a server without authentication; replace it with your server's credential if needed. A local test of the published packages verified the SDK call and cleanup. The example does not show a real model response.

Inspect the framework source

02 / Coding CLI

Start CLI setup
npx @robota-sdk/agent-cli

You need Node.js 22.12+ and an API key or a running local model server. Provider costs and policies depend on the endpoint you choose.

After configuring a provider and model, enter a prompt:

Reply with one sentence.

The selected model returns a text reply. Its wording and quality depend on the model. Before asking about project files, decide whether to trust the workspace.

Read CLI setup

02 / Choose a first task

Choose how to start.

01

Add a query to your app

Install the framework and a provider adapter, then call createQuery from a Node.js script. Use InteractiveSession when your own UI needs a longer conversation.

Before you run it

You need Node.js 22.12+, a configured provider endpoint, and a model ID. The example on this page uses a running local OpenAI-compatible server.

Read the SDK guide
02

Ask the coding CLI about a project

Run the CLI and configure a provider and model using a hosted API key or a running local endpoint. Decide whether to trust the workspace before the CLI loads project context.

Before you run it

You need Node.js 22.12+ and an API key or a running local model server. Provider costs and policies depend on the endpoint you choose.

Read CLI setup

03 / SDK and CLI capabilities

Available now.

These capabilities are available in the public SDK packages or the coding CLI built from them. Each card lists the relevant packages, classes, flags, or commands and links to the detailed guide.

Models and providers

Choose a model for each task and continue the turn with another model if one fails.

Multi-provider adapters

Use provider packages for Anthropic, OpenAI, Google Gemini, DeepSeek, Qwen, and Gemma. Set baseURL to connect to other OpenAI-compatible endpoints, including gateways, Azure, vLLM, and local servers.

  • Anthropic
  • OpenAI
  • Gemini
  • DeepSeek
  • Qwen
  • Gemma
  • baseURL
Guide

Fallback, effort and advisor

FallbackProvider switches the turn to another model if the primary model is overloaded or fails. In the CLI, you can set model effort for each run and configure an advisor model for the agent to consult.

  • FallbackProvider
  • --fallback-model
  • --advisor
  • --effort
Guide

Local models

Configure a provider profile to use Ollama, LM Studio, or another OpenAI-compatible server on your computer or network. You run the model. The tools you enable determine what other data leaves your system.

  • Ollama
  • LM Studio
  • vLLM
Guide

Image and video generation

Use the Gemini provider to generate images and the separate ByteDance (ModelArk) provider to generate video. The video provider cannot serve as an agent's chat model.

  • agent-provider-gemini
  • agent-provider-bytedance
Guide

Tools and safety

Use typed tools and check every call before it runs.

Validated tools

createZodFunctionTool checks model arguments against a zod schema before your function runs. Built-in coding tools cover files, search, shell, web fetch and web search.

  • createZodFunctionTool
  • Read
  • Write
  • Edit
  • Glob
  • Grep
  • Bash
  • WebFetch
  • WebSearch
Guide

Permission modes and rules

Each tool call is checked against deny, ask, and allow rules, then evaluated under one of five permission modes. Some destructive actions are never approved automatically, regardless of the mode.

  • plan
  • default
  • acceptEdits
  • auto
  • bypassPermissions
Guide

Lifecycle hooks

Run commands when tool, prompt, or session events occur. PreToolUse can block a call. Other hooks can record logs, support audits, or add context to the next prompt.

  • PreToolUse
  • PostToolUse
  • SessionStart
  • UserPromptSubmit
Guide

OS sandbox for shell

Shell commands can run inside bubblewrap on Linux and WSL2 or Seatbelt on macOS, limiting what a command can read, write, or reach on the network.

  • bubblewrap
  • Seatbelt
  • /sandbox
Guide

Workspace trust

Project instructions such as AGENTS.md and CLAUDE.md load only in trusted workspaces. For an untrusted repository, the CLI refuses unattended runs or starts in Restricted mode.

  • AGENTS.md
  • CLAUDE.md
  • --safe-mode
Guide

Sessions and execution

Keep work running after you close the terminal, or divide it among agents.

Saved, resumable sessions

Continue, resume, rename, or fork a conversation. Context usage is tracked and compacted automatically. The SDK host chooses and supplies the session store.

  • InteractiveSession
  • /resume
  • /fork
  • /compact
Guide

Background sessions and daemon

Supervised sessions continue running after you close the terminal. A single workspace daemon provides one runtime for multiple terminals and the desktop app.

  • daemon start
  • --attach
  • session start --background
Guide

Subagents and background tasks

Delegate work to subagents with their own context and tools. Run them in the same process or in child processes, and manage queued and running jobs in one place.

  • /agent
  • /background
  • agent-executor
  • agent-subagent-runner
Guide

Loops, schedules and plans

Repeat a prompt at a set interval, or wake the agent later or when command output matches a condition. Keep the session read-only until you approve its plan.

  • /loop
  • /schedule
  • /monitor
  • /plan
Guide

Checkpoints, memory and cost

Rewind to an edit checkpoint or fork from it. Use opt-in memory to retain approved facts across sessions, inspect context usage, and set a monthly cost limit.

  • /rewind
  • /memory
  • /context
  • /cost
Guide

DAG workflows

Use /workflows to turn a description into a workflow with the active model. Save it as JSON in the workspace, validate it, and run it, with the option to run detached.

  • /workflows create
  • /workflows run
  • .workflows/
Guide

Multi-agent roundtables

Bring independent agents and people into a shared transcript. Choose the turn order, run groups in parallel, and use a Robota session as a participant or selector.

  • agent-roundtable
  • agent-roundtable-robota
Guide

Connect and extend

Bring in servers, skills, and plugins without forking the runtime.

MCP in both directions

After explicit approval, connect to stdio or remote MCP servers, including those that use OAuth sign-in. You can also expose a session as an MCP server over stdio or authenticated HTTP.

  • agent-mcp
  • OAuth
  • /mcp approve
  • mcp serve
  • agent-transport-mcp
Guide

Skills, commands and agents

Define skills and commands in Markdown to make them available as slash commands. Agent definitions describe subagents. The CLI discovers these files in the project and your home directory.

  • .agents/skills
  • .claude/skills
  • .claude/commands
  • /skills
Guide

Plugins and marketplaces

Install plugins that bundle skills, hooks, themes and MCP servers. SDK lifecycle plugins cover history, logging, usage, limits, errors, analytics and webhooks.

  • /plugin marketplace add
  • /plugin install
  • agent-plugin
  • webhooks
Guide

External events

Allow a verified external service to send text events to a running terminal session. View or revoke those permissions from within the session.

  • --external-event-grant
  • /events
Guide

Interfaces

Use the same session from a terminal, script, browser, or protocol.

Terminal UI

An interactive terminal app with a command menu, prompt history search, rebindable keys, file attachments with @path, and a plain-text screen-reader mode.

  • React + Ink
  • @path
  • Ctrl+R
  • --screen-reader
  • keybindings.json
Guide

Print mode and goals

Run a prompt from a script or pipe and receive text, JSON, or streaming JSON. Request output that follows a schema, or let the agent work toward a goal over multiple turns.

  • -p
  • --output-format json
  • --json-schema
  • --goal
Guide

Browser GUI and desktop app

Serve the current workspace GUI on a loopback address and open it in a browser. The desktop app in the repository displays the same GUI through the workspace daemon.

  • --serve --open
  • agent-app
Guide

HTTP and other transports

Let other services submit turns and receive results as server-sent events, protected by a bearer token or OAuth resource server. WebSocket, HTTP, MCP, and WebRTC transports use the same wire protocol.

  • --serve --http-port
  • SSE
  • OAuth
  • ws · http · mcp · webrtc
Guide

Devices and remote control

Message other running sessions, hand a conversation to another session or device, and link your devices. Pair a browser to control a session together over peer-to-peer WebRTC.

  • /peers
  • /handoff
  • /devices
  • /remote-control
Guide

CI and GitHub Actions

Use print mode in a workflow step to review a pull request or respond to a task. Gate the pipeline on an evals-as-code score.

  • GitHub Actions
  • -p
  • eval
Guide

Build your own

Use individual layers directly, or combine them into your own product.

Conversation engine

ConversationAgent runs and streams turns with conversation history, tool calling, structured output, and plugins. The minimum setup is core and one provider.

  • ConversationAgent
  • run
  • runStream
  • structured output
Guide

Framework components

Use createQuery for a single query with built-in tools and permissions, InteractiveSession for a full conversation, and createAgentRuntime to assemble a host runtime.

  • createQuery
  • InteractiveSession
  • createAgentRuntime
Guide

Servers, bots and serverless

Use the framework in an SSE or WebSocket server with a full event stream for each session. Resume a saved session for each bot channel, or use a stateless runtime that stores nothing.

  • createAgentRuntime
  • sessionStore
  • resumeSessionId
  • createStatelessRuntime
Guide

One agent, many channels

TransportRegistry runs one agent definition across multiple transports. A settings file records which transports are enabled. No separate gateway process is needed.

  • TransportRegistry
  • agent-transport-*
Guide

Product composition

Build a product from a declarative profile with assembleProduct. Use the same capability packs, slash-command modules, presets, and output styles as the coding CLI.

  • assembleProduct
  • ICapabilityPack
  • createCodingPack
  • presets
Guide

Ship your own CLI product

Use the published CLI package while controlling your product's entry point, identity, assets, and packaging. It provides a product-bound CLI host, desktop-host helpers for Electron, and native binary builds.

  • agent-cli/host
  • createProductCliHost
  • agent-cli/desktop-host
  • buildProductNativeBinary
Package README

Diagnostics, usage and evals

Check settings, providers, workspace trust, and plugins in one report. Summarize local token usage and cost without sending content, export metrics without conversation content, and run evaluations as code.

  • doctor
  • usage
  • usage export
  • session analyze
  • eval
Guide

04 / The coding CLI

Run an agent in your terminal.

The coding CLI is a maintained interface built on the shared framework. The same runtime supports the terminal UI, scripts, background sessions, browser GUI, and other services.

01

Work interactively

Start a session, choose a permission mode, or switch to a screen-reader mode.

In a shell

  • robota
  • robota --permission-mode acceptEdits
  • robota --screen-reader
02

Script a single prompt

Print mode returns an exit code your script can check. Goal runs continue working over multiple turns.

In a shell

  • robota -p "List the TypeScript files in src/"
  • robota -p "Summarize this repository" --output-format json
  • cat task.md | robota -p
  • robota --goal "make the failing tests pass"
03

Keep sessions running

Resume earlier work, run supervised sessions in the background, and share one daemon.

In a shell

  • robota -c
  • robota -r <id-or-name>
  • robota session start --background --name nightly
  • robota daemon start
  • robota --attach
04

Connect other interfaces and services

Open the browser GUI, accept HTTP clients with a bearer token, or act as an MCP server.

In a shell

  • robota --serve --open
  • PRODUCT_HTTP_TOKEN="$(openssl rand -hex 32)" robota --serve --http-port 8787
  • robota mcp serve
05

Connect to your other sessions

From a session, message other sessions, hand off a conversation, link devices, or pair a browser.

Inside a session

  • /peers
  • /peers send <session-id> <message>
  • /handoff <session-id>
  • /devices init
  • /remote-control enable
06

Check setup and usage

Diagnose configuration, summarize local usage, check for updates, and run evals.

In a shell

  • robota doctor
  • robota usage --period 30d
  • robota --check-update
  • robota eval <definition.mjs>
Read the CLI reference

05 / Permissions and safety

Decide what the agent may do.

Deny, ask, and allow rules are checked before the permission mode is applied. Choose a mode when you start a run or change it during the session.

What each permission mode allows
ModeReadsFile editsShell commands
planYesRefusedRefused, except built-in read-only commands
defaultYesAsksAsks
acceptEditsYesYesAsks
autoYesYesDecided by a model classifier
bypassPermissionsYesYesYes
Rules in a settings file
{
  "permissions": {
    "allow": ["Bash(pnpm *)", "Bash(git status)"],
    "ask": ["Bash(git push *)"],
    "deny": ["Bash(rm -rf *)", "Write(.env)"]
  }
}

Rules take priority over modes

An ask rule still requires approval in bypassPermissions mode. Deleting the root, home, or working directory and writing to .git or tool configuration files are never approved automatically.

No approval response means denial

In default mode, a request that needs approval is denied if nobody responds, unless your host provides a permission handler.

Sandboxed shell

Combine permission rules with the OS sandbox so an approved command still runs with limited file and network access.

Read the permissions and hooks guide

06 / Architecture

Build products on reusable libraries.

The libraries under packages/ are neutral and reusable. The CLI and apps combine them for specific purposes. Each layer depends only on the layers below it.

    • agent-cli
    Product interface: the terminal coding assistant
    • agent-product
    • pack-coding
    • agent-command
    • agent-preset
    Product composition: profiles, capability packs, commands, presets
    • agent-ui-terminal
    • agent-transport-ws
    • agent-transport-http
    • agent-transport-mcp
    • agent-transport-acp
    • agent-transport-webrtc
    Terminal UI and transports using the shared wire protocol
    • agent-framework
    Assembly: InteractiveSession, createQuery, createAgentRuntime
    • agent-session
    • agent-executor
    • agent-tools
    • agent-tool-defaults
    • agent-mcp
    • agent-plugin
    Runtime: sessions, background tasks, tools, MCP client, plugins
    • agent-provider-*
    One provider package per vendor
    • agent-interface-*
    Type-only contracts shared across layers
    • agent-core
    Foundation: the conversation engine and its contracts
Read the architecture guide

Published packages

Every package is published on npm under @robota-sdk/ and shares one version. Start with the smallest set your task needs.

Browse the package index

07 / Install

Choose how to run it.

Published packages need Node.js 22.12 or later. The standalone binary needs nothing else installed.

Run without installing

Fetch and start the latest CLI with npx.

Run without installing
npx @robota-sdk/agent-cli

Install globally

Install the CLI on your PATH with npm.

Install globally
npm install -g @robota-sdk/agent-cli
robota

Standalone binary

The installer picks the binary for your OS and CPU from the latest release and verifies its SHA-256 checksum. Binaries are unsigned, so macOS and Windows may warn.

macOS / Linux
curl -fsSL https://raw.githubusercontent.com/woojubb/robota/main/scripts/install.sh | bash
Windows PowerShell
irm https://raw.githubusercontent.com/woojubb/robota/main/scripts/install.ps1 | iex
See all releases

Embed the minimal SDK

The engine plus one provider package. Add agent-tools when the agent calls tools.

Embed the minimal SDK
npm install @robota-sdk/agent-core @robota-sdk/agent-provider-anthropic

08 / Source and licensing

Review the source and usage terms.

The public source shows how the SDK and CLI are assembled. Start with the packages and code relevant to your task.

Explore the showcase

Open source and commercial licensing

The code is available under AGPL-3.0. A commercial license is also available if you need different terms. Review the license conditions for your distribution or service.

Provider costs are separate

The SDK and CLI do not include model inference. Hosted providers may charge for usage. Running models locally also requires compute and operating costs.

First-party showcase

The coding CLI is a maintained developer tool built from the public components. Explore its source and the current showcase.

09 / Our long-term goal

Our agents develop and improve one another.

This is the project's long-term goal, rather than a promised capability. Today, the SDK and coding CLI let you choose providers, tools, and host behavior explicitly. Reliable autonomous self-development still needs to be demonstrated through actual results as the system evolves.

10 / Before you start

Common questions

Do I need the CLI to use the SDK?

No. Import the agent framework into your own Node.js host and supply a provider. The CLI is one complete interface built from the public components.

Will a query run without configuring a model?

You need a provider endpoint and a suitable model. The local OpenAI-compatible example requires a running server with a loaded model. For a hosted provider, use its credentials and follow its terms.

Does the SDK persist conversations automatically?

No. A createQuery call alone does not create a persistent session. Supply a session store if your host needs to save and resume conversations.

What should I read before enabling tools?

Review workspace trust and permission modes. In default mode, unattended runs deny requests that need approval unless your host supplies a permission handler.

Is the beta API stable?

Not yet. The packages are 3.0.0 beta releases, and the API may change before a stable release. See the changelog for upgrade notes.

Start with a real task.

Add a query to your app or set up the coding CLI. In either case, you choose the provider and access permissions.