Basic Usage
Create a profile, chat with it, open the dashboard and see what it cost. No API key needed to start.
This guide uses the mock model, which answers by simple rules and never leaves your machine. When it all works, switch a profile to a real model.
Create a profile
cos profile create Household --provider mock --tag area:householdcos prints the folder it made:
/home/you/.commonos/profiles/HouseholdThe folder holds the profile’s settings, persona and keys:
config.toml provider, model, tags, tools
SOUL.md the persona; edit it freely
.env API keys for this profile only
skills/ one folder per skill, each with a SKILL.mdChat in the terminal
cos -p Household chatThe mock model follows three rules: remember: <fact> saves a memory, delegate: <goal> starts a helper agent, and anything else is echoed back.
Type /new to start a new session and /quit to leave. When a tool needs approval, cos prints the tool and its arguments and waits for y or N.
Open the dashboard
cos serve --mockOpen http://127.0.0.1:9120. The dashboard runs every profile at once. Use it to chat, approve tool calls, stop a running turn, browse sessions and watch costs. --mock runs every profile on the mock model, whatever its config.toml says.
Use a real model
Create a profile on the Anthropic provider and give it a key:
cos profile create BusinessManager --model <model id> --tag kind:business
echo 'ANTHROPIC_API_KEY=sk-ant-...' >> ~/.commonos/profiles/BusinessManager/.env
cos -p BusinessManager chatA profile with no key in its .env uses ANTHROPIC_API_KEY from the environment cos runs in. Its usage is still recorded under its own tags.
Copy a profile for a client
cos profile create AcmeManager --from BusinessManager --tag client:acme --tool session_search--from copies the persona, settings and skills, but not the keys or anything in the database. The new profile starts with no sessions and no memory. --tool limits the agent to the tools you list.
See what it cost
With cos serve running, ask CommonBill for costs grouped by tag:
curl -s 'http://127.0.0.1:9120/api/costs?group_by=tag'{
"group_by": "tag",
"rows": [
{
"group": "area:household",
"calls": 6,
"input_tokens": 600,
"output_tokens": 120,
"cache_read_tokens": 0,
"cache_write_tokens": 0,
"cost_usd": 0.00084,
"unpriced_calls": 0
}
]
}The three messages above made six model calls. The delegated child’s call is billed to area:household, because child turns inherit their parent’s tags.