Skip to main content
This guide shows you how to manage contexts using the v2 Agentic API. Contexts are first-class resources with their own endpoints for listing, inspection, and deletion.

Prerequisites

List contexts

The GET /v2/agentic/contexts listing endpoint is in private preview — it returns an empty list and ignores all filters. Use GET /v2/agentic/contexts/{contextId} to retrieve a specific context.

Filtering

The response is paginated with contexts, nextPageToken, and totalSize fields.

Get a context

Use the historyLength query parameter to cap the number of history messages returned per task:
The response includes the context’s metadata and its tasks array (oldest first). Each task carries its full message history.

Delete a context

Deleting a context is irreversible. All associated tasks, messages, and artifacts are permanently removed.

List tasks in a context

Get a specific task in a context

Get an artifact

Retrieve a specific artifact produced by a task:

Next steps