Agent profiles
Overview
Agent profiles let you capture reusable configuration for coding agents (e.g. Codex) and apply them consistently across projects and Attempts.Storage and schema
- Profiles are stored in SQLite and managed by
core/agents/profiles:listAgentProfiles(projectId)getAgentProfile(projectId, id)createAgentProfile(projectId, agent, name, config)updateAgentProfile(projectId, id, patch)deleteAgentProfile(projectId, id)
- The
configfield is stored as JSON (configJson), whose shape is validated by the agent-specific schema at runtime.
Profile configuration notes
- Each agent exposes its own schema (e.g. Codex, Droid, OpenCode) to validate the
configJSON, so new fields or constraints must be registered there before the UI or CLI can persist them. - Common settings include prompt customizations such as
appendPromptplus the newinlineProfilestring:- For inline tasks (ticket enhancement, PR summaries), a non-empty
inlineProfileis preferred overappendPrompt. - For the OpenCode agent,
inlineProfileis also used as the primary system prompt for full attempts when set; when empty, it falls back toappendPrompt.
- For inline tasks (ticket enhancement, PR summaries), a non-empty
- OpenCode profiles can also configure their server targets:
baseUrloverrides the bundledopencode serveprocess and can also be supplied viaOPENCODE_BASE_URL, switching the agent into remote mode.apiKeyis mirrored intoOPENCODE_API_KEYwhen the SDK launches the local server, letting credentials stay in the profile even without manual environment setup.portspecifies the local server port (default: 4097). When a server is already running on the configured port, it will be reused instead of starting a new instance. Valid ports are 1-65535, excluding reserved ports (80, 443, 22, 25, 53, 110, 143, 993, 995, 3306, 5432, 6379, 8080, 8443).variantenables extended thinking/reasoning modes when supported by the model. Use this for complex tasks requiring deeper analysis and planning, though it may increase latency and token usage.
- Prompt fields are capped at 4,000 characters when creating or updating profiles (both project-scoped and global). Attempts to save longer prompts return an RFC 7807 error describing the offending field so callers can trim the text.
Reasoning effort levels
Codex and Droid agents both expose a reasoning-effort setting in their profiles:- Codex:
modelReasoningEffort– one ofminimal,low,medium,high, orxhigh. - Droid:
reasoningEffort– one ofoff,low,medium,high, orxhigh.
xhigh enables the most intensive reasoning
mode and typically trades additional latency and token usage for deeper analysis.
Example Codex profile JSON using xhigh:
Debug logging
Agents can enable verbose debug logging viaconfig.debug: true in the profile. When enabled:
- Codex emits structured debug records in Attempt logs prefixed with
[codex:debug](including a timestamp and event context). - OpenCode emits verbose records prefixed with
[opencode:debug]. - Droid emits verbose records prefixed with
[droid:debug].
Scope and IDs
- Profiles can be:
- Per project – scoped to a single project/board.
- Global – workspace-wide entries (IDs beginning with
apg-).
- ID conventions:
- Project-scoped profiles use IDs like
ap-<uuid>. - Global profiles use IDs starting with
apg-so they’re easy to distinguish and reuse.
- Project-scoped profiles use IDs like
How Attempts use profiles
- When starting or resuming an Attempt:
- The Attempts service determines which agent to use:
- Explicitly provided by the UI, or
- From the project’s default agent setting.
- It then resolves the profile:
- From the explicit profile selection in the UI, or
- From the project’s default profile (if configured).
- The resolved profile is:
- Loaded from the database.
- Validated against the agent’s schema.
- Applied to the agent runner if valid.
- The Attempts service determines which agent to use:
- On errors:
- If the profile is missing or fails validation:
- The service logs a warning.
- The Attempt falls back to the agent’s default profile so work can continue.
- If the profile is missing or fails validation:
Events and UI updates
- Profile CRUD operations emit
agent.profile.changedevents that carry:- Profile kind (project/global).
- Agent key.
- Basic metadata (id, name, timestamps).
- WebSocket listeners forward these events so:
- The Agents UI (e.g.
/agents/CODEX) stays in sync without reloads. - Profile pickers in the Attempt start/follow-up dialogs show up-to-date options.
- The Agents UI (e.g.
core/agents-and-profiles.mdfor the broader agents module.