> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ancha.io/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> These docs describe the Ancha CLI, npm package @ancha-labs/cli version 0.1.4, and the hosted workspace at app.ancha.io. Coding agents should start at https://docs.ancha.io/coding-agents. Run the CLI as `ancha` after `npm install -g @ancha-labs/cli`, or as `npx -y @ancha-labs/cli@0.1.4` without installing. Pass --json for machine-readable output, or set ANCHA_JSON=1. Every command ends with a `next:` line naming the next command. Exit codes: 0 pass, 1 a check failed or a comparison regressed, 2 usage, config or authentication error, 3 infrastructure error, 4 unimplemented endpoint with --strict.

# Hosted workspace

> What you get when you sign in at app.ancha.io: a private machine with a console, a hosted world server and a container runtime, the private beta for running your own agent there, the monthly hours, and how to use it from the browser or the CLI.

Signing in at [app.ancha.io](https://app.ancha.io/login) gives you a hosted workspace: one private machine that runs a browser console, a world server with the tool replicas, and a container runtime for your agent. Worlds, tests, runs and uploaded code stay on its disk. Running your own agent inside the workspace is in private beta; the rest works for every workspace.

## Sign in

Enter your email at [app.ancha.io/login](https://app.ancha.io/login) and open the sign-in link it sends. The link works in any browser and expires in an hour. The first sign-in creates your workspace. You can set a password under **Settings** to sign in without email. Each email has one workspace, and disposable email addresses are not accepted.

## Your workspace

| Part | What it does |
| - | - |
| Console | The browser interface: agents, worlds, tasks, runs and attempts. |
| Hosted world server | Serves the tool replicas at `https://app.ancha.io/t/<workspace>`, for the console and for the CLI. The URL is under **Settings**. |
| Container runtime | Runs your agent, one container per attempt, when you start runs from the console. Running your own agent here is in private beta: the sample agent runs, and your own agent runs after you request access under **Settings**, **Hosted runs**. |

The machine stops after 30 minutes without traffic. Opening the console does not start it: the console opens as a view of your runs while the machine is asleep, and **Start workspace** starts it. A call to one of its worlds from the CLI, for example `ancha run` with `ANCHA_SERVER_URL` set, also starts it, and that time counts toward the hours. Waking takes seconds. A new workspace gets its machine the first time you start it, and that first start takes a few minutes: it prepares the runtime and runs a sample.

After its first start, a workspace holds a sample agent, the **Support workspace** world (Slack and GitHub with the [starter data](https://docs.ancha.io/concepts/worlds.md#starter-data)) and two sample tasks, already run once.

A workspace has 10 hours of machine time a month. **Settings** shows the hours used. When they are used up, the console shows a banner, the workspace keeps your data, and the machine can start again on the 1st of the next month. Running `ancha run` on your computer is not limited.

## Use it from the browser

1. Open **Agents**, then the sample agent. Its tasks are listed under their world; open a task to see every attempt and the tool calls it made.
2. Choose **Bring your agent** (private beta) and upload the project as `.tar.gz` or `.zip`, or clone a public Git URL. The page prints the folder the code landed in. Until your workspace has access, the console refuses this with `hosted runs of your own agent are in private beta for this workspace`; request access under **Settings**, **Hosted runs**.
3. In **Agents**, choose **Connect agent** (private beta), paste that folder, and give the start command (or the HTTP endpoint your agent serves) and the model provider it calls. Connecting builds the image and checks that it starts. The same access applies.
4. On the agent's page, choose **Add tasks**: pick a world, write the tasks, set how many times each repeats, and add [checks](https://docs.ancha.io/reference/checks.md) as a JSON list so attempts are graded. Then **Run tasks**.
5. Read the attempts. Each attempt runs on a fresh copy of the world. A graded attempt shows **Passed** or **Failed** and each check's expected and actual values. **Activity** is the agent's own output; **Tools** lists every API call with request and response. Pick two attempts of a task and **Compare** them.

Agents running in the workspace reach the tools and their model provider, nothing else. Give them provider keys with [`ancha secrets`](https://docs.ancha.io/cloud/secrets).

The **Runs** page lists the runs the workspace ran and the results uploaded from your computer, and it works while the machine is asleep. Each run opens at `https://app.ancha.io/runs/<run id>`, and **Delete run** removes an uploaded one.

## Use it from the CLI

```bash theme={null}
npm install -g @ancha-labs/cli
ancha login            # approve this computer in the browser
ancha whoami           # the workspace commands use, and where ancha run puts its worlds
cd your-agent
ancha init             # ancha.yaml, a starter scene, coding-agent instructions
ancha run --upload     # your agent and its worlds run here; the results go to your workspace
ancha explain latest
```

After `ancha login`, `ancha run` still runs your agent and its worlds on your computer. The first line of the run says so: `running locally (worlds in a server this command starts; logged in to https://app.ancha.io/t/<workspace>: --upload sends the results there)`. `--upload`, or `ANCHA_UPLOAD=1`, sends the finished run to the workspace, where the **Runs** page shows it at `https://app.ancha.io/runs/<run id>` and **Delete run** removes it; `ancha runs upload latest` sends a run after the fact. See [Results in your workspace](https://docs.ancha.io/cloud/results.md).

To run the worlds in the workspace and point your agent at the hosted tools, set `ANCHA_SERVER_URL` to the workspace's world server, `server.url` in `ancha.yaml` or `--server-url`; `--local` keeps one command on this computer. [`ancha world up --on cloud`](https://docs.ancha.io/cli/world-lifecycle) starts a world in the workspace for your own harness. These uses of the workspace count toward its machine time.

`ancha run --on cloud` runs the whole loop in the workspace: it uploads the project, connects the agent and runs each test there. Running your own agent in the workspace is in private beta; see [Limits](#limits). With a saved login, `ancha agent`, `ancha world create|list|show|update|archive`, `ancha test` and `ancha runs` work on the workspace's agents, worlds, tests and runs, the same ones the console shows; `--local` keeps them on the project's `.ancha/`. See [Login and API keys](https://docs.ancha.io/cloud/login-and-api-keys.md) and [CI](https://docs.ancha.io/cloud/ci.md).

## Limits

* Running your own agent in the workspace is in private beta. Until your workspace has access, **Bring your agent**, **Connect agent** and the `ancha agent` commands that reach the workspace are refused with `hosted runs of your own agent are in private beta for this workspace`. Request access under **Settings**, **Hosted runs**. Runs from your computer, the sample agent, worlds, sandboxes, scenarios, tools and secrets all work.
* A workspace has 10 hours of machine time a month. **Settings** shows the hours used. When they are used up, a call to a world in the workspace answers `this workspace's hosted hours for the month are used up`; run with `--local` until the 1st, when the machine can start again.
* Judge checks run in `ancha run` and `ancha check` only, not in console runs. Console checks are `state` and `trace` checks.
* One workspace per email. There are no teams or shared workspaces.
* Worlds live in the workspace's memory. When it sleeps, live environments end; start a new run.
* API keys are rate-limited. Too many calls return HTTP 429.


## Related topics

- [Changelog](https://docs.ancha.io/changelog.md)
- [CLI overview](https://docs.ancha.io/cli/overview.md)
- [Troubleshooting](https://docs.ancha.io/troubleshooting.md)
- [For coding agents](https://docs.ancha.io/coding-agents.md)
- [Results in your workspace](https://docs.ancha.io/cloud/results.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.