nanocodexyz/nanocode

SDK for Frontier Embedded Agents.

nanocode is a Rust-based toolkit for building AI agents that can run inside other software — a terminal, a server, a web browser tab, a mobile app, or a cloud worker. It provides one shared runtime that works with two well-known AI systems: OpenAI's Codex and Anthropic's Claude, each with its own built-in prompts and tools.

What makes it different (from the README):

  • Durable. Every AI model call and tool call is recorded in a journal. If the process crashes mid-task, the turn can finish anyway — nothing is lost.
  • Code Mode. Instead of the AI making many separate tool calls, it writes a single program that makes all the calls at once. Only the program's final result is fed back into the AI's context, keeping things efficient.
  • Hands. There's no sandbox per session. The agent only touches your laptop, server, or browser tab when a specific call actually needs to — not as a blanket permission.
  • Subagents. A single "cell" can spawn child agents, each with its own durable session, so work can be split up.
  • Any payer. You can pay for usage with a ChatGPT or Claude subscription, an API key, or Machine Payments from a Tempo Wallet.

How you use it:

  • CLI: One command installs it (curl -fsSL https://nanocode.xyz/install | sh), then you run nc.
  • SDK: Add it as a Rust dependency via Git. The same core code is also available as a WebAssembly module for TypeScript, a native library for Swift (macOS/iOS), and a C library for game engines or other hosts.

License: MIT or Apache-2.0 (dual-licensed).

In short: it's a portable, crash-resistant runtime for AI agents that you can embed almost anywhere, with flexible payment options.

Related

  • Project
  • Project
  • Project
  • Project