ReferenceHTTP APIAgents

An agent with its versions, releases and active release

GET
/v1/agents/{id}

The agent's settings: its card versions, releases and active release. Read by the workspace's owners and admins and by those inside the agent: its admins and the live members of its managing team. A member outside it gets 403 and reads the agent's row from GET /v1/agents (ids) instead, or 404 while the workspace's agent_outsider_access is none, since the agent is then hidden from them; an id of no agent in the workspace is 404. A private agent the caller may not use is 404 too, with the body of an id of no agent, whatever the caller's other rights outside it. It changes nothing.

Auth: cookie session only; no scope.

Authorization

cookieSession
cookie__Host-werft_session<token>

For the web console: the browser session cookie set by POST /v1/auth/login. It holds the scopes of the user's workspace role (owner: all; admin and member: all but sessions:recover). Requests other than GET must also send X-Requested-With: werft-web.

Path Parameters

id*string

The agent's id.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Response Body

Success

application/json
  1. response
agent*
versions*array<>
releases*array<>
active_release*|null
behavior_revision*integer
Range0 <= value <= 2147483647
model_source*string
Value in"fixed""profile"
draft*|null
effective_behavior*
profile_tracking?string
Value in"follow""pinned"
profile_rollout?|null
Example Request
curl -X GET 'https://example.com/v1/agents/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "agent": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9",    "slug": "string",    "name": "string",    "description": "string",    "managing_team_id": "911b0313-617e-40f5-9150-864225bf0223",    "managing_team_name": "string",    "status": "active",    "active_release_id": "string",    "activation_revision": -1,    "auto_model_migration": true,    "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z"  },  "versions": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978",      "version_no": 1,      "card": {        "role": "string",        "instructions": "string",        "language": "follow-user",        "model": "string",        "capabilities": {          "mcp": [            {              "server": "string"            }          ],          "forbidden": [],          "tool_policy": {            "per_tool": {              "property1": "allow",              "property2": "allow"            }          },          "credential_refs": [            "string"          ],          "env": [            {              "name": "string"            }          ]        },        "rules": []      },      "content_sha256": "string",      "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",      "created_at": "2019-08-24T14:15:22Z"    }  ],  "releases": [    {      "id": "string",      "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978",      "version_id": "9e94c502-ca41-4342-a7f7-af96b444512c",      "card_sha256": "string",      "runtime_profile_id": "string",      "repository_id": "string",      "profile_digest": "string",      "runtime_config_snapshot": {        "property1": null,        "property2": null      },      "effective_tools": {        "tools": [          "string"        ],        "mcp": [          "string"        ]      },      "policy_pins": {        "tools": {          "default": {            "builtin": "allow",            "mcp": "allow"          },          "per_tool": {            "property1": "allow",            "property2": "allow"          }        },        "github": {          "repositories": [            "string"          ],          "push_approval": true,          "features": {            "workflows": true,            "actions": true,            "checks": true,            "issues": true,            "review": true          },          "actions_allow": [            {              "workflow": "string",              "ref": "string"            }          ]        }      },      "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",      "created_at": "2019-08-24T14:15:22Z",      "approved_by": "02030314-b162-4b4d-8af1-88eabdcc615d",      "approved_at": "2019-08-24T14:15:22Z",      "note": "string",      "label": "string",      "activated_at": "2019-08-24T14:15:22Z",      "deactivated_at": "2019-08-24T14:15:22Z"    }  ],  "active_release": {    "id": "string",    "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978",    "version_id": "9e94c502-ca41-4342-a7f7-af96b444512c",    "card_sha256": "string",    "runtime_profile_id": "string",    "repository_id": "string",    "profile_digest": "string",    "runtime_config_snapshot": {      "property1": null,      "property2": null    },    "effective_tools": {      "tools": [        "string"      ],      "mcp": [        "string"      ]    },    "policy_pins": {      "tools": {        "default": {          "builtin": "allow",          "mcp": "allow"        },        "per_tool": {          "property1": "allow",          "property2": "allow"        }      },      "github": {        "repositories": [          "string"        ],        "push_approval": true,        "features": {          "workflows": true,          "actions": true,          "checks": true,          "issues": true,          "review": true        },        "actions_allow": [          {            "workflow": "string",            "ref": "string"          }        ]      }    },    "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",    "created_at": "2019-08-24T14:15:22Z",    "approved_by": "02030314-b162-4b4d-8af1-88eabdcc615d",    "approved_at": "2019-08-24T14:15:22Z",    "note": "string",    "label": "string",    "activated_at": "2019-08-24T14:15:22Z",    "deactivated_at": "2019-08-24T14:15:22Z"  },  "behavior_revision": 0,  "model_source": "fixed",  "draft": {    "version_id": "9e94c502-ca41-4342-a7f7-af96b444512c",    "runtime_profile_id": "string",    "model_source": "fixed",    "failure": "string"  },  "effective_behavior": {    "applied": {      "runtime_profile_id": "string",      "model": "string",      "model_source": "fixed",      "title_model": "string"    },    "draft": {      "runtime_profile_id": "string",      "model": "string",      "model_source": "fixed",      "title_model": "string"    }  },  "profile_tracking": "follow",  "profile_rollout": {    "status": "pending",    "reason": "string",    "target_profile_id": "string"  }}