[Source](https://sheaf.us/agent-first.html)

MCP connector and REST API

# Agent-first document management

Your agent works on your cases directly: Claude through the MCP connector, any other agent through the REST API.

## What an outside agent can do

`…` stands for `/api/applications/{id}`.

**What an outside agent can do, by connector tool and API call**

| Capability | Example | Claude (connector tool) | Any agent (API call) |
| --- | --- | --- | --- |
| Find and open cases | Cases by how complete their document list is | `list_applications`, `lookup_application` | `GET /api/applications`, `GET …` |
| Create a case | A case on the Purchase Loan (CA) list | `list_expected_doc_lists`, `create_application` | `POST /api/applications` |
| Add files | Send two PDFs from Claude’s sandbox | `create_upload_link` | `POST …/files` |
| [Request documents from a customer](document-intake.md) | Ask the borrower for pay stubs and bank statements | `create_request_link` | `POST …/request-links` |
| [Split, classify, extract](document-splitting.md) | Run the case’s workflow on new files | `list_workflows`, `start_workflow_run` | `POST /api/workflows/{id}/runs`, `POST …/run/gate`, `POST …/run/cancel` |
| [Search and read pages](use-your-data.md) | Find “loan amount”, then read that page | `search_case_text`, `read_parsed_pages` | `GET …/search`, `GET …/text`, `GET …/pages-pdf` |
| List and download documents | A filed document’s PDF | `list_documents` | `GET …/documents`, `GET …/approved-docs/{docId}/file` |
| [Read extracted values](document-extraction.md) | Net pay from each pay stub | — | `GET …/analysis`, `POST …/run/tool` |
| [Match a document](document-matching.md) | Pages 12–13 are the W-2 | `approve_document` | `POST …/document-approvals` |
| File pages no document claimed | File page 40 under Gift Letter, or archive it | `file_pages` | `POST …/placements` |
| Tag a document | Priority, or Excluded from search | `tag_document` | `POST …/document-tags` |
| Cited briefs | A cited summary of the case | `list_intel_templates`, `start_intel_brief`, `list_intel_briefs`, `get_intel_brief` | `POST …/intel-briefs`, `GET …/intel-briefs/{briefId}` |
| [Teach (fine-tune)](fine-tune-results.md) | Add a test for a misread total, then read the report | — | `POST …/files/{fileId}/pages/{page}/teach-tests`, `GET …/teach-report` |
| [Audit trail](audit.md) | Who changed what, and when | — | `GET …/events` |
| Webhooks | A signed POST when a run finishes | — | a Manager adds the endpoint |
| Stored files | Your folders and files, with sizes and dates | `list_storage` | `GET /api/storage` |
| Models | The model options for each step | — | `GET /api/models/options` |

## How an agent connects

- **Claude** (claude.ai, the Claude app, Cowork, Claude Code): add the connector `https://sheaf.us/api/mcp` and sign in once. It acts as that person, with their role. [Connect Claude](docs/agents/connect-claude)
- **Any agent that runs code** (Claude Code, Codex): paste the setup from Settings → API keys, or connect with a pairing code. An API key acts as an Originator in the organization. [Connect an agent](docs/agents/connect-an-agent)
- **Claude, ready-made:** the skill or the plugin, [`sheaf-skill.zip`](sheaf-skill.zip) or [`sheaf-claude-plugin.zip`](sheaf-claude-plugin.zip). The plugin adds the connector too. [Add the skill](docs/agents/claude-skill)
- **Try it:** `POST /api/guest` returns a key for a guest sandbox with a sample case, open for 24 hours, at 10 requests a minute.
- **Docs an agent reads:** [`/skill.md`](skill.md), [`/llms.txt`](llms.txt), any docs page as `.md`, and [`/api/openapi.json`](api/openapi.json) without a key. [Docs for agents](docs/agents/using-sheaf-from-an-agent)

## Your data

- Your documents can sit in your own S3 bucket in a standard folder layout, so a project or the whole library copies out. [You keep your data](index.md#your-data)
- Your database, your storage, your model keys. [Whitelabel](whitelabel.md#your-data)
- You keep all rights, with 30 days to export after you leave. [Terms](terms.md)
- Role checks on every request, and fixed retention. [Security and data](security.md)

## Safeguards

- Every change an agent makes is in the [audit trail](audit.md), shown, for example, as “Agent via Claude · jane@example.com”.
- An agent can match documents but never reject them. Only a person gives Teach verdicts.
- Flagged files wait for a person. Another organization’s case answers “not found”.

## Related

**Connect Claude**

**API endpoints**

**Security and data**
