← 开源

The verifiable coding agent runtime. Define your coding agent's process in natural language with stages, checks, and approval gates instead of hoping it follows your instructions. Primitives for verifiable software factories.

AI EngineeringTest & guardBuild agent workflow (SDK)TypeScript
增长势头
+024 小时新增 Star0.0%
889
Star
120
Fork
+3
本周
34
贡献者
创建于 2025-10-23 · 更新于 2026-12-04 · 今日第 16232 名
主要开发者
README

Atomic

The verifiable coding agent runtime. Build your engineering process as explicit, checkable execution graphs.

Run verifiable engineering loops with control, alignment, and confidence.

Atomic prioritizes verified results over quick replies. Complex runs can take hours or days because Atomic researches, implements, and verifies the work that quick coding-agent passes leave to you.

Engineers using Atomic report less babysitting, fewer code review comments, and less stress. You get work built and verified for production review, backed by evidence instead of another round of manual prompting.

Get started →  ·  How it works  ·  What you get  ·  FAQ  ·  Docs

USED BY ENGINEERS AT

                    

If Atomic is useful to you, star the repository ⭐

Users are reporting:

  • ⚡ A 1 to 1.5 hour reduction in manual verification per task compared to traditional coding agents, not including time saved from fewer follow-up fixes and reverts
  • 🔀 ~95% merge rate on Atomic-generated PRs, with reduced follow-ups and a 0% revert rate
  • 🛡️ Production incidents caught that CI did not cover

Atomic Verifiable Runtime

Every row is a real Atomic session recorded from the installed product. Open the Atomic docs for reference or follow the crash course step by step.

Planner-worker intercom coordination

Separate sessions message each other over intercom to split a job and agree on the answer.

Atomic docs · Intercom

Crash course · 5.3 Planner-worker intercom coordination

Worktree-isolated parallel work

Parallel agents each get their own git worktree, so concurrent edits cannot collide.

Atomic docs · Subagents

Crash course · 5.2 Worktree-isolated parallel work

Escalating to a human supervisor

A delegate that hits a real product decision stops, asks the human supervising the run, and waits for the answer.

Atomic docs · Intercom

Crash course · 5.4 Escalating to a human supervisor

Intercom context handoff

Hand a task to another session with the context attached, instead of pasting it by hand.

Atomic docs · Intercom

Crash course · 5.5 Intercom context handoff

Delegating to bundled specialists

Fan work out to scoped subagents that do the reading, so the main context stays small.

Atomic docs · Subagents

Crash course · 5.1 Delegating to bundled specialists

Context compaction

Compaction clears the context window, and the agent recovers what it needs from session history, <keepContext> spans first and verbatim.

Atomic docs · Compaction

Crash course · 2.2 Verbatim compaction

Explore 19 more Atomic capabilities ↓

Write repeatable procedures as skills. Use codemode to run checks, launch subagents, and bring their results back to the parent chat.

Atomic’s primitives are built for the software engineering lifecycle. Verification is built into the execution model.

Atomic is open so you can inspect and adapt it. You own the workflow, the evidence, and the rules for completion.

Own your intelligence. Build in the open. Question the defaults. Keep control of the process. ☠︎

Works with your engineering stack

Atomic connects through installed CLIs, MCP servers, APIs, scripts, and custom extensions; you supply the credentials and permissions.

Works with your models

See provider setup and the current catalog. Availability depends on your credentials, subscription, region, and the provider catalog; one login does not unlock every provider.

Local and open models

Atomic can run tool-capable models exposed through llama.cpp, Ollama, LM Studio, vLLM, SGLang, Hugging Face, or a compatible OpenAI, Anthropic, or Google endpoint. Actual model and tool support depends on the server and model.

The model-family badges are representative open families, not a closed allowlist. See Models and llama.cpp.


Get started

Follow these steps to install Atomic, sign in to a model provider, and run your first session.

Prerequisites

Before you install Atomic, confirm you have the following:

  • Native installer tools: curl and tar on macOS, Linux, or Windows Subsystem for Linux (WSL), or PowerShell on Windows.
  • Model-provider access: A supported subscription sign-in or an API key.

Install

Install the native binary for your platform, or use a global package manager.

Native install (recommended)

On macOS, Linux, or inside a WSL terminal, run the following command:

curl -fsSL https://raw.githubusercontent.com/bastani-inc/atomic/main/install.sh | sh

On Windows, run the following command in PowerShell:

irm https://raw.githubusercontent.com/bastani-inc/atomic/main/install.ps1 | iex

Confirm that the installation succeeded by opening a new terminal and checking the version:

atomic --version

The command prints the installed Atomic version. If your shell can't find atomic, follow the installer output to add the install directory to your PATH.

If you installed Atomic with npm, pnpm, or Bun, switch to the native installer. For installer flags, updates, and uninstalling, see Install Atomic.

Authenticate and run

  1. Start Atomic in a project directory:

    atomic
  2. Sign in to a provider. Atomic supports browser and subscription sign-ins for OpenRouter, ChatGPT Plus/Pro (Codex), OpenAI ChatGPT sign-in, Claude Pro/Max, GitHub Copilot, Kimi Code, Meta (Muse subscription), and xAI, as well as API-key providers. In the Atomic editor, run:

    /login
    

    Select your provider and follow the prompts. Claude sign-in from a third-party client uses Anthropic extra usage billed per token rather than Claude plan limits. For provider details, see Providers and models. Missing a provider? Open an issue or contribute an integration.

    To authenticate with an API key instead, export the key before starting Atomic:

    export OPENROUTER_API_KEY=API_KEY
    atomic

    Replace the following:

    • API_KEY: Your OpenRouter API key.

    Atomic stores provider credentials in ~/.atomic/agent/auth.json and creates the file with owner-only permissions where the platform supports them. Confirm that your credentials work by running atomic auth check --provider openrouter.

  3. Type a prompt in the editor and press Enter. To try parallel work, ask Atomic to delegate a review and report what each child found.

For non-interactive use, pass -p with a prompt to print the response and exit:

atomic -p "Summarize src/index.ts"

Warning: Atomic has no built-in sandbox or command-level shell permission gate. Tools and extensions run with your user permissions. Run autonomous work inside a devcontainer, VM, or remote development machine, not on a host with sensitive data or credentials.

Advanced installation options

You can also install Atomic as a global package with npm, pnpm, or Bun, though the native installer is recommended. Package-manager installs use Node.js 24.20.0 or newer by default, even if you install with Bun. Run one of the following commands:

npm install -g @bastani/atomic
# or: pnpm add -g @bastani/atomic
# or: bun add -g @bastani/atomic

npm lifecycle scripts aren't required, so you can pass --ignore-scripts. For details, see Package managers.

Devcontainer, terminal, and SDK references

Atomic runs in a standard devcontainer or VM. Pass provider credentials through environment variables; for a Docker example using the native installer, see Containerization.

For terminal tuning, safety controls, and programmatic integration, see Terminal setup, Security, and Programmatic usage.

Bring your skill stack

If you already have agent skills, point Atomic at their directories or copy them into Atomic's project or user skill locations. Atomic implements the Agent Skills standard, so you can reuse configured Claude Code or Codex skill directories without rewriting them. See Use skills from other tools.

You can also run a skill as a workflow by describing its inputs, parallel steps, and required checks. If you have an earlier Atomic workflow definition, ask Atomic to convert it into a skill; the original stays untouched.

Migrating from another coding agent

Atomic publishes an agent-readable llms.txt. Ask your coding agent to run the following prompt:

Install and set up Atomic by following https://docs.bastani.ai/llms.txt.

More Atomic capabilities

Explore the rest of Atomic’s real recorded capabilities, with public docs and crash-course links for each one.

The agent interviews you

ask_user_question replaces the editor with a structured question UI mid-task, and your answers land in the transcript as data.

Atomic docs · Built-in tools

Crash course · 1.3 The agent interviews you

Permission gate extension

A tool_call hook catches a risky shell call before execution and asks the operator to allow or block it.

Atomic docs · Extensions

Crash course · A.2 Permission gate extension

Block a dangerous command

A tool-call hook inspects the arguments and rejects the call before it ever reaches your shell.

Atomic docs · Extensions

Crash course · 3.2 Block a dangerous command

Full-screen TUI tool

An extension can take over the whole screen with its own interactive component, then hand control back.

Atomic docs · TUI components

Crash course · 3.3 Full-screen TUI tool

Embed the agent with the SDK

Drive the same agent loop from your own TypeScript program, with your own tools and your own UI.

Atomic docs · SDK

Crash course · 4.3 Embed the agent with the SDK

Build an extension

Drop a TypeScript file into .atomic/extensions/ and the agent gains a new tool in the running session.

Atomic docs · Extensions

Crash course · 3.1 Build an extension

Write a skill

A SKILL.md file teaches the agent a procedure it loads on demand, in the same format Claude Code and Codex use.

Atomic docs · Skills

Crash course · 3.4 Write a skill

Local models via models.json

Point Atomic at Ollama or any OpenAI-compatible endpoint by declaring it in models.json.

Atomic docs · Custom models

Crash course · 4.2 Local models via models.json

Headless print and JSON mode

-p prints one answer and exits; --mode json streams structured events, so Atomic drops into scripts and CI.

Atomic docs · JSON event stream

Crash course · 4.1 Headless print and JSON mode

Branching with tree, fork, clone

Fork a session at any point and try a second approach without losing the first; /tree shows the whole shape.

Atomic docs · Sessions

Crash course · 2.1 Branching with tree, fork, clone

SQLite and JSONL sessions

Sessions save to local SQLite by default and export or run as append-only JSONL files you can grep, diff, and script against.

Atomic docs · Session format

Crash course · 2.3 Sessions are just JSONL

Your first session

One editor for prompts, @ file references, and ! shell commands, with steering you can type while the agent works.

Atomic docs · Using Atomic

Crash course · 1.1 Your first session

File-based todos

Plans are durable files under .atomic/todos/: plain text you can grep, review, and commit alongside the code.

Atomic docs · Built-in tools

Crash course · 1.4 File-based todos

A handoff command of your own

Package a repeatable handoff as a project-local slash command your whole team can run.

Atomic docs · Prompt templates

Crash course · 5.6 A handoff command of your own

Intercom group isolation

Sessions in different groups cannot message each other; only an explicit read-only group peek crosses the boundary.

Atomic docs · Intercom

Crash course · A.7 Intercom group isolation

Prompt templates with arguments

Project Markdown becomes a slash command with autocomplete hints and positional argument expansion.

Atomic docs · Prompt templates

Crash course · A.4 Prompt templates with arguments

Runtime system-prompt mutation

A live command toggles extension state, and before_agent_start rewrites the system prompt on the next turn.

Atomic docs · Extensions

Crash course · A.3 Runtime system-prompt mutation

Keybindings and hot reload

Every TUI action is remappable in global JSON; /reload applies the map without restarting the session.

Atomic docs · Keybindings

Crash course · A.1 Keybindings and hot reload

Custom theme

Theme the entire TUI from a project-local file and switch to it live with /theme.

Atomic docs · Themes

Crash course · 3.5 Custom theme


How Atomic works

In Atomic, a skill describes a repeatable procedure and the parent session uses codemode to call tools, launch specialist subagents, and check their results. After launching child subagents, the parent can keep working and continue from their completion notices.

Because Atomic is a fork of Pi, it works with the providers, tools, Model Context Protocol (MCP) servers, skills, and extensions already in your Pi stack.

Use direct chat for a small task. For a larger task, tell the parent the scope, how to verify the result, and when to stop. If a repair needs another round, run the check first. Child subagents have persisted, resumable sessions; an interrupted script doesn't automatically replay its actions.

Teams use Atomic for the following kinds of work:

  • Engineering runs: Research, plan, implement, test, review, and release.
  • Debugging and migrations: Reproduce, diagnose, patch, migrate in waves, and verify.
  • Research and triage: Gather context, fan out analysis, classify issues, and synthesize findings.
  • QA, docs, and compliance: Run repeatable checks with evidence and approval points.
  • Custom agent products: Build on Atomic's runtime, SDK, tools, and skills.

Examples

To research a focused part of a codebase, run the research-codebase skill:

/skill:research-codebase how the rate limiter works in src/middleware/

To map a repository-wide change with durable artifacts, delegate to read-only subagents:

Give one read-only agent to each subsystem. Map the old auth middleware call sites, then combine the findings with file and line references.

To run a bounded implementation and review loop, specify the spec, reviewer, and stop condition:

Implement specs/2026-03-rate-limit.md. Have an independent agent review the patch, run the burst test, and stop when it returns 429 with Retry-After or after three repair attempts.

What you get

Atomic combines codemode orchestration, bundled skills, specialized subagents, and shared-storage primitives in one runtime.

1. Codemode orchestration

The parent session can split a task across subagents, collect their results, and decide the next step from an actual check. Use /tasks to inspect running children and /resume to reopen the parent session. For fan-out, independent verification, tournaments, and bounded repair loops, see Orchestration patterns.

2. Skills

Skills are reusable expert instructions and process modules. Atomic can select a skill automatically from its description, or you can invoke it directly with /skill:<name>. The following table lists the 22 bundled skills:

Skill Purpose
agent-browser Automate browser interactions and end-to-end UI checks with agent-browser.
agent-desktop Drive native macOS, Windows, and Linux desktop apps through their accessibility trees with agent-desktop (vercel-labs/agent-desktop, Apache-2.0).
bro Restate the last message in plain human language without jargon.
create-spec Produce a technical execution spec grounded in research and engineer feedback.
feedback Draft, privacy-scrub, and submit Atomic bug reports or enhancement requests.
herdr Control Herdr panes, tabs, workspaces, and agents when running inside Herdr (HERDR_ENV=1).
how Explore a codebase to explain subsystem architecture, runtime flow, and code placement.
impeccable Design, audit, and refine frontend interfaces.
intercom Coordinate parent, child, and peer sessions on the same machine or across a shared database.
liteparse Extract text, tables, and values from PDF, Office documents, and images locally.
no-comments Audit and remove unnecessary comments, fix underlying workarounds, and encode real constraints.
qlty Lint, auto-format, and measure code quality across 70+ linters through the qlty CLI.
research-codebase Analyze a focused area and write a dated research document.
show-me Explain topics visually with concise diagrams, code-shape sketches, and focused HTML artifacts (HumanLayer, MIT).
skill-creator Create, improve, and evaluate reusable skills.
subagent Delegate work through single agents, parallel groups, or forked context.
tdd Apply a red-green-refactor loop and audit test suites.
teach Combine how and why to explain a change or subsystem plainly at your pace.
technical-documentation Write, review, or audit developer docs such as READMEs, guides, API references, CLI help, and release notes, following Google's developer documentation style guide (wondelai/skills, MIT).
tmux Drive and verify terminal applications in tmux (or psmux on Windows).
why Investigate design rationale, trade-offs, and history across source control, issues, and docs.
workflow Organize multi-step work or convert an earlier workflow into a reusable skill.

3. Specialized subagents

Subagents are purpose-built agents with scoped context, tools, and termination conditions. Large, mixed, or growing contexts make attention harder; specialized agents reduce that risk through isolation, focus, tool scoping, and deliberate handoffs, and independent tasks can run in parallel.

The following table lists the nine bundled subagent definitions in packages/subagents/agents/:

Subagent Purpose
worker Implement a bounded task and return a concise result.
codebase-locator Locate files and components relevant to a task.
codebase-analyzer Analyze implementation details.
codebase-pattern-finder Find similar implementations and usage examples.
codebase-online-researcher Fetch current documentation and authoritative web sources.
codebase-research-locator Find relevant prior research in the repository.
codebase-research-analyzer Extract decisions and rationale from local research.
code-simplifier Refine recent code without changing behavior.
debugger Reproduce, diagnose, and verify fixes for failures.

4. Platform capabilities

Beyond the interactive terminal, Atomic provides the following runtime capabilities:

  • Shared session storage (PostgreSQL): Persist sessions and multi-node Intercom across machines and CI runners; see Session storage and SDK session storage.
  • Worktree snapshots, cross-machine resume, and blueprints: Capture repository state alongside session history and rebuild dependencies automatically with .atomic/blueprint.yaml; see Worktree snapshots and Resume on any machine.
  • MCP servers: Connect external tools and data sources over MCP; see MCP servers.
  • Structured decisions: Run typed classifier or chat decisions with decide() and generateStructuredOutput() without starting a full agent turn; see Structured decisions.
  • Compaction and custom compactors: Clear context without a model call by default (Memory compaction), or register custom remote endpoints (Custom compactors and Remote compaction models).
  • Programmatic integration: Embed Atomic through the TypeScript SDK, drive long-lived subprocesses over RPC mode, or stream structured events in JSON mode.

Published packages

All public packages publish on npm under @bastani/atomic* and require Node.js 24.20.0 or later. The following table lists each package and its documentation:

Package Purpose Docs
@bastani/atomic CLI, terminal user interface (TUI), bundled extensions, and TypeScript SDK Docs / SDK
@bastani/atomic-ai Unified LLM client across providers, auth, streaming, tools, and classifiers Library docs
@bastani/atomic-agent-core Stateful agent loop with tool execution, steering, and follow-up queues Library docs
@bastani/atomic-tui Differential terminal UI framework with components, overlays, and key handling Library docs
@bastani/atomic-codemode Sandboxed JavaScript execution for tool scripting Library docs
@bastani/atomic-schema Zero-eval JSON Schema builders and validators Library docs
@bastani/atomic-telemetry Vendor-neutral telemetry contracts, metrics, and trace renderers Library docs
@bastani/atomic-storage-postgres Optional PostgreSQL 16+ storage adapter for shared sessions and Intercom Library docs

@bastani/atomic-natives is an internal N-API native module installed automatically with @bastani/atomic. For details, see Standalone libraries.


Documentation

Full documentation lives at docs.bastani.ai. It covers the CLI and TypeScript SDK, session storage, worktree snapshots, blueprints, MCP servers, structured decisions, security, containerized execution, codemode orchestration, configuration, diagnostics, and provider setup.

The documentation source lives in packages/coding-agent/docs. Open a pull request to suggest a change.

FAQ

This section answers common questions about Atomic's runtime model, scope, and artifacts.

Is Atomic another coding agent?

Atomic includes a coding-agent CLI, and its core is the runtime around the agent session: scoped context, tools, executable checks, subagents, and human approvals.

Why not use Claude Code, Codex, or OpenCode?

Use any interactive coding tool that fits the job. Use Atomic when work needs an explicit process you can inspect, version, resume, and verify. Atomic connects to model providers directly rather than wrapping those tools.

How is Atomic different from products that fan out many agents?

Atomic can fan work out too. The difference isn't whether agents run in parallel; it's whether you control the context, handoffs, evidence, checks, and approval rules around that work. Parallel execution increases throughput, while assurance comes from the process you define and enforce.

Is Atomic deterministic?

Model outputs vary across runs. Put deterministic checks in scripts and inspect their exit status and artifacts before relying on an answer.

Why not Markdown checklists or CLAUDE.md?

A skill is Markdown the model can follow, and it can bundle scripts for checks that prose alone can't run. Reserve product and architectural decisions for human approval.

Why not LangGraph or a generic agent framework?

Atomic is repo-native and focused on software engineering work: issues, research, specs, branches, diffs, tests, lint, artifacts, reviewers, approvals, and handoffs. It provides a coding-agent runtime rather than generic app building blocks.

Where do artifacts live?

Choose project paths for deliverables you want to keep. Research commonly lives in research/ and specs in specs/. A child subagent can return a file path for the parent to read and verify.


Orchestration guide

See Orchestration with codemode and subagents to plan independent work, recover after interruption, and verify results.

Support and ideas

Join the Atomic Discord community for questions, help, feedback, feature ideas, and examples of what you have built.

Contribute

See CONTRIBUTING.md for contribution guidelines and DEV_SETUP.md for development setup and testing.

To share a reusable procedure, see Author skills.

License

MIT. See LICENSE.

Sponsors

Thanks to Namespace for powering our CI/CD pipelines with fast macOS, Linux, and Windows runners.

Credits

Atomic builds on ideas and open-source work from the following projects:

排名相邻
同类项目

AI Rank iPhone 版

随时追踪 AI 模型榜单

在 App Store 下载