Set an agent's owner
const url = 'https://example.com/v1/agents/example/owner';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"userId":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/v1/agents/example/owner \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "userId": "example" }'One owner per agent: the person its corrections go to when they need the owner. Setting it again replaces the one before. Needs admin on the agent (an admin of its project). With a directory of people, the owner must be one of the tenant’s.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”AgentId — dotted namespace (acme.drafting).
Request Bodyrequired
Section titled “Request Bodyrequired”object
The new owner’s user id.
Examplegenerated
{ "userId": "example"}Responses
Section titled “Responses”The owner is set.
object
The person the agent’s corrections go to when they need its owner. Until one is set, those go to everyone who may publish the agent.
object
The person’s display name, when the runtime’s directory has one.
Examplegenerated
{ "agentId": "example", "owner": { "userId": "example", "name": "example" }}The body is not { "userId": "…" }.
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" }}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 tenant (agent-not-found), or no person with that id in it (identity-user-not-found).
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" }}registry-read-only: this registry takes no writes (under kindgi dev, the pack’s files are the source).
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 request body is over the API’s limit (request-too-large; details.maxBytes says how much).
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" }}Server error (unmapped domain code or framework crash).
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 runtime’s agent store doesn’t keep an owner (agent-owner-unsupported).
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}/projects: List the projects an agent runs in, and what runs in eachGET /v1/agents/{agentId}/versions: List versions of an agentGET /v1/agents/{agentId}/versions/{version}: Fetch a specific agent version- Kindgi 0.4.0
- Error code
agent-not-found - Error code
agent-owner-unsupported - Error code
identity-user-not-found - Error code
registry-read-only - Error code
request-too-large - Every error code