register_agent
Create or update a coding agent's identity and profile in a project, persisting it to Git. Refreshes last-active status to support agent coordination.
Instructions
Create or update an agent identity within a project and persist its profile to Git.
When to use
At the start of a coding session by any automated agent.
To update an existing agent's program/model/task metadata and bump last_active.
Semantics
If
nameis omitted, a random adjective+noun name is auto-generated.Reusing the same
nameupdates the profile (program/model/task) and refresheslast_active_ts.A
profile.jsonfile is written underagents/<Name>/in the project archive.
Agent Identity
Two naming modes are supported:
Explicit identity — pass a stable ID like
alpha-one,cc-0, orworker_42. Must match[A-Za-z0-9][A-Za-z0-9._-]{0,127}. Useful for swarm workflows where agents are relaunched onto the same identity.Auto-generated — omit
nameto get a random adjective+noun identity likeGreenLakeorBlueDog(RECOMMENDED for ad-hoc use).
Invalid examples: "BackendHarmonizer", "DatabaseMigrator" (descriptive role names are rejected in strict mode).
Parameters
project_key : str
The same human key you passed to ensure_project (or equivalent identifier).
program : str
The agent program (e.g., "codex-cli", "claude-code").
model : str
The underlying model (e.g., "gpt5-codex", "opus-4.1").
name : Optional[str]
A valid explicit identity (e.g., "alpha-one", "cc-0") or adjective+noun
combination (e.g., "BlueLake").
If omitted, a random valid name is auto-generated (RECOMMENDED).
Names are unique per project; passing the same name updates the profile.
task_description : str
Short description of current focus (shows up in directory listings).
Returns
dict { id, name, program, model, task_description, inception_ts, last_active_ts, project_id }
Examples
Register with auto-generated name (RECOMMENDED):
{"jsonrpc":"2.0","id":"3","method":"tools/call","params":{"name":"register_agent","arguments":{
"project_key":"/data/projects/backend","program":"codex-cli","model":"gpt5-codex","task_description":"Auth refactor"
}}}Register with explicit valid name:
{"jsonrpc":"2.0","id":"4","method":"tools/call","params":{"name":"register_agent","arguments":{
"project_key":"/data/projects/backend","program":"claude-code","model":"opus-4.1","name":"BlueLake","task_description":"Navbar redesign"
}}}Pitfalls
Names MUST match the adjective+noun format or an error will be raised
Names are case-insensitive unique. If you see "already in use", pick another or omit
name.Use the same
project_keyconsistently across cooperating agents.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| model | Yes | ||
| format | No | ||
| program | Yes | ||
| project_key | Yes | ||
| task_description | No | ||
| attachments_policy | No | auto | |
| registration_token | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||