> For the complete documentation index, see [llms.txt](https://www.conserver.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.conserver.io/tools/vcon-anthropic-chats.md).

# vCon Anthropic Chats

Convert Claude Code session files and claude.ai conversation exports into vCons from the command line.

**Repo:** [VCONIC/vcon-anthropic-chats](https://github.com/VCONIC/vcon-anthropic-chats) · **Version:** `0.1.0` · Python 3.12+

A command-line converter that turns Claude conversations into vCons, one vCon per chat. It reads two sources, auto-detected from the input path:

* Claude Code sessions, the JSONL files under `~/.claude/projects/<encoded-cwd>/`
* The `conversations.json` file from a claude.ai account data export

It does not call the Anthropic API.

## Install and run

```bash
pip install -e .

vcon-anthropic-chats <input-path> \
    [--source auto|claude-code|claude-web] \
    [--out-dir ./out] [--post-url https://example.com/vcons] \
    [--auth-header-env VCON_AUTH] [--user-email you@example.com] \
    [--agent-id sip:claude@anthropic.com] [--overwrite] [--dry-run]
```

The input is a positional path (a file or a directory), not stdin. Give at least one of `--out-dir` or `--post-url` unless you pass `--dry-run`. `--auth-header-env` names an environment variable holding the full header value, for example `Authorization: Bearer ...`, so the token stays off the command line.

```bash
vcon-anthropic-chats ~/.claude/projects/-Users-me-Documents-GitHub-myrepo --out-dir ./vcons
```

## What the output looks like

Syntax `0.4.0`. Messages become text dialog entries between a customer party and an agent party. The rest is preserved so the conversion loses nothing:

* Tool calls and results as attachments of type `tool_use` and `tool_result`
* Thinking blocks as analysis entries of type `thinking`
* Other Claude-specific blocks as `claude.<kind>` attachments
* Session details as a `claude.session_metadata` attachment
* The original input file as a `source` attachment, base64url encoded

## Spec gaps

The converter predates the current drafts, so treat its output as a starting point.

* It does not use the [Agent Session extension](https://www.conserver.io/extensions/agent-session.md): no `extensions[]` array, and the attachments above use a `type` key with the names listed, not the extension's purposes.
* It writes no `lawful_basis` attachment. Add one before storing the vCons. See [Lawful Basis](https://www.conserver.io/extensions/lawful-basis.md).

## See also

* [vCon MCP Adapters](https://www.conserver.io/tools/vcon-mcp-adapters.md), which converts other agent framework traces
* [vCon Adapter Development Guide](https://www.conserver.io/vcon-adapters/vcon-adapter-development-guide.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.conserver.io/tools/vcon-anthropic-chats.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
