> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs-beta.getzep.com/v4/sdk-reference/agent/trajectories/abandon/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs-beta.getzep.com/_mcp/server. # Abandon Agent Trajectory POST https://api.getzep.com/api/v4/agents/{agent_uuid}/trajectories/{trajectory_uuid}/abandon Content-Type: application/json Reference: https://docs-beta.getzep.com/sdk-reference/agent/trajectories/abandon ## 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 - `trajectory_uuid` (string, required) — Trajectory UUID ### Body (application/json) This endpoint expects a v4.AbandonAgentTrajectoryRequest. - `highest_accepted_sequence` (integer, required) - `assertion_uuid` (string, optional) - `expected_revision` (integer, optional) - `missing_sequence_ranges` (list of v4.AgentTrajectorySequenceRange, optional) - `reason` (string, optional) - `verification` (enum, optional) - Allowed values: `none`, `agent`, `tool`, `customer`, `external` ## Response ### 202 Accepted - `task` (v4.Task, optional) - `trajectory` (v4.AgentTrajectory, optional) ## Errors ### 400 Bad Request Error Bad Request - `error` (v4.ErrorBody, optional) ### 409 Conflict Error Conflict - `error` (v4.ErrorBody, optional) ## Types ### v4.AgentTrajectorySequenceRange - `first` (integer, required) - `last` (integer, required) ### v4.Task - `completed_at` (string, optional) — The time the task reached a terminal status; absent while it is still in progress. - `created_at` (string, optional) — The time the task was created. - `error` (v4.ErrorBody, optional) — The error that caused the task to fail; also present on a partial task when the worker can name a single cause. - `progress` (v4.TaskProgress, optional) — The last processing stage a worker reported for this task. It is not cleared when the task finishes, so a completed task may still show its final stage. - `result` (map from string to any, optional) — Operation-specific output populated once the task reaches succeeded or partial, such as identifiers the operation could not return synchronously. - `started_at` (string, optional) — The time a worker began processing the task; absent until then. - `status` (string, optional) — The task's current state: pending, processing, succeeded, partial, or failed. - `type` (string, optional) — The kind of asynchronous operation the task represents. - `updated_at` (string, optional) — The time the task was last updated. - `uuid` (string, optional) — The unique identifier of the task, used to poll its status. ### v4.AgentTrajectory - `abandoned_at` (string, optional) — The time the Trajectory was abandoned. - `agent_uuid` (string, optional) — The owning Agent UUID. - `attempt_family_uuid` (string, optional) — The stable retry-family identity shared with declared child attempts. - `closed_at` (string, optional) — The time the Trajectory closed. - `created_at` (string, optional) — The time the Trajectory was created. - `internal` (v4.AgentTrajectoryInternal, optional) — Server-owned fields that are not part of the top-level capture contract. - `learn_from` (boolean, optional) — Whether eligible evidence may participate in learning. - `learn_from_reason` (string, optional) — Why the Trajectory is not eligible for learning. - `metadata` (map from string to any, optional) — Developer metadata used for exact containment filters. - `objective` (string, optional) — The task-instance objective captured for this attempt. - `outcome` (enum, optional) — The caller-owned task outcome. - Allowed values: `succeeded`, `failed`, `partial`, `abandoned`, `unknown` - `parent_trajectory_uuid` (string, optional) — The parent attempt when this Trajectory is a retry. - `revision` (integer, optional) — The revision required by the next update or lifecycle command. - `source` (v4.AgentTrajectorySource, optional) — The source record for an imported Trajectory. - `status` (enum, optional) — The current lifecycle state. - Allowed values: `open`, `closing`, `closed`, `abandoned`, `deleted` - `task_family` (string, optional) — The optional opaque task-family classification slug. - `trajectory_id` (string, optional) — The optional customer-assigned identifier, unique within the Agent. - `updated_at` (string, optional) — The time the Trajectory was last updated. - `uuid` (string, optional) — The stable Trajectory UUID. - `verification` (enum, optional) — The strength of the accepted outcome verification. - Allowed values: `none`, `agent`, `tool`, `customer`, `external` ### v4.ErrorBody - `code` (string, optional) - `details` (map from string to any, optional) - `message` (string, optional) - `param` (string, optional) - `request_id` (string, optional) ### v4.TaskProgress - `stage` (string, optional) — The most recent processing stage reported by the worker handling the task. ### v4.AgentTrajectoryInternal - `assertion_uuid` (string, optional) - `closing_sequence` (integer, optional) - `current_summary_version` (integer, optional) - `last_task_uuid` (string, optional) - `next_sequence` (integer, optional) - `processing_state` (enum, optional) - Allowed values: `idle`, `pending`, `processing`, `failed` ### v4.AgentTrajectorySource - `connection_uuid` (string, optional) - `import_uuid` (string, optional) - `imported_at` (string, optional) - `kind` (enum, optional) - Allowed values: `trace_import` - `provider` (string, optional) - `provider_project_id` (string, optional) - `run_uuid` (string, optional) - `scores` (map from string to any, optional) - `source_changed` (boolean, optional) — SourceChanged reports whether the provider trace changed after import. - `source_revision` (string, optional) - `source_url` (string, optional) - `trace_ended_at` (string, optional) - `trace_id` (string, optional) - `trace_started_at` (string, optional) ## Examples **Request** ```json { "highest_accepted_sequence": 1 } ``` **Response** ```json { "task": { "completed_at": "string", "created_at": "string", "error": { "code": "string", "details": {}, "message": "string", "param": "string", "request_id": "string" }, "progress": { "stage": "string" }, "result": {}, "started_at": "string", "status": "string", "type": "string", "updated_at": "string", "uuid": "string" }, "trajectory": { "abandoned_at": "string", "agent_uuid": "string", "attempt_family_uuid": "string", "closed_at": "string", "created_at": "string", "internal": { "assertion_uuid": "string", "closing_sequence": 1, "current_summary_version": 1, "last_task_uuid": "string", "next_sequence": 1, "processing_state": "idle" }, "learn_from": true, "learn_from_reason": "string", "metadata": {}, "objective": "string", "outcome": "succeeded", "parent_trajectory_uuid": "string", "revision": 1, "source": { "connection_uuid": "string", "import_uuid": "string", "imported_at": "string", "kind": "trace_import", "provider": "string", "provider_project_id": "string", "run_uuid": "string", "scores": {}, "source_changed": false, "source_revision": "string", "source_url": "string", "trace_ended_at": "string", "trace_id": "string", "trace_started_at": "string" }, "status": "open", "task_family": "string", "trajectory_id": "string", "updated_at": "string", "uuid": "string", "verification": "none" } } ```