claude or codex is unconfigured: no custom prompt,
adopting its provider’s name, running the raw provider. This tutorial defines a
custom agent with its own role and prompt, then slings work to it.
You should have my-city running with my-project rigged (from
Tutorial 01).
Defining an agent
Each custom agent gets its own directory underagents/<name>/. Start by
creating a rig-scoped reviewer:
agent.toml scopes the reviewer to my-project and switches it from the
city’s default claude provider to codex.
This section sets
provider = "codex". If you don’t have Codex installed and
configured, substitute another provider you do have (e.g., provider = "claude"); the rest of the walkthrough is the same.gc init registered claude, but any other
provider an agent references must also be registered in city.toml — otherwise
every gc command fails with provider catalog is missing referenced providers. Register the builtin alias:
gc doctor --fix adds missing builtin provider aliases for you.
base = "builtin:<name>" works for any provider Gas City ships a preset for.
If you substituted claude above, skip this step — gc init already
registered it.)
The agent needs a prompt. With no agent named, gc prime falls back to a
generic worker prompt useful for a single-shot CLI invocation:
gc prime shows the prompt an agent runs with — the instructions that tell it
how to pick up and act on a slung bead. Pass an agent name to inspect a specific
one: gc prime mayor prints the mayor’s prompt; gc prime my-project/reviewer
prints the reviewer’s once we’ve written it.
The reviewer’s prompt pairs the standard “find and execute” loop with
review-specific instructions:
suggest maps to --ask-for-approval untrusted --sandbox read-only: trusted
read-only commands run without prompting, but anything outside that boundary —
including writing a file — blocks on interactive approval. So an agent set to
suggest can’t finish unattended work like the gc sling walkthrough below,
which has to write review.md. Reach for suggest on an agent you’ll attach
to and approve step-by-step; for fire-and-forget slung work, use a mode that
doesn’t block on approval, such as auto-edit or unrestricted.agents/reviewer/agent.toml. Valid values come from
each provider’s options schema, so they differ per provider — o4-mini is a
Codex model, while the same key on a claude agent would take values like
sonnet or haiku.
An agent has five independent axes you can tune — the harness (provider), the
model, who serves the model (upstream), the transport, and the runtime. For the
full how-to, including running a harness against Bedrock, a proxy, or an
OpenAI-compatible gateway, see
Configuring an Agent.
Now that your agent is available, it’s time to sling some work to it:
my-project, you target it as
my-project/reviewer from inside that directory. Gas City started a Codex
session, loaded agents/reviewer/prompt.template.md, and delivered the task.
There’s no Attached workflow line this time: implicit agents like claude
ship with mol-do-work as their default sling formula, but a custom agent has
none until you configure one, so the bead is delivered directly. Sling still
creates an auto-convoy to track it. Watch progress with bd show; when the
work finishes, the review is on disk:
What’s next
You’ve defined an agent with a custom prompt, pointed it at a different provider, and slung work to it directly. From here:- The six primitives — the canonical model agents, sessions, and work all build on
- Sessions — session lifecycle, sleep/wake, suspension, named sessions
- Formulas — how multi-step work should be done: steps, dependencies, and variables
- Beads — the unit of work; every task, message, and convoy member is a bead