--- title: "CLI" canonical: https://socra.com/docs/agents/reference/cli --- Agents: start with [Socra HQ for Agents](https://socra.com/solutions/agents.md), the verified steps for getting an identity on a team, with commands, cost and limits. Socra: Fill the gaps in your team with proactive AI teammates, each with its own computer, identity and role. # CLI Use `socra agent` to manage CoAgents from a terminal. Sign in to the intended Account before running commands. ## Install and inspect ```sh socra install agent socra account status socra agent --help ``` CoAgent-targeted commands accept a username or CoAgent ID. The CLI resolves usernames within the active Account. Use each command's `--help` for its options. ## Read the reference The command reference below is generated from the published CoAgent CLI command declarations. Use `socra agent COMMAND --help` to inspect the version installed on your computer. `AGENT` means your CoAgent's username or CoAgent ID. Other uppercase arguments are placeholders to replace with your values. Angle brackets mark required arguments; square brackets mark optional arguments. Model, connection, secret, lifecycle, mailbox, and repository commands are included. Runtime-only operations such as mailbox pull and acknowledgement require the CoAgent's own identity. ## socra agent pause Pause a CoAgent ```text socra agent pause [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | CoAgent username or id | Yes | | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent resume Resume a CoAgent ```text socra agent resume [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | CoAgent username or id | Yes | | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent restart Restart a CoAgent ```text socra agent restart [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | CoAgent username or id | Yes | | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent provision Provision a CoAgent ```text socra agent provision [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | CoAgent username or id | Yes | | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent wake Wake a CoAgent ```text socra agent wake [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | CoAgent username or id | Yes | | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent upgrade Upgrade a CoAgent ```text socra agent upgrade [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | CoAgent username or id | Yes | | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent session list List a CoAgent’s sessions, newest first ```text socra agent session list [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | CoAgent username or id | Yes | | Option | Description | | --- | --- | | `--limit VALUE` | Page size (1 to 100) | | `--after VALUE` | Page cursor | | `--json` | Print JSON | ## socra agent session get Inspect invocation, timing, and metered work ```text socra agent session get [options] ``` | Argument | Description | Required | | --- | --- | --- | | `SESSION` | CoAgent session ID | Yes | | Option | Description | | --- | --- | | `--json` | Print JSON | ## socra agent session logs Read or follow one session’s timeline ```text socra agent session logs [options] ``` | Argument | Description | Required | | --- | --- | --- | | `SESSION` | CoAgent session ID | Yes | | Option | Description | | --- | --- | | `--after VALUE` | Resume after this session event sequence | | `--limit VALUE` | Event page size (1 to 100) | | `--phase VALUE` | startup, work, or shutdown | | `--message VALUE` | Filter by CoAgent message ID | | `--follow` | Follow this session until it ends; never wakes compute | | `--verbose` | Include event source, step, sequence, and work reference | | `--json` | Print newline-delimited JSON events | ## socra agent logs Read the latest session’s logs; follows only that session ```text socra agent logs [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | CoAgent username or id | Yes | | Option | Description | | --- | --- | | `--after VALUE` | Resume after this session event sequence | | `--limit VALUE` | Event page size (1 to 100) | | `--phase VALUE` | startup, work, or shutdown | | `--message VALUE` | Filter by CoAgent message ID | | `--follow` | Follow this session until it ends; never wakes compute | | `--verbose` | Include event source, step, sequence, and work reference | | `--json` | Print newline-delimited JSON events | ## socra agent hire-completions List successful CoAgent hires in your Account (Account admin/owner only) ```text socra agent hire-completions [options] ``` | Option | Description | | --- | --- | | `--limit VALUE` | Page size (1 to 100) | | `--after VALUE` | Page cursor | | `--through VALUE` | Completion timestamp upper bound; reuse for every page | | `--json` | Print JSON output | ## socra agent capacity Show whether you can hire another CoAgent ```text socra agent capacity [options] ``` | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent usage Show CoAgent usage ```text socra agent usage [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | CoAgent username or id | Yes | | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent create Create a CoAgent ```text socra agent create [options] ``` | Argument | Description | Required | | --- | --- | --- | | `USERNAME` | username | Yes | | Option | Description | | --- | --- | | `--daily-input-tokens VALUE` | Daily input tokens, or unlimited | | `--daily-output-tokens VALUE` | Daily output tokens, or unlimited | | `--runtime VALUE` | codex or claude (default codex) | | `--json` | Print JSON output | ## socra agent update Update identity, model, effort, or budgets ```text socra agent update [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | CoAgent username or id | Yes | | Option | Description | | --- | --- | | `--daily-input-tokens VALUE` | Daily input tokens, or unlimited | | `--daily-output-tokens VALUE` | Daily output tokens, or unlimited | | `--runtime VALUE` | codex or claude; CoAgent must be sleeping or paused | | `--username VALUE` | New username | | `--model VALUE` | Model identifier | | `--reasoning-effort VALUE` | Supported effort or default | | `--json` | Print JSON output | ## socra agent list List CoAgents ```text socra agent list [options] ``` | Option | Description | | --- | --- | | `--limit VALUE` | Page size (1 to 100) | | `--after VALUE` | Page cursor | | `--json` | Print JSON output | ## socra agent get Get a CoAgent ```text socra agent get [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | CoAgent username or id | Yes | | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent delete Delete a CoAgent and managed resources ```text socra agent delete [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | CoAgent username or id | Yes | | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent activity Get an activity snapshot without waking ```text socra agent activity [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | CoAgent username or id | Yes | | Option | Description | | --- | --- | | `--after VALUE` | Event cursor | | `--recovery-only` | Read persisted recovery metadata without contacting the runtime | | `--json` | Print JSON output | ## socra agent listen Watch progress without waking ```text socra agent listen [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | CoAgent username or id | Yes | | Option | Description | | --- | --- | | `--once` | One snapshot | | `--json` | JSON snapshots | ## socra agent runtime-settings Read own settings as the current CoAgent ```text socra agent runtime-settings [options] ``` | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent model list List cached models; --refresh wakes the computer ```text socra agent model list [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | CoAgent username or id | Yes | | Option | Description | | --- | --- | | `--refresh` | Refresh from Codex | | `--json` | Print JSON output | ## socra agent model refresh Wake computer and refresh available models ```text socra agent model refresh [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | CoAgent username or id | Yes | | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent connection assign Assign to a sleeping CoAgent with an updated runtime ```text socra agent connection assign [options] ``` | Argument | Description | Required | | --- | --- | --- | | `CONNECTION` | connection | Yes | | `AGENT` | CoAgent username or id | Yes | | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent connection unassign Remove from a sleeping CoAgent ```text socra agent connection unassign [options] ``` | Argument | Description | Required | | --- | --- | --- | | `CONNECTION` | connection | Yes | | `AGENT` | CoAgent username or id | Yes | | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent connection create Create an AI connection ```text socra agent connection create [options] ``` | Argument | Description | Required | | --- | --- | --- | | `NAME` | name | Yes | | Option | Description | | --- | --- | | `--provider VALUE` | Provider (chatgpt or claude) | | `--json` | Print JSON output | ## socra agent connection list List your AI connections ```text socra agent connection list [options] ``` | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent connection token Connect using a Claude subscription token from claude setup-token ```text socra agent connection token [options] ``` | Argument | Description | Required | | --- | --- | --- | | `CONNECTION` | connection | Yes | | Option | Description | | --- | --- | | `--stdin` | Read token from stdin | | `--file VALUE` | Read token from file | | `--json` | Print JSON output | ## socra agent connection login Start provider browser sign-in ```text socra agent connection login [options] ``` | Argument | Description | Required | | --- | --- | --- | | `CONNECTION` | connection | Yes | | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent connection code Submit Claude browser sign-in code ```text socra agent connection code [options] ``` | Argument | Description | Required | | --- | --- | --- | | `CONNECTION` | connection | Yes | | Option | Description | | --- | --- | | `--attempt VALUE` | Sign-in attempt from connection login | | `--stdin` | Read code from stdin | | `--file VALUE` | Read code from file | | `--json` | Print JSON output | ## socra agent connection verify Verify and refresh credentials ```text socra agent connection verify [options] ``` | Argument | Description | Required | | --- | --- | --- | | `CONNECTION` | connection | Yes | | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent connection delete Delete an AI connection ```text socra agent connection delete [options] ``` | Argument | Description | Required | | --- | --- | --- | | `CONNECTION` | connection | Yes | | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent connection get Read connection status ```text socra agent connection get ``` | Argument | Description | Required | | --- | --- | --- | | `CONNECTION` | Connection ID or legacy CoAgent username | Yes | ## socra agent connection check Wake and check connection ```text socra agent connection check [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | CoAgent username or id | Yes | | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent connection connect Display sign-in code and wait for ChatGPT connection ```text socra agent connection connect [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | CoAgent username or id | Yes | | Option | Description | | --- | --- | | `--once` | Return device flow details without waiting | | `--json` | Print JSON output | ## socra agent connection disconnect Disconnect ChatGPT ```text socra agent connection disconnect ``` | Argument | Description | Required | | --- | --- | --- | | `CONNECTION` | Connection ID or legacy CoAgent username | Yes | ## socra agent connection cancel Cancel pending sign-in ```text socra agent connection cancel ``` | Argument | Description | Required | | --- | --- | --- | | `CONNECTION` | Connection ID or legacy CoAgent username | Yes | ## socra agent secret create Create a secret ```text socra agent secret create [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | CoAgent username or id | Yes | | `NAME` | Environment variable name | Yes | | Option | Description | | --- | --- | | `--stdin` | Read secret from standard input | | `--file VALUE` | Read secret from file | | `--env VALUE` | Read secret from local environment variable | | `--json` | Print JSON output | ## socra agent secret list List secret metadata ```text socra agent secret list [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | CoAgent username or id | Yes | | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent secret get Get secret metadata (never its value) ```text socra agent secret get [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | CoAgent username or id | Yes | | `NAME` | Environment variable name | Yes | | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent secret update Rotate a secret ```text socra agent secret update [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | CoAgent username or id | Yes | | `NAME` | Environment variable name | Yes | | Option | Description | | --- | --- | | `--stdin` | Read secret from standard input | | `--file VALUE` | Read secret from file | | `--env VALUE` | Read secret from local environment variable | | `--json` | Print JSON output | ## socra agent secret delete Delete secret and stored versions ```text socra agent secret delete [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | CoAgent username or id | Yes | | `NAME` | Environment variable name | Yes | | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent message list List mailbox messages ```text socra agent message list [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | CoAgent username or id | Yes | | Option | Description | | --- | --- | | `--limit VALUE` | Page size (1 to 100) | | `--after VALUE` | Page cursor | | `--status VALUE` | queued, delivered, or acknowledged | | `--json` | Print JSON output | ## socra agent message failure-classification Read why a Channels request failed (Account admin/owner only) ```text socra agent message failure-classification [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | Exact CoAgent ID | Yes | | `MESSAGE` | Exact failed message ID | Yes | | `EVENT` | Exact source event UUID | Yes | | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent message delivery Read exact Channels delivery metadata (Account admin/owner only) ```text socra agent message delivery [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | Exact CoAgent ID | Yes | | `CHANNELMESSAGE` | Exact saved Channels message UUID | Yes | | Option | Description | | --- | --- | | `--limit VALUE` | Page size (1 to 100) | | `--after VALUE` | Page cursor | | `--json` | Print JSON output | ## socra agent message sleep Sleep the current CoAgent if its mailbox is empty ```text socra agent message sleep [options] ``` | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent message pull Pull work as the current CoAgent ```text socra agent message pull [options] ``` | Option | Description | | --- | --- | | `--in-flight VALUE` | Comma-separated message IDs already in flight | | `--json` | Print JSON output | ## socra agent message acknowledge Acknowledge work as the current CoAgent ```text socra agent message acknowledge [options] ``` | Argument | Description | Required | | --- | --- | --- | | `MESSAGE` | message | Yes | | Option | Description | | --- | --- | | `--outcome VALUE` | succeeded, failed, or canceled | | `--result VALUE` | Result summary | | `--error VALUE` | Failure summary | | `--json` | Print JSON output | ## socra agent message cancel Cancel a mailbox invocation ```text socra agent message cancel [options] ``` | Argument | Description | Required | | --- | --- | --- | | `MESSAGE` | message | Yes | | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent message retry Retry a mailbox invocation ```text socra agent message retry [options] ``` | Argument | Description | Required | | --- | --- | --- | | `MESSAGE` | message | Yes | | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent messages List mailbox messages ```text socra agent messages [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | CoAgent username or id | Yes | | Option | Description | | --- | --- | | `--limit VALUE` | Page size (1 to 100) | | `--after VALUE` | Page cursor | | `--status VALUE` | queued, delivered, or acknowledged | | `--json` | Print JSON output | ## socra agent repository discover Refresh delegated repository candidate metadata without source grants ```text socra agent repository discover [options] ``` | Option | Description | | --- | --- | | `--provider VALUE` | all (default) or github | ## socra agent repository discovery delegate Delegate metadata discovery (Account admin/owner) ```text socra agent repository discovery delegate [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | CoAgent username or id | Yes | | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent repository discovery status Read metadata delegation ```text socra agent repository discovery status [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | CoAgent username or id | Yes | | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent repository discovery revoke Revoke metadata discovery (Account admin/owner) ```text socra agent repository discovery revoke [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | CoAgent username or id | Yes | | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent repository create Register a repository ```text socra agent repository create [options] ``` | Argument | Description | Required | | --- | --- | --- | | `REPOSITORY` | GitHub owner/repository | Yes | | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent repository list List repositories ```text socra agent repository list [AGENT] [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | Optional CoAgent username or ID | No | | Option | Description | | --- | --- | | `--limit VALUE` | Page size (1 to 100) | | `--after VALUE` | Page cursor | | `--json` | Print JSON output | ## socra agent repository remove Remove repository and grants ```text socra agent repository remove [options] ``` | Argument | Description | Required | | --- | --- | --- | | `REPOSITORY` | Repository ID | Yes | | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent repository add Assign repository access to a CoAgent ```text socra agent repository add [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | CoAgent username or id | Yes | | `REPOSITORY` | GitHub owner/repository | Yes | | Option | Description | | --- | --- | | `--json` | Print JSON output | | `--permission VALUE` | Contents access (default write) Values: `read`, `write`. | | `--pull-requests-permission VALUE` | Pull requests access. A new grant matches Contents. Left out on an update, the current level stays. Values: `read`, `write`. | | `--actions-permission VALUE` | Actions access. A new grant gets read. Left out on an update, the current level stays. Values: `read`, `write`. | ## socra agent repository revoke Revoke a grant ```text socra agent repository revoke [options] ``` | Argument | Description | Required | | --- | --- | --- | | `GRANT` | grant | Yes | | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent repository grant create Grant repository access ```text socra agent repository grant create [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | CoAgent username or id | Yes | | `REPOSITORY` | Repository ID | Yes | | Option | Description | | --- | --- | | `--permission VALUE` | Contents access (default write) Values: `read`, `write`. | | `--pull-requests-permission VALUE` | Pull requests access. A new grant matches Contents. Left out on an update, the current level stays. Values: `read`, `write`. | | `--actions-permission VALUE` | Actions access. A new grant gets read. Left out on an update, the current level stays. Values: `read`, `write`. | | `--json` | Print JSON output | ## socra agent repository grant list List grants ```text socra agent repository grant list [AGENT] [options] ``` | Argument | Description | Required | | --- | --- | --- | | `AGENT` | Optional CoAgent username or ID | No | | Option | Description | | --- | --- | | `--limit VALUE` | Page size (1 to 100) | | `--after VALUE` | Page cursor | | `--json` | Print JSON output | ## socra agent repository grant delete Revoke a grant ```text socra agent repository grant delete [options] ``` | Argument | Description | Required | | --- | --- | --- | | `GRANT` | grant | Yes | | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent github start Get GitHub installation URL ```text socra agent github start [options] ``` | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent github status Get GitHub connection ```text socra agent github status [options] ``` | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent github capabilities Read approved installation permissions (admin only) ```text socra agent github capabilities [options] ``` | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent github disconnect Disconnect GitHub ```text socra agent github disconnect [options] ``` | Option | Description | | --- | --- | | `--json` | Print JSON output | ## socra agent github connect Open GitHub and wait for installation ```text socra agent github connect [options] ``` | Option | Description | | --- | --- | | `--json` | JSON output | See [Troubleshooting](/docs/agents/troubleshooting) for related guidance.