# Unattended agent job

Source: https://corespeed.io/use-cases/unattended-agent-job

An unattended agent job is a cron job, timer or CI runner you host that signs in to CoreSpeed as an agent of its own. Its sk-csa- key carries a monthly spend cap, reaches only what is shared with it, and sends a held write to the agent's owner. Every call lands in Activity under the agent's name.

The job: Give a cron job or CI runner you host its own agent identity, a capped key and an owner who answers for it.

## The prompt

Paste this line into Claude Code, Codex or Cursor:

```text
set up https://corespeed.io/SKILL.md (read it raw, e.g. with curl), then create an agent called nightly-report, mint it an agent key with a 5,000-credit monthly cap, and show me the MCP config my cron job should use, with the key read from CORESPEED_API_KEY.
```

It starts with the setup line, so it works on a machine without CoreSpeed: the agent fetches https://corespeed.io/SKILL.md, adds the MCP server and signs you in, then does the job.

## Set up first

Share the accounts the job uses, such as GitHub or Notion, with the organization or with the agent; it reaches Slack and Linear through the app an admin installs. An agent key never reaches a member's other private connections.

## The tools it calls

- `manage__agents_create`: Create the agent; you become its owner
- `manage__agents_key_create`: Mint its sk-csa- key with a monthly cap
- `manage__whoami`: Check the job signs in as the agent
- `manage__approval_wait`: At run time, wait on a held write

## Steps

1. **Create the agent and its key**: Paste the prompt into Claude Code, Codex or Cursor, signed in as you. You become the agent's owner.
2. **Hand the key to your scheduler**: Keep the key in your secret store and read it from CORESPEED_API_KEY. Cron, a systemd timer or a CI runner starts the job.
3. **Read what it did**: Every call lands in Dashboard → Activity under the agent. A write your policy holds waits for you, its owner.

The full write-up: https://corespeed.io/blog/an-unattended-job-with-an-agent-key

## Questions

### Where does the job run?

On your own machine, server or CI runner. This page is the path for a job you host; CoreSpeed gives it an identity, a cap and a trail.

### Why not use my own API key?

An sk-cs- key acts as you and reaches your private connections. If the job misbehaves, the activity trail names you, not the job.

### What happens when the job reaches its cap?

Metered calls answer key_spend_limit_exceeded until the month rolls over or a member raises the cap. A call already in flight can finish.

### Who approves a write the job makes?

The agent's owner, in the dashboard, by email or in Slack. The agent cannot approve its own action.

### Can the job mint more keys or agents?

No. Minting keys and creating agents need a member. An agent key gets api_key_cannot_mint or member_principal_required.

All use cases: https://corespeed.io/use-cases (Markdown: https://corespeed.io/use-cases.md)

## Related pages

- [Approval gates for AI agent tool actions](https://corespeed.io/solutions/agent-approvals): Set approval policies for writes through CoreSpeed. Review held tool actions while your team keeps using its preferred agents.
- [Shared agent tools and controls for teams](https://corespeed.io/solutions/teams): Manage shared connections, approval policies, and tool usage for teams working across Claude Code, Codex, and other MCP clients.
- [Claude Code and Codex for teams, on one set of rules](https://corespeed.io/use-cases/team-of-agents): Each teammate keeps Claude Code, Codex or Cursor. Connections, memory, approvals, budgets and the activity trail are the organization's. One prompt to paste.

## Sources

- Authentication: https://corespeed.io/docs/authentication
- Approvals: https://corespeed.io/docs/approvals
- Billing: https://corespeed.io/docs/billing
- Running an unattended job you operate with a CoreSpeed agent key: https://corespeed.io/blog/an-unattended-job-with-an-agent-key
- How to set a monthly budget for an agent: https://corespeed.io/blog/set-a-monthly-budget-for-an-agent
- How to run a headless agent or CI job with a CoreSpeed API key: https://corespeed.io/blog/api-keys-for-headless-agents-and-ci

Reviewed 2026-11-14.

## Links

- Product overview: https://corespeed.io/ (Markdown: https://corespeed.io/index.md)
- Documentation: https://corespeed.io/docs
- Pricing: https://corespeed.io/pricing (Markdown: https://corespeed.io/pricing.md)
