Skip to main content
An agent profile tells Ancha how to start your agent and hand it a task. Profiles are saved in .ancha/ and shared by ancha playground, ancha test and the local console. Every subcommand takes --json.

ancha agent add

Output
Without --container-image, the profile runs the agent as a host process. Playground runs need a container: add --container-image node:24-slim (or another Linux image) and prepare it with ancha agent prepare.

Task input

For a conversation API, --conversation-path creates a conversation first and --conversation-id-field names its ID field.

State

Model provider

--provider is openrouter, openai or anthropic, with an optional --model. The profile stores a reference, never a key:
  • --credential-source env reads the provider’s standard variable, such as OPENAI_API_KEY, from the environment of the CLI.
  • --credential-source file reads OPENROUTER_API_KEY=... from .ancha/openrouter.env. OpenRouter only.
ancha agent inspect <id> reports whether the key is available, without printing it. Model calls can cost money.

ancha agent update

Changes any setting while keeping the agent’s ID and run history.

ancha agent list, show, inspect and remove

Output
remove deletes the profile and keeps its past results.

ancha agent detect

Reads known manifests in a folder, without running code, and suggests settings.

ancha agent prepare

Builds a Linux image of the project with its dependencies, for container runs. It uses a Dockerfile in the project, or a supported Node or Python manifest; Node projects need a lockfile. Run it after add and again when dependencies change. Needs ancha execution prepare first.

ancha agent connect, connection and cancel-connection

connect prepares the agent and checks that it starts, in isolation. A profile whose startup check passed is Connected. One with no safe check is Configured until a real run shows it working. connection shows the progress, and cancel-connection stops it.

ancha agent verify

Output
Checks that the agent starts and becomes ready, using a bundled scenario’s world. It reports tool use and task outcomes separately from startup.

ancha agent run, rerun, scenarios and scenario

Output
Runs scenarios from clean worlds, with up to 10 attempts per scenario and 4 workers. Read results with ancha explain and ancha report, and save the setup with ancha test save.
Output
Keys are bundled:<name> for scenarios shipped with the CLI, compiled:<file>:<name>@<version> for compiled scenario data, and workspace:<path> for scene files in your project.
rerun repeats a run with the same scenarios and data and your current agent code.