> ## Documentation Index
> Fetch the complete documentation index at: https://docs.case.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Linc Overview

> Run durable, stateful legal agent sessions in an isolated sandbox.

Linc is the Case.dev API for intensive agent work. A Linc session keeps its own sandbox,
conversation history, installed skills, scoped Case.dev credentials, and resumable runtime state.
Use it for work that needs tools, files, multiple turns, or long-running legal analysis.

<Info>
  Linc replaces the former Agent Chat and Agent Run APIs. New integrations should use only the
  `/linc/v1/sessions` endpoints.
</Info>

## Session lifecycle

1. Create a session with `POST /linc/v1/sessions`.
2. Poll `GET /linc/v1/sessions/{id}/state` until the status is `active`.
3. Send native Linc commands with `POST /linc/v1/sessions/{id}/rpc`.
4. Follow live events at the `streamUrl` returned during creation, or replay durable events and
   messages through the API.
5. Cancel the current turn without ending the session, or delete the session when the work is
   complete.

| Endpoint                              | Purpose                                          |
| ------------------------------------- | ------------------------------------------------ |
| `POST /linc/v1/sessions`              | Create and provision a session                   |
| `GET /linc/v1/sessions/{id}/state`    | Read provisioning and live runtime state         |
| `POST /linc/v1/sessions/{id}/rpc`     | Send a prompt or another native Linc command     |
| `GET /linc/v1/sessions/{id}/events`   | Replay durable native events                     |
| `GET /linc/v1/sessions/{id}/messages` | Replay completed messages                        |
| `POST /linc/v1/sessions/{id}/cancel`  | Abort the current turn while keeping the session |
| `DELETE /linc/v1/sessions/{id}`       | End the session and stop its runtime             |

## Quickstart

```bash title="Create a session" theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
curl -X POST https://api.case.dev/linc/v1/sessions \
  -H "Authorization: Bearer $CASEDEV_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Review the acquisition agreement",
    "vaultIds": ["vault_123"],
    "skillSlugs": ["contract-review"]
  }'
```

Creation returns `202 Accepted` while the sandbox is provisioning. Save the returned `id` and
event URLs, then [send a prompt](/linc/sessions) after the session becomes active.

## Authentication and scope

Linc requires a Case.dev API key with `agent:read` and `agent:write` permissions. When you attach
vaults, the sandbox receives a short-lived, session-scoped credential instead of your original
key. A session can access only the resources included in its resolved scope.

The full request and response schemas are available in the [API Reference](/api-reference).
