> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs-beta.getzep.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs-beta.getzep.com/_mcp/server.

# Get Agent context

POST https://api.getzep.com/api/v4/agents/{agent_uuid}/context
Content-Type: application/json

Reference: https://docs-beta.getzep.com/sdk-reference/agent/get-context

## Authentication

- `Authorization` header (required) (prefixed with ` Api-Key  `) — Type "Api-Key" followed by a space and the project API key.

## Request

### Path parameters

- `agent_uuid` (string, required) — Agent UUID

### Body (application/json)

This endpoint expects a v4.GetAgentContextRequest.

- `environments` (list of v4.AgentContextResource, optional)
- `kind` (string, optional)
- `max_characters` (integer, optional)
- `models` (list of v4.AgentContextResource, optional)
- `objective` (string, optional)
- `task_family` (string, optional)
- `tools` (list of v4.AgentContextResource, optional)
- `trajectory_uuid` (string, optional)

## Response

### 200

OK

- `context` (string, optional)
- `objective` (string, optional)
- `partial_sources` (list of v4.AgentContextPartialSource, optional)
- `request_id` (string, optional)
- `skipped` (list of v4.AgentContextSkippedSkill, optional)
- `snapshot` (list of v4.AgentContextSkillSnapshot, optional)
- `task_family` (string, optional)
- `trajectory_uuid` (string, optional)
- `truncated` (boolean, optional)

## Errors

### 400 Bad Request Error

Bad Request

- `error` (v4.ErrorBody, optional)

### 401 Unauthorized Error

Unauthorized

- `error` (v4.ErrorBody, optional)

### 403 Forbidden Error

Forbidden

- `error` (v4.ErrorBody, optional)

### 404 Not Found Error

Not Found

- `error` (v4.ErrorBody, optional)

### 503 Service Unavailable Error

Service Unavailable

- `error` (v4.ErrorBody, optional)

## Types

### v4.AgentContextResource

- `name` (string, required)
- `version` (string, optional)

### v4.AgentContextPartialSource

- `reason` (string, optional)
- `source` (string, optional)
- `task_uuid` (string, optional)

### v4.AgentContextSkippedSkill

- `reason` (string, optional)
- `skill_uuid` (string, optional)
- `version` (integer, optional)

### v4.AgentContextSkillSnapshot

- `artifact_sha256` (string, optional)
- `evidence_citations` (list of string, optional)
- `evidence_counts` (v4.AgentContextEvidenceCounts, optional)
- `rank` (integer, optional)
- `skill_uuid` (string, optional)
- `version` (integer, optional)

### v4.ErrorBody

- `code` (string, optional)
- `details` (map from string to any, optional)
- `message` (string, optional)
- `param` (string, optional)
- `request_id` (string, optional)

### v4.AgentContextEvidenceCounts

- `contradicting` (integer, optional)
- `neutral` (integer, optional)
- `supporting` (integer, optional)

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "context": "string",
  "objective": "string",
  "partial_sources": [
    {
      "reason": "string",
      "source": "string",
      "task_uuid": "string"
    }
  ],
  "request_id": "string",
  "skipped": [
    {
      "reason": "string",
      "skill_uuid": "string",
      "version": 1
    }
  ],
  "snapshot": [
    {
      "artifact_sha256": "string",
      "evidence_citations": [
        "string"
      ],
      "evidence_counts": {
        "contradicting": 1,
        "neutral": 1,
        "supporting": 1
      },
      "rank": 1,
      "skill_uuid": "string",
      "version": 1
    }
  ],
  "task_family": "string",
  "trajectory_uuid": "string",
  "truncated": true
}
```