# Run staging beside production with namespaces

[Documentation](/docs) · [Project README](https://github.com/Cernanto/cernanto/blob/v0.9.4/README.md)

If your team needs staging beside production on the same plane, give each copy of the project its own namespace. You can give each engineer or team a copy of its own the same way, under the same agent ids. A source names the agents it uses by id and never names a namespace, so you can deploy one workspace unchanged to any namespace on the plane.

Two namespaces stand on every plane and are never removed, `default` and `cernanto`. Commands act in `default` unless you name another namespace for a command or set one in your context. You can deploy and call your first agent without seeing the word _namespace_.

## Deploy a copy into staging

Say your team's `payments/` agents run in `default` for production, where `payments/reconcile` uses `payments/ledger`, and you want to try a change to the matching rules in `payments/reconcile`. Start with `cernanto namespace` to see which namespaces exist and how many agents each holds. A namespace must exist before you deploy into it.

```sh
cernanto namespace
cernanto namespace create staging
cernanto deploy -n staging payments/
cernanto call -n staging payments/reconcile run
cernanto ls -A
```

Nothing in a source says `staging`: `payments/reconcile` names `payments/ledger` by its id, and in `staging` that id leads to staging's own `payments/ledger`. When the change is ready for production, run `cernanto deploy -n default payments/`. Naming `default` sends the deploy there even if your context is set to `staging`.

## Where an agent id leads

`cernanto` holds the platform's agents. Every namespace shares them under `cernanto/`, and `cernanto ls -n cernanto` lists them. A `Uses:` line or a call can reach only agents in the same namespace or those shared agents. An interface's implementor comes from the same two places.

## What each copy keeps

- Each copy has its own **settings and logins**. Staging can use a provider's test account while production uses its live account.
- Each copy keeps its own **memory and journals**.
- A call made in staging shows in staging's **traces**.
- Each copy's **webhook address** ends with its namespace and agent id, as in `.../default--examples--basics--hook` for `examples/basics/hook` in `default`.

## Choose a namespace in the cli

Put `-n <namespace>` after the verb to choose where a command acts. The folder argument in `cernanto deploy -n staging payments/` deploys every agent under `payments/`. To deploy one agent by id, run `cernanto deploy -n staging payments/reconcile`.

`cernanto ls -n staging` lists staging's agents. `cernanto ls -A` lists the agents in every namespace at once. The cli refuses `-A` when the command names an agent.

To keep working in staging, run `cernanto context -n staging`. A bare `cernanto ls` now lists staging's agents. Use `cernanto context -n default` to switch back. When the cli prints a command for you to paste, it includes `-n` whenever a bare command would act elsewhere.

## Namespace names and deletion

A namespace name is one segment of at most 63 characters. Use lowercase letters and digits, with single hyphens allowed between them, as in `team-risk`. A command on a namespace's agents or their logins refuses a name the plane doesn't have, so a mistyped `-n` never reads as an empty namespace. If you type `cernanto ls -n stagin` for `staging`, the error gives you the command that would create the name you typed.

```text
no namespace "stagin" on this plane: cernanto namespace create stagin
```

When you're finished with the staging copy, `cernanto namespace delete staging` removes everything in it. The cli prints a line for each item as it removes the agents and their settings and logins. It removes the namespace name last.

## Namespaces in the web UI

The web UI shows one namespace at a time, named in the top bar beside the plane. The namespace is part of the page's address, so a link opens the same place for a colleague. The selection applies to the whole page.

- The agent list and the Overview show the selected namespace.
- When you open an agent, its settings and logins belong to that copy.
- A draft belongs to the selected namespace and deploys into it.
- The coding assistant's conversation stays in that namespace.

Open the menu in the top bar to see the namespaces with their agent counts, including the platform's `cernanto`. Choose **All namespaces** to list the whole plane, grouped by namespace.

![The namespace menu open in the top bar, on the namespace staging](/screenshots/cernanto-ui-namespace-menu-light.webp)

At the foot of the menu, **+ New namespace** creates a namespace. A delete entry appears directly above it only when you're viewing a namespace someone created. It names the current namespace, as in **Delete staging**. Choosing it asks you to confirm once, on a line of its own that says how many agents will be removed.

The [web UI's guide](/docs/ui#namespaces) has the rest: the page of every namespace, an address that names a namespace the plane doesn't have, and the plane's kind kept for each namespace.

## Namespaces in the plane's API

In the gateway's OpenAPI document, every operation that names an agent accepts `namespace` and uses `default` when you leave it out. The operations that list, such as `ls`, `calls` and `configList`, also accept `allNamespaces`, which answers for every namespace at once and is refused beside a named agent. Every response that names an agent gives its namespace beside its id.

## Limits of a namespace

An agent id never reaches across from one copy of a project to another, so a call in staging cannot reach production by mistake. A namespace is only a name. It carries no quota, network rule or permission of its own, and an operator's token acts in every namespace on the plane. [Running a plane](/docs/running-a-plane#namespaces) says how settings behave under a name the plane doesn't list.

---

Copyright (c) 2026 Cernanto. This document is licensed under the Apache License, Version 2.0.

---

[Release source](https://github.com/Cernanto/cernanto/blob/v0.9.4/docs/NAMESPACES.md) · [HTML page](https://cernanto.com/docs/namespaces)

## Project

[GitHub](https://github.com/Cernanto/cernanto) · [npm](https://www.npmjs.com/package/cernanto)

[About](/about)

## Contact

[Project questions](https://github.com/Cernanto/cernanto/discussions) · [Report an issue](https://github.com/Cernanto/cernanto/issues)

[Licensing](mailto:legal@cernanto.com) · [Security](mailto:security@cernanto.com)

## Legal

[License](/license) · [Patents and trademarks](/license#patents)

[Privacy](/license#privacy)

Cernanto™ · Copyright © 2026 Cernanto
