Learning resourcesReviewed · Anysphere

Cursor Cloud Agent metadata API documentation

This Cursor documentation page explains a read-only API for developers whose Cloud Agents, hooks or install scripts need information about the current run. The main catch is that the API is in preview, can change in breaking ways, and is not available on self-hosted workers. It is a local HTTP API on a Unix socket inside the agent VM. It returns the agent id, owner, team, current-turn submitter, serving model and checked-out repositories as plain text.

Researched 14 Nov 2026

In short.

This Cursor documentation page explains a read-only API for developers whose Cloud Agents, hooks or install scripts need information about the current run. It is also relevant to platform teams and security reviewers who run agents on Cursor-managed VMs. The main catch is that the feature is in preview and subject to breaking changes, the data is not signed and so cannot prove identity, and the API is not served on self-hosted workers yet. Any process that can reach the socket can read every metadata key. Callers send an HTTP GET over a Unix socket (CURSOR_AGENT_SOCKET, default /run/cursor/api.sock on Cursor-managed VMs) to paths under /v1/meta-data/. They get plain-text values for the agent id and name, how the agent was started, the owner and team, the person who submitted the current turn, the model serving that turn, and the repositories, branch and environment of the run. The page sets a rate limit of 120 requests per minute per VM, with bursts of 20 and at most 8 simultaneous connections shared with OIDC minting. It names OIDC tokens as the correct tool when something outside the VM must verify identity. This report is based only on the page text. Nothing was executed or tested, and the page gives no pricing, licence or version information.

Researched and written by an AI model and checked by a second AI model. How it works

The analysis covers the complete selected page at [https://cursor.com/docs/cloud-agent/metadata.md], captured as selected-page.txt. Linked pages are outside the selected scope and were not read: OIDC tokens, the SDK and Cloud Agents API, cloud agent setup, hooks, secrets and network, team follow-up settings and service accounts. They are mentioned only as the page describes them. No licence, pricing, changelog or terms page was captured, so rights and costs are reported as unknown. Nothing was executed or tested, and all behaviour described is as stated by the documentation.

The overview

What this resource is

This is the Cursor documentation page titled Agent metadata, at [https://cursor.com/docs/cloud-agent/metadata.md]. It documents a local API inside Cursor Cloud Agent virtual machines. The API gives key-value facts about the current agent run: the agent id, who owns the agent, who submitted the current turn, which model is serving, and which repositories are checked out.

The page labels the feature as a preview that is subject to change, including breaking changes. It presents the page as documentation of a feature, not as a standalone product, library or downloadable package, so it is classed as a learning resource.

Overall assessment

The page is a focused reference. It gives the endpoint shape, every documented key with when it is present, response formats, rate limits, an error table and three shell examples. A developer should be able to read values from a script after reading it. It also states clearly that the data is not signed and is not a credential, and that any process that can reach the socket can read every metadata key.

The main cautions are that the feature is in preview, the page carries no version or date, and it applies only to Cursor-managed VMs. Whether the API behaves as described is not verified here, because the report rests on the page text alone.

Who it is for

The audience is people who run Cursor Cloud Agents and want scripts, hooks or install scripts to adapt to the run. Examples from the page are tagging logs with the agent id and serving model, and taking a stricter path when a teammate's follow-up turn differs from the owner.

Beginners can follow the plain curl examples, but they need basic comfort with a shell and HTTP. The page expects the reader to know what a Cloud Agent, a hook and an install script are. The selected page links to related documentation, such as pages on cloud agent setup and hooks, but what those pages explain is unknown from the retained evidence. Teams who use OIDC federation with AWS, GCP or Vault are also addressed, because the page says to use OIDC tokens, not metadata, to prove identity.

What it can do

The API is read-only. It supports GET on /v1/meta-data and on any path under it. A prefix lists its children, one per line and sorted, with nested prefixes ending in a slash. A key returns its value as text. The top-level prefixes are agent/, owner/, turn/ and workspace/.

agent/ holds id (always present), name and source (when known; examples are WEBSITE, API, SLACK and AUTOMATIONS), and runtime (always present; the value is managed on Cursor-managed VMs).

owner/ holds user-id (preferred over email for allowlists), user-email (lowercased, and the page notes email can change), service-account-id, and team-id, each when known.

turn/ exists only while a coding turn is active. It holds id, user-id, user-email, started-at (Unix seconds) and model. The model key shows the model that actually served the turn, not Auto, if Auto was selected. The page says not to cache turn values across turns. turn/user-id can differ from owner/user-id on a team follow-up.

workspace/ holds repo-url (the primary repository as host/path, for example github.com/acme/widgets, with no scheme, credentials, port, query or .git suffix), repo-urls (all repositories, primary first, then the rest sorted), branch-name, environment-id, and automation-id (only for automations). A missing repo-urls key means the set is unknown, not that there is a single repository.

Using it

What you need

The API is available only inside a Cursor-managed Cloud Agent VM. The page says self-hosted workers do not serve it yet. The caller needs access to the Unix socket named by the CURSOR_AGENT_SOCKET environment variable, which defaults to /run/cursor/api.sock on managed VMs, and an HTTP client that supports Unix sockets, such as curl with --unix-socket.

No API key is needed for this local API. The page contrasts it with the SDK and Cloud Agents API, which use Cursor API keys from outside the VM. Plan, tier, account type and any feature flags needed to use Cloud Agents or this preview are not stated on the page.

How it works

Requests are plain HTTP over a Unix domain socket. The hostname in the URL, shown as cursor-agent, is ignored. No body or extra headers are needed. Successful responses are text/plain with UTF-8 encoding. Error responses are JSON with an error code, and 404 and 405 also include a usage string.

The page lists these error codes. 404 not_found is an unknown or missing key. 405 method_not_allowed means the method was not GET. 429 rate_limited means the per-agent budget was exceeded, and the page says to honour Retry-After. 503 saturated means too many connections, and the page again says to honour Retry-After. 500 host_error is an internal error. 502 and 504 backend_unreachable mean Cursor could not return metadata. Any other status is backend_error, where 403 is fatal because the agent is not allowed to read metadata.

The page says to retry 429, 503, 500, 502 and 504 with backoff, and to retry the connection if the socket is missing right after boot. It reports that metadata is served on the same socket as OIDC tokens and that the 8-connection cap is shared with OIDC minting. Keys appear only when they have a value, so listings show only what exists at that moment. How Cursor populates the values internally is not described.

Setup and first use

The selected page provides no installation or enablement instructions. It states that Cursor-managed Cloud Agent VMs serve metadata on the same socket as OIDC tokens.

To let an agent read it, the page suggests adding a short instruction to the prompt. The instruction tells the agent to follow the instructions at [https://cursor.com/docs/cloud-agent/metadata]. The page says agents call the API with their terminal tools, so you do not need to run the requests yourself.

For scripts, hooks or install scripts, the page shows a curl call against the socket. Run a listing first, then request a key. Install scripts can read the same socket. The page warns that turn/ is missing until a coding turn starts and workspace/branch-name is missing until the run records a branch. Owner, team and repository keys can be available from agent creation onward, but any key without a known value is omitted from listings and returns 404 if requested directly. The selected page links to related documentation on cloud agent setup and hooks, but those pages' explanations and configuration requirements are unknown from the retained evidence.

Worked examples from the page

The simplest read from the page is a curl call of this form: curl --unix-socket "${CURSOR_AGENT_SOCKET:-/run/cursor/api.sock}" http://cursor-agent/v1/meta-data/agent/id. It returns the Cloud Agent id as plain text. Requesting the /v1/meta-data/ path with the same options returns a prefix listing. The page's example listing shows agent/, owner/, turn/ and workspace/, but listings contain only keys that currently exist, and turn/ exists only during an active coding turn.

The first full example compares the owner with the person who submitted the turn. It reads owner/user-id and turn/user-id, and prints a message if they differ, so a hook can take a stricter path for a teammate's follow-up. The second example reads agent/id and turn/model and prints a log line of the form cloud_agent_id=<id> model=<model or unknown>. The third requests workspace/repo-urls and gets one repository per line, for example github.com/acme/widgets and github.com/acme/docs.

These examples are taken from the page. They were not run for this report.

Assessment & evidence

Limitations and risks

Stability: the page says the feature is in preview and subject to change, including breaking changes. Scripts that depend on key names or behaviour may need updating.

Availability: self-hosted workers do not serve this API yet. The page gives no timeline.

Trust: metadata is not signed and must not be used as a credential. Any process that can reach the socket, including the agent, code it runs and hooks, can read every key. Treat the values as visible to the whole run. Owner and submitter emails and user ids are among the values, so logs that include them may carry personal data. The page does not discuss retention or privacy for such logs.

Data shape: the turn/ keys disappear between turns and must not be cached across turns. Many keys are marked when known, so scripts must handle a 404. Repo-url on a multi-repo agent gives only the primary repository, and a missing repo-urls does not mean there is one repository.

Throughput: the request budget is 120 per minute per VM, and the connection cap is shared with OIDC minting, so heavy polling could interfere with token requests.

Not assessed: real response behaviour, latency, consistency of values with the dashboard, and how the API behaves for different plans or agent sources.

Why these conclusions

The conclusions come directly from the page's tables and prose. The identity, key and response details come from the Keys and Response sections. The trust conclusions rest on the Who can read metadata section, which says that metadata is not signed, is visible to any process that can reach the socket, and should not be forwarded as a credential. The page also says OIDC tokens leave out the turn submitter and serving model because a token can outlive the turn. That explains why the two APIs exist side by side.

Where the page is silent (pricing, plan availability, licence, version or date, privacy handling), this report says unknown and does not guess.

Alternatives and related options

The page itself points to three nearby options. OIDC tokens [https://cursor.com/docs/cloud-agent/identity.md] are signed, audience-bound JWTs minted by the agent. The page says to use them when AWS, GCP, Vault or your own service must verify the agent's identity, and not to forward metadata values as a credential.

The caller-owned metadata tags, set when creating an agent through the SDK [https://cursor.com/docs/sdk/typescript.md#agent-metadata] or the Cloud Agents API [https://cursor.com/docs/cloud-agent/api/endpoints.md], are a different feature. They use Cursor API keys and manage agents from outside the VM, whereas this API is local to the VM.

Equivalent features in other coding-agent platforms, and plain environment variables or files you set up yourself, were not examined in the evidence, so no comparison is made.

Evidence base

The only evidence is one captured file, selected-page.txt (13,058 bytes), the text of [https://cursor.com/docs/cloud-agent/metadata.md]. It was captured on 2026-11-14 and covers the whole selected page. It includes the key tables, response and error tables, rate limits, three shell examples and a list of related pages.

No execution logs, source code, release notes or third-party reviews were captured. Nothing here was run, so every behaviour statement is a statement of what the documentation says.

Access & freshness

Costs

The page states no price for the metadata API. Pricing, how metadata requests are treated for billing, any separate billing quota, and which Cursor plan includes Cloud Agents are unknown from this evidence.

The page does document an operational request budget: 120 metadata requests per minute per agent VM, in bursts of up to 20, and at most 8 concurrent socket connections, a cap shared with OIDC minting.

Rights and licence

The captured page contains no licence statement, copyright notice or terms of use for the documentation text or the API. Reuse and redistribution rights are therefore unknown from this evidence, and no packaged file is offered for this resource.

Applicable service terms and their requirements are unknown from this captured page.

Freshness

The page carries no publication date, version number or changelog. The content was captured on 2026-11-14. Because the page says the feature is in preview and may change in breaking ways, it may be out of date at any later time. Check the live page before relying on specific key names, limits or error codes. The date of the last change to the documentation is unknown.

Suggested next steps

If you run Cursor Cloud Agents and want run-aware logging or hooks, read the key tables and decide which keys you need. Write scripts so they handle a 404 for any key, and treat everything under turn/ as valid only during an active turn. Retry 429, 503, 500, 502 and 504 with backoff, and honour Retry-After.

Do not use metadata values as proof of identity. Use the OIDC token route for that. Before logging user ids or emails, check your organisation's privacy rules. Try the examples in a non-critical Cloud Agent first, since this report did not run them. Confirm in the Cursor documentation and your account whether your plan includes Cloud Agents, what they cost, and whether the preview status affects your use. If you rely on self-hosted workers, plan for this API being unavailable for now.

Evidence for this report

selected-page.txtselected · checked 2026-11-14