Skip to Content
kosemdocs
ReferenceAPIAgents

Get last agent config

Gets the config that the caller last created an agent with in the project. For a person to start the next agent from; it fails with not_found until they've created one, and for service accounts. secretGrants leaves out secrets that were deleted, or that the caller can no longer grant. CreateAgent still takes a config whole, and fills nothing from this.

GET
/v1/projects/{project}/last-agent-config

Gets the config that the caller last created an agent with in the project.

For a person to start the next agent from; it fails with not_found until they've created one, and for service accounts. secretGrants leaves out secrets that were deleted, or that the caller can no longer grant. CreateAgent still takes a config whole, and fills nothing from this.

Authorization

bearer
headerAuthorizationBearer <token>

An access token, or an API key.

Path Parameters

project*string

The project's ID.

Match^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$

Response Body

OK

application/json
  1. response
config*

The config as they chose it. An image they left to the default stays empty.

grants?array<>

Safe carry-over grants from the last agent (read-only access profiles on project-visible agents; all grants on private agents).

secretGrants*array<string>

The secrets they granted it, as projects/{project_id}/secrets/{secret_id}, without those deleted since, or that they can no longer grant.

updateTime*string

When they created that agent.

Formatdate-time
visibility*string

Who could see that agent.

Value in"PROJECT""PRIVATE"
Example Request
curl -X GET 'https://api.kosem.ai/v1/projects/string/last-agent-config'
Example Response
{
  "config": {
    "environment": {
      "diskGib": 0,
      "env": {
        "property1": "string",
        "property2": "string"
      },
      "idleTimeoutSeconds": 0,
      "image": "string",
      "memoryMib": 0,
      "runnerPool": "string",
      "secrets": [
        {
          "credential": "string",
          "env": "string",
          "file": "string",
          "scope": {
            "property1": null,
            "property2": null
          },
          "secret": "string",
          "state": "ACTIVE",
          "stateReason": "string"
        }
      ],
      "stoppedTtlSeconds": 0,
      "vcpus": 0
    },
    "instructions": "string",
    "maxModelCalls": 0,
    "model": "string",
    "reasoningEffort": "",
    "tools": [
      "string"
    ]
  },
  "grants": [
    {
      "expireTime": "2019-08-24T14:15:22Z",
      "scope": {
        "property1": null,
        "property2": null
      },
      "target": "string"
    }
  ],
  "secretGrants": [
    "string"
  ],
  "updateTime": "2019-08-24T14:15:22Z",
  "visibility": "PROJECT"
}