Skip to main content
You write a 12-line agent, run it against replicas of Slack, GitHub, Datadog and PagerDuty, then break it on purpose and read how Ancha explains the failure. It takes about five minutes and needs no account and no API keys.

Before you start

  • Node.js 24 or later, with npm. Check with node --version.
  • macOS or Linux.

Run your first test

1

Install the CLI

The second command prints 0.1.4. To try Ancha without installing it, replace ancha with npx -y @ancha-labs/cli@0.1.4 in every command on this page.
2

Create a project and an agent

Save this as agent.mjs. It reads one thing from each tool with the URLs and fake credentials Ancha puts in its environment:
agent.mjs
3

Set up the project

Output
init writes ancha.yaml, a starter scene in scenes/starter/, instructions for coding agents and .ancha/ in .gitignore. It installs nothing and runs nothing. With a package.json that has a start script, you can leave out --agent. See ancha init for the full list of files.
4

Check the setup

Output
doctor runs your agent once and confirms it reached each tool.
5

Run the test

Output
The command exits with code 0. The first line says where the worlds ran, here on a server the command started. The starter scene has four checks, one per tool, and each requires a call to that tool. The environment line says the agent got Ancha’s variables plus a small base set from your shell, and nothing else.

Break it and read why

1

Remove the PagerDuty call

Output
The command exits with code 1: a check failed.
2

Explain the failure

Output
Each failed check shows what was expected, what happened and the calls the agent made, in order. The next line gives the commands that follow.
3

Save the failing run as a baseline

4

Fix the agent and prove the fix

Output
Exit code 0 means every check passed and no scene and no check got worse than the baseline.

Test your own agent

Point agent.command in ancha.yaml at the command that starts your agent, or let ancha init take it from your package.json, Procfile, pyproject.toml or Dockerfile. Your agent must read tool addresses and credentials from the environment variables Ancha sets. ancha connect <tool> prints the SDK settings for a tool:
Output
If your agent needs a key from your shell, such as OPENAI_API_KEY, list its name under agent.pass_env in ancha.yaml. Apart from a base set such as PATH and HOME, Ancha withholds the rest of your shell from the agent. See ancha run. The starter only proves your agent can reach each tool. Replace it with a scene that checks real work. Test a Slack bot walks through one.

Next steps

For coding agents

Hand this loop to Claude Code, Codex or Cursor.

Write a scene

Tools, starter data, a task and checks in one YAML file.

Checks

State, trace and judge checks.

Hosted workspace

Run the same worlds in your private workspace at app.ancha.io.