AgentService
Agents

Get an agent by ID

Retrieves an agent by ID from the workspace

get/v1/workspaces/{workspaceId}/agents/{id}

Path parameters

workspaceIdstring required
Example:workspace_01HXKD2E5NQM3T9AYWCF133E3Q

Workspace ID.

idstring required
Example:agent_01HXKD2E5NQM3T9AYWCFMGWT9Y

Agent ID. Accepts the canonical agent_… form or the external_id:<value> form.

Response

OK

state'STATE_UNSPECIFIED' | 'STATE_DRAFT' | 'STATE_PUBLISHED' | 'STATE_ARCHIVED' enum required

The current lifecycle state of the agent. Output only. Agents are created in STATE_DRAFT; use the :publish, :unpublish, :archive, and :unarchive actions to transition between states.

Example response

{
  "metadata": {
    "accountId": "account_01HXKD2E5NQM3T9AYWCFTJHJVF",
    "workspaceId": "workspace_01HXKD2E5NQM3T9AYWCF133E3Q",
    "profileId": "profile_01HXKD2E5NQM3T9AYWCFS0AP08"
  },
  "info": {
    "createdBy": {
      "metadata": {
        "accountId": "account_01HXKD2E5NQM3T9AYWCFTJHJVF",
        "profileId": "profile_01HXKD2E5NQM3T9AYWCFS0AP08"
      }
    }
  }
}

Changes

Changed in 5 of the 57 revisions of this API.136

    • removed the optional property spec/allOf[AgentSpec]/inputDataSchema from the response with the 200 status

      response-optional-property-removed

    • added the optional property spec/allOf[AgentSpec]/systemPromptDataSchema to the response with the 200 status

      response-optional-property-added

    • removed the optional property metadata/allOf[ResourceMetadata]/bundleKey from the response with the 200 status

      response-optional-property-removed

    • added the optional property info/allOf[AgentInfo]/createdBy/metadata/createdAt to the response with the 200 status

      response-optional-property-added

    This revision also has 27 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the optional property spec/allOf[AgentSpec]/enableEpisodicMemory to the response with the 200 status

      response-optional-property-added

    • added the optional property spec/allOf[AgentSpec]/episodicMemoryTtl to the response with the 200 status

      response-optional-property-added

    • removed the required property spec/allOf[AgentSpec]/status from the response with the 200 status

      response-required-property-removed

    • added the optional property metadata/allOf[ResourceMetadata]/updatedAt to the response with the 200 status

      response-optional-property-added

    • added the required property state to the response with the 200 status

      response-required-property-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the new PROFILE_TYPE_UNSPECIFIED enum value to the info/allOf[AgentInfo]/createdBy/spec/type response property for the response status 200

      response-property-enum-value-added