---
# @generated by sylphx-gen. Do not edit.
title: "Export an agent session"
description: "`agents.agent_sessions.export` (GET /v1/{name}:export): Exports a redacted transcript at the current idle Session frontier."
type: reference
product: agents
summary: "Exports a redacted transcript at the current idle Session frontier."
nav: false
---

Exports a redacted transcript at the current idle Session frontier. This is read-only; it neither exports private replay state nor fences the writer.

- **Path** `GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/agent_sessions/agent-session:export`
- **Scope** `agents:sessions`
- **Effect** `read` — nothing is written.
- **Collection** [agent_sessions](/docs/api/agent_sessions)

## Request

| Field | Type | What it is |
| --- | --- | --- |
| `name` | `string` | Canonical Session resource name. Required. |

## Response

| Field | Type | What it is |
| --- | --- | --- |
| `snapshot` | `bytes` | UTF-8 JSON (base64 on HTTP): format, pinned agent and agent_version, model binding, last_event_sequence, ordered public events and optional workspace_diff_artifact. Integer event coordinates are decimal strings. Never returned again. |
| `snapshot_sha256` | `string` | Lowercase SHA-256 hex of the exact decoded snapshot bytes. |

## Errors

- [`UNAUTHENTICATED`](/docs/api/errors/UNAUTHENTICATED) — No valid key or token was presented.
- [`PERMISSION_DENIED`](/docs/api/errors/PERMISSION_DENIED) — The key lacks the method's permission.
- [`RESOURCE_NOT_FOUND`](/docs/api/errors/RESOURCE_NOT_FOUND) — The named Resource does not exist or is not visible.
- [`INVALID_STATE`](/docs/api/errors/INVALID_STATE) — The Resource is in a state that forbids the call.

Every error arrives in the body [Errors](/docs/platform/errors) describes.

## Examples

**cURL**

```curl
curl "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/agent_sessions/agent-session:export" \
  -H "Authorization: Bearer $SYLPHX_API_KEY"
```

**TypeScript**

```ts
const response = await sylphx.agents.agentSessions.export({ name: 'orgs/acme/projects/shop/envs/production/agent_sessions/agent-session' })
```

**Rust**

```rust
let mut req = sylphx::agents::ExportAgentSessionRequest::default();
req.name = "orgs/acme/projects/shop/envs/production/agent_sessions/agent-session".to_string();
let response = sx.agents().agent_sessions().export(req).await?;
```

**CLI**

```bash
sylphx agents agent-sessions export orgs/acme/projects/shop/envs/production/agent_sessions/agent-session
```

**MCP**

```json
{ "method_id": "agents.agent_sessions.export", "args": {"name":"orgs/acme/projects/shop/envs/production/agent_sessions/agent-session"} }
```
