Skip to content

Real-provider session

Now you’ll run a session against a real LLM provider. You add a credential to your per-operator config, restart the stack so the daemons pick it up, then dispatch the shipped sample task and watch it complete.

Provider credentials live in ~/.apomesh/env, your per-operator config home. The stack loads that file into both daemons automatically — you never export secrets into your shell.

Pick one of the Anthropic credentials the orchestrator recognizes:

  • CLAUDE_CODE_OAUTH_TOKEN — an Anthropic Max OAuth token (from a Claude subscription). Takes precedence when both are set.
  • ANTHROPIC_API_KEY — an Anthropic Console static key.

Append your choice to ~/.apomesh/env (create the file if it doesn’t exist):

Terminal window
echo 'ANTHROPIC_API_KEY=sk-ant-...' >> ~/.apomesh/env

Optionally set GEMINI_API_KEY as well to route the worker (fast-class) role through Gemini; without it, every role runs on Anthropic. The local stack guide documents the full provider env-var surface.

The daemons read their environment once, at boot, so restart the stack to apply the new credential:

Terminal window
just down
just up

Confirm the orchestrator picked it up:

Terminal window
just logs orchestrator | grep "LLM provider"

You want LLM provider configured from environment. If you instead see no LLM provider configured, the credential isn’t reaching the container — check that it’s in ~/.apomesh/env and not just your shell.

The stack ships a sample coding-assistant task: the project at deploy/local/sample-project/ has an intentional bug in src/calculator.py (its add subtracts), and a test that fails until the bug is fixed. Dispatch it:

Terminal window
just dispatch-sample

This starts a session against the orchestrator at 127.0.0.1:50051 and tails its live events to your terminal. The agent reads the failing test, corrects the bug, runs pytest to verify, and commits the fix.

Lifecycle events stream to stdout as the session runs, and it finishes with a terminal outcome. A successful run reaches the GOAL_MET exit condition — the agent fixed the failing test. You can watch the orchestrator side in parallel with just logs orchestrator.

Take a tour of the operator console.