List the projects an agent runs in, and what runs in each
const url = 'https://example.com/v1/agents/example/projects';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/v1/agents/example/projects \ --header 'Authorization: Bearer <token>'The project the agent was first published in, then each other project a version of it can run in: one that a deployment which is not retired shipped a version into, an unregistered version included. A change to the agent reaches each of them. Only the projects the caller can read are named, its first project included. A retired agent still answers. Without environment orders, an agent has one project. Under kindgi dev, whose pack names no project, the list is empty. Each project says what a run there that names no version gets (runs) and why (follows): a pin that covers the project, else its Latest. Latest moves only when a deployment into the project ships a version, or when a person publishes a full version or adds one as the latest version; a pin never moves it. segments lists the pins on segments inside the project. highest is the agent’s highest version, which numbers the next one. A version the caller can’t see is left out.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”AgentId — dotted namespace (acme.drafting).
Responses
Section titled “Responses”The projects.
object
Its first project first, then the others, each once.
object
Why runs runs there: pin, a pin that covers the project (its own, its org’s or the workspace’s); latest, no pin covers it, so it runs its Latest. Absent when neither has a version the caller can see, or when the server doesn’t pin versions.
The version a run in the project that names none gets (and isn’t a follow-up turn of a conversation).
object
When it began to run there: when the pin was set; or, for Latest, the deployment into the project that shipped it, or when a person published it or added it as the latest version. Absent when nothing records a time, as for a pack’s version under kindgi dev.
Who: the requester of the promotion that set the pin, or the person who published it or added it as the latest version. Absent when a deployment made it Latest.
object
With follows: latest: the deployment into the project that made it Latest, when one did.
The whole workspace.
object
An org’s projects.
object
One project.
object
A segment path within a project: it covers every run whose path starts with it.
object
object
Lowercase, like an identifier: company, contact-role.
With follows: pin: the pin change that set the pin, in the agent’s pin history.
The pins on segments inside the project, which those segment paths run instead.
object
object
Lowercase, like an identifier: company, contact-role.
The agent’s highest active version, which numbers the next one. It isn’t what a project runs: that’s each project’s runs. Absent when the caller can’t see it, or when the server doesn’t pin versions.
object
Example
{ "data": [ { "follows": "pin", "runs": { "by": { "kind": "user" }, "pinnedScope": { "kind": "tenant" } } } ]}Missing / malformed / expired / revoked bearer token.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}No agent with that id under this workspace.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}The database was too busy to answer in time (database-busy); Retry-After (whole seconds) says when to try again.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}See also
GET /v1/agents/{agentId}: Fetch the highest version of an agentGET /v1/agents/{agentId}/versions: List versions of an agentGET /v1/agents/{agentId}/versions/{version}: Fetch a specific agent versionPUT /v1/agents/{agentId}/owner: Set an agent's owner- Projects, packs and values
- Agent and tool versions
- Pinned versions reference
- Error code
database-busy - Every error code