Chapters

OpenCuna and Cuna documentation

Start here#

For developers who want an agent to do real work on their code, and to see what it did.

  • OpenCuna — a coding agent you run in your terminal.
  • Machines — cloud computers you start and stop.
  • The record — what happened in each machine session.
  • Inference — models by the token, for any OpenAI-compatible client.

Let your LLM explain it

Copy a short brief, paste it into ChatGPT, Claude or the assistant you use, and ask it anything about OpenCuna and Cuna.

Quickstart#

Two ways in. Use OpenCuna from your terminal, or use the console in your browser with nothing to install.

From your terminal

Install OpenCuna, choose a model provider, and type opencuna. Connect your Cuna account when you want memory or the cloud commands. The full steps are in chapter 03.

From your browser

Open the console and put an agent to work in four steps.

  1. Sign in

    New accounts join a waitlist. Your place is saved, and we'll email you when a workspace is ready.

  2. Create a machine

    Pick an agent and a size, then start it. See chapter 04.

  3. Open it

    Every machine opens on its Terminal tab. Pick or start a session there and type into it.

  4. Read the record

    See what happened: each session start, pause and stop, each command Cuna runs in it, each checkpoint. Entries are written as they happen.

OpenCuna#

OpenCuna is Cuna's coding agent for your terminal. It reads and edits the code in your folder and runs commands, with your permissions. It is not a security sandbox: it can do anything your user can.

Install it, choose a model provider, and type opencuna. Connect your Cuna account when you want memory or the cloud commands.

  • @cuna_labs/opencunaThe npm package. The scope is spelled with an underscore.
  • opencunaThe one command it installs.
  • ^22.17.1 || ^24.4.1Node.js on your PATH. The opencuna command is a Node script that starts the program. Check yours with node --version.
  • Windows, macOS, LinuxWindows x64, macOS arm64 and x64, Linux x64 and arm64 (glibc 2.35 or later). The macOS builds are not signed.
  • first runThe first run needs internet and uv, which you install yourself. OpenCuna uses uv to set up its own Python runtime; you do not need Python installed.

Install and start

install
$ npm install -g @cuna_labs/opencuna
  1. Choose a model provider

    The first time you run opencuna, it asks you to choose the provider whose model will answer, and to sign in to it or paste its key.

  2. Start working

    Run opencuna in the folder you want to work in, and tell it what to do.

  3. For memory and cloud: have a Cuna account

    Create one at getcuna.com.

  4. For memory and cloud: connect it

    Run opencuna login and approve it in your browser. Or set CUNA_API_KEY to an account key, cuna_sk_…, from API keys in the console.

What you type

The commands you need first. opencuna --help lists them all.

opencuna claude and opencuna codex start that agent on a Cuna machine, so Machines and its cap on active machines apply.

Start and sign in

  • opencunaStart the agent in this folder.
  • opencuna loginConnect your Cuna account, for memory and the cloud commands. You approve it in the browser.
  • opencuna whoamiShow how OpenCuna is connected to your Cuna account. Never prints a secret.
  • opencuna logoutSign out of your Cuna account.

Memory

  • opencuna memoryShow whether memory is on, the project, and the service state.
  • opencuna memory onTurn memory on for this folder. Asks for your consent the first time.
  • opencuna memory showPrint what the agent is given at the start of a session, with the id of each item.
  • opencuna memory forget <id>Remove one item from what the agent remembers.
  • opencuna memory exportSave this project's memory to a .tar.gz file.
  • opencuna memory offTurn memory off everywhere.

Sessions and help

  • opencuna -cContinue the previous session.
  • opencuna sessionsShow your agents, what they are doing, and their usage.
  • opencuna model listList available models.
  • opencuna doctorInspect background services, and clean them up with --fix.
  • opencuna help <command>Show the help for one command.

Memory

OpenCuna can remember what you teach it, across sessions, for each project: how you build and test, your conventions, your decisions. A new session is given the project's memory when it starts: a bounded part of it, and only when the service answers. Memory is off in subagent sessions, and sessions already open stay off until you type /memory on in them.

  1. Turn it on

    In your project folder, run opencuna memory on. The first time, it asks which project and for your consent.

  2. See it

    opencuna memory show prints what the agent is given, with the id of each item. The console shows your memory too.

  3. Forget an item

    Ask the agent to forget it. To use the command, run opencuna memory forget <id>; the id is in opencuna memory show. The item is removed from what the agent remembers. The change history, backups and stored session summaries can still keep the text, and so can an earlier export, your session transcripts and a session that is already open.

  4. Export or turn it off

    opencuna memory export saves every item in memory to a .tar.gz file. opencuna memory off turns it off everywhere; what is already stored stays.

Sent to Cuna: what you ask it to remember, project facts the agent decides to keep while it works, the search text when it looks something up, and short summaries when a long session is compacted. Summaries can quote small parts of your code. Not sent: your files as files, your keys, or your settings. When Cuna consolidates memory, the text is processed by an AI model outside Cuna.

Cuna Memory uses your Cuna account, never your model-provider key. Before anything is saved to memory, OpenCuna removes text that looks like a credential; this is pattern-based and cannot catch every secret.

Machines#

Give the agent its own computer, not yours. A machine is a cloud computer of your own, with its own files, tools and clock. You create it, choose the agent, open it, and stop it when the task is done.

  • OpenCodeThe open coding agent. Provider setup runs inside the machine; Cuna never copies your local provider credentials into it.
  • Claude CodeAnthropic's coding agent. Sign in with Claude after creation, or bring an API key.
  • Codex CLIOpenAI's terminal coding agent. Sign in with ChatGPT after creation, or bring an API key.
  • a clean machineJust the environment — bring your own agent. Nothing to authenticate.
  • OpenClawAnthropic-compatible, API key only — there is no interactive sign-in for it.

There is a small cap on how many machines can be active at once. Creating one more while the others are starting, running, paused or suspended is refused, and the message tells you the limit. Stop or delete one first.

Choose what the machine may reach on the network when you create it: everything, or a list of up to 128 hosts. The runtime that hosts the machine enforces that list, the same boundary as the machine’s isolation.

Machine credentials live in a separate, provider-backed store. The console lists them by name without showing the stored value again.

Size it up to 2 vCPU and 4 GiB. You can publish a port when you create it; the console takes the number and does not yet give you an address for it.

  1. Create & open

    A plain machine starts in seconds. Publishing a port makes it slower and less predictable — allow a couple of minutes. Then open it in your browser.

  2. Pause, resume

    Pause a machine to hold it; resume it when you return. A machine with no agent pauses itself when idle.

  3. Stop, start

    Stop it to free the compute; start it again anytime.

  4. Delete

    Remove the machine for good. The record of what it did remains.

Inferenceproduction#

Keep the OpenAI-compatible client you already use. Point it at Cuna Inference and pay by the token. The model is chosen per request, so one key reaches every model on the sheet; a key is never bound to one model.

Models

These are the models the endpoint serves, priced in USD per million tokens. Throughput is approximate and moves with the prompt, the load and the hour. The full sheet is on the inference page.

  • GLM-5.2Context 1M · Coding + reasoning · Z.ai's flagship, served lossless · in $1.00/M, cached —, out $4.00/M
  • Kimi K3Context 1M · Reasoning · Vision · Moonshot's 2.8T hybrid MoE · in $2.50/M, cached —, out $12.50/M

Keys

An inference key opens the completions endpoint and nothing else. It cannot read your account, mint another key, or reach the console. A console session is the mirror: it manages keys and never spends against one directly.

The console also issues account keys, cuna_sk_… (used by OpenCuna and the SDKs). You see the key once, when you create it; Cuna keeps only a hash. Choose an expiry — 30, 90 or 365 days, or never. You can hold 10 active keys at a time; revoking one, or letting it expire, frees its slot. Revoking is final: it refuses the next request and does not stop one already in flight.

An inference key, cuna_ik_…, is a different credential. You create it in the console, and it spends inference credit up to your limit.

any OpenAI-compatible client
OPENAI_BASE_URL=https://inference.getcuna.com/v1OPENAI_API_KEY=cuna_ik_...

Get started

  1. Sign in

    Sign in to the console. If your account asks for onboarding, finish it first.

  2. Add credit

    Open Payments and add prepaid inference credit.

  3. Create a key

    Create an inference key on API keys, then use it with the base URL above and a model from the sheet.

Credit is used by the token. Requests depend on your balance, your key limits and available capacity. The API covers model listing and Chat Completions, streaming included. No Cuna SDK is needed, and the SDK source previews below are separate from this service.

The record#

Know what happened in a machine without guessing. The record lists each session event, in order.

When you start, pause, stop or delete a machine, Cuna saves a record entry before it reports success. If that entry cannot be saved, you get a failure, not a success. History shows those events and how each one ended.

Traffic that reached a published port is recorded too, but without that guarantee: a request can arrive while its record write fails. Read port rows as a good sign, and lifecycle rows as the account.

History offers these filters: Created, Started, Command, Paused, Resumed, Stopped, Deleted, Checkpoint, Error, Request, WebSocket. The console also names reservation, reconciliation, usage and credential events, which need not have their own filter. Kinds it does not recognise appear as Other; the event text identifies the machine or account event in History.

The record does not store content: no command text, file paths, URLs or bodies. A sample:

the record
Started     claude-code · 2 vCPU · 4 GiBCommand     Command execution completed · exit 0 · 1.4sCheckpoint  Checkpoint createdPaused      Session pausedStopped     Session stopped

The record covers your whole account. Each machine's Activity tab shows the part for that machine, labelled Pulled live from The Record for this machine. It is a view of the record, not a list of running processes.

SDK source previewsource open#

Want to build on Cuna from code? The SDK source is public to read, but not yet released to install.

Cuna's TypeScript and Python SDK repositories are public. Their release gates are real and currently red: both record a blocked release decision. Both clients default to https://api.getcuna.com and accept one legacy origin beside it. They do not embed the Cuna backend or its credentials; a key reaches them only through the environment.

  • @cuna_labs/sdkTypeScript ESM client for Node.js 22+. The source is public; nothing is published under this name on npm yet.
  • cuna-sdkPython 3.10+ synchronous and asynchronous clients. The source is public; no PyPI distribution is published yet.

the brief for your LLM

Explain OpenCuna and Cuna to me in plain words, then answer my questions; send me to https://getcuna.com/docs for detail. Use only the facts below. If a fact is not here, say you do not know and point me to the docs. Do not promise anything listed under "not yet".

My situation: [what I build, my stack, what I want an agent to do]

WHAT THEY ARE
- OpenCuna is Cuna's coding agent for the terminal. One command: opencuna.
- Cuna runs coding agents on cloud machines that I start, size and stop, and keeps a record of each session.

OPENCUNA
- It reads and edits the code in my folder and runs commands, with my permissions. It is not a security sandbox: it can do anything my user can.
- Steps: Install it with: npm install -g @cuna_labs/opencuna. Then I run opencuna; the first time it asks me to choose a model provider and sign in to it or paste its key. Then I run opencuna in the folder I want to work in. I connect my Cuna account only when I want memory or the cloud commands.
- Requirements: Windows x64, macOS arm64 and x64, Linux x64 and arm64 (glibc 2.35 or later; the macOS builds are not signed). Node.js ^22.17.1 || ^24.4.1 must be on PATH, because the opencuna command is a Node script. The first run needs internet and uv, which I install myself; OpenCuna uses uv to set up its own Python runtime, so I do not need Python installed.
- Connect the Cuna account (for memory and the cloud commands): I need a Cuna account (https://getcuna.com); then I run opencuna login and approve it in the browser. Or set CUNA_API_KEY to an account key (cuna_sk_) from API keys in the console. An inference key (cuna_ik_) is refused. opencuna whoami shows how I am connected.
- /login inside a session connects a model provider; opencuna login in the shell connects the Cuna account. They are different.
- opencuna claude and opencuna codex start that agent on a Cuna machine, so the machine rules and the cap on active machines apply. opencuna --help lists every command.
- Commands: opencuna, opencuna login, opencuna whoami, opencuna logout, opencuna memory, opencuna memory on, opencuna memory show, opencuna memory forget <id>, opencuna memory export, opencuna memory off, opencuna -c, opencuna sessions, opencuna model list, opencuna doctor, opencuna help <command>.

MEMORY (needs a connected Cuna account; if the account is not enabled for it yet, OpenCuna says so)
- OpenCuna can remember what I teach it, across sessions, per project (how I build and test, conventions, decisions). A new session is given the project's memory when it starts: a bounded part of it, and only when the service answers. Memory is off in subagent sessions, and sessions already open stay off until I type /memory on in them.
- opencuna memory on in the project folder turns it on; the first time it asks which project and for consent. opencuna memory show prints it, with the id of each item. The console at https://app.getcuna.com shows it too. opencuna memory export saves this project's memory to a .tar.gz file; opencuna memory off turns it off everywhere.
- Sent to Cuna: what I ask it to remember, project facts the agent decides to keep while it works, the search text when it looks something up, and short summaries when a long session is compacted. Summaries can quote small parts of code. Not sent: my files as files, my keys, or my settings. When Cuna consolidates memory, the text is processed by an AI model outside Cuna.
- Cuna Memory uses your Cuna account, never your model-provider key. Before anything is saved to memory, OpenCuna removes text that looks like a credential; this is pattern-based and cannot catch every secret.
- To forget an item I ask the agent; the command is opencuna memory forget <id>, with the id from opencuna memory show. The item is removed from what the agent remembers. The change history, backups and stored session summaries can keep the text, and so can an earlier export, my session transcripts and a session that is already open.

CUNA CONSOLE
- New accounts wait for approval before they get a workspace; nobody is told their place in the queue.
- At https://app.getcuna.com I create a machine, pick an agent (OpenCode, Claude Code, Codex CLI, a clean machine or OpenClaw; OpenCode is the default), size it up to 2 vCPU and 4 GiB, and open it in the browser on its Terminal tab.
- I pause, resume, stop, start and delete it. Nothing runs on its own. A machine with no agent pauses itself when idle. There is a small cap on active machines; the refusal message states it.
- The record: machine lifecycle events (started, paused, stopped, each command Cuna runs in the session, each checkpoint) are written as they happen. Content is not stored: no command text, file paths, URLs or bodies.

CUNA INFERENCE (in production)
- https://inference.getcuna.com/v1: model listing and Chat Completions, streaming included, through any OpenAI-compatible client. The model is chosen per request; a key is never bound to one model.
- I add prepaid credit in Payments and create a cuna_ik_ key in API keys, in the console. Requests depend on credit, key limits and capacity. The key is for inference only. Account keys (cuna_sk_) are a different credential, used by OpenCuna and the SDKs.

NOT YET
- A supported public API for managing machines.
- Registry releases of the SDKs. The TypeScript and Python SDK source is public at github.com/Cuna-Labs/cuna-lib-ts and github.com/Cuna-Labs/cuna-lib-py; their release gates are red, nothing is on PyPI, and the npm SDK name is only a reservation.

LIMITS
- Cuna does not check that an agent's output is correct.
- A machine works in plaintext; the platform operator can see its contents.
- Two sessions in one machine share its ports and resources.

DOCS
- Start here: https://getcuna.com/docs#start-here
- Quickstart: https://getcuna.com/docs#quickstart
- OpenCuna: https://getcuna.com/docs#opencuna
- Machines: https://getcuna.com/docs#machines
- Inference: https://getcuna.com/docs#inference
- The record: https://getcuna.com/docs#the-record
- SDK source preview: https://getcuna.com/docs#roadmap