# Files: Sources you add by hand (/en/docs/files/sources)

This page helps you give files one thing to remember: a file, a web page or text you paste. files keeps it as a
document of its own, so you find it in search, an agent finds it when it looks something up, and facts can cite it.
A watched folder is for many files that keep changing ([Notes and folders](/llms.mdx/docs/files/notes/content.md)); this page is for one source.
Transcripts, exports and records of a source no WireCat tool syncs come in with `files import`
([Import files and records](/llms.mdx/docs/files/import/content.md)).

## Add a source [#add-a-source]

```sh
files sources add ~/Downloads/runner-notes.pdf --subject project:3
files sources add https://example.org/release-notes --title "Release notes"
pbpaste | files sources add - --subject person:12
```

| Give | files reads |
|---|---|
| A file's path | The file, with the readers of [Files it can read](/llms.mdx/docs/files/notes/content.md#files-it-can-read), web pages saved as `.html` or `.htm`, and meeting transcripts saved as `.vtt` or `.srt` |
| An `http` or `https` address | The page, once, from this computer, as it reads today |
| `-` | The text on stdin |

- **Only the text is kept.** files stores the text it read, the title and, for a page, the address you gave. It does
  not copy the file unless you add `--keep-copy`; then the file is copied into files' data folder, named by its
  content, so the same file added twice is kept once. `--keep-copy` takes a file only, not a page or pasted text.
- **The same source twice is one source.** Adding it again changes nothing but the subjects you add. A source whose
  content is already in a watched folder or in Drive is not stored again: the answer names that document as
  `duplicate_of`, and only the subjects are linked to it.
- **`--subject`** says who or what it is about: `person:`, `organization:`, `project:`, `task:`, `meeting:`, or a
  messenger contact such as `telegram:'Kai Sample'`. Repeat it for several. Your subjects count at once; an agent's
  wait unconfirmed until you confirm them.
- **`--title`** names it. Without one, files takes the page's or the file's own title, or the first line of the text.
- **`--max-chars`** keeps at most that many characters of text, up to 2,000,000 (default 200,000). The answer says
  `truncated: true` when only the first part was kept.

A meeting transcript saved as WebVTT (`.vtt`) or SubRip (`.srt`) is kept as what was said: one line per turn,
`Name: text` when the file names the speaker, without the timings.

A scanned PDF has no text files can read: it is kept by its title and subjects only (`read: "no-text"`).

An image (PNG, JPEG or WebP, up to 4 MB) is read by your AI model once you chose one and agreed that images go to it:

```sh
wcat models ai set anthropic --model claude-haiku-4-5 --allow-remote --secret-stdin < key.txt
wcat models ai check
```

The image is sent to that provider, so it leaves this computer (Ollama on this computer is the exception). The answer's
`image.read_by` names the model. Without a model, consent or key, or for a GIF or a larger image, the image is kept by
its title only, and `image.reason` says why: `ai.not-set`, `ai.images-not-allowed`, `ai.key-missing`,
`ai.owner-only` (an agent added it; only your own add sends an image), `ai.setting-invalid`, `image.unsupported` or
`ai.failed`. A change of the model or the address withdraws the consent until you give it again, and
`wcat models ai revoke` withdraws it at once.

## Look at a page before adding it [#look-at-a-page-before-adding-it]

```sh
files sources preview https://example.org/release-notes --json
```

`sources preview` reads a page the way `sources add` would, refuses what `sources add` refuses (a private address,
a page that asks you to sign in, too many redirects), and keeps nothing. It answers the page's `title` and
`description`, `site` (the host of the address you gave), the first 800 characters of its text as `excerpt`, and the
`kind`, `mime`, `read`, `chars` and `truncated` that `sources add` would answer at its default `--max-chars`. It takes
a web address only. Agents over MCP are not offered it: it fetches an address.

## What the answer says [#what-the-answer-says]

```sh
files sources add notes.txt --json
```

| Field | Means |
|---|---|
| `ref` | The document, such as `document:42`: the one to cite, show or remove |
| `created` | `true` when this call stored it; `false` when it was there already |
| `duplicate_of` | The watched-folder or Drive document with the same content, when nothing new was stored |
| `kind` | `file`, `page` or `text` |
| `mime`, `bytes` | The type and size of what was read |
| `chars`, `truncated` | How many characters of text the store keeps, and whether that is only the first part; `truncated` is `null` when the text was stored by an earlier add |
| `extractor`, `read` | The reader that read it, and `extracted` or `no-text` |
| `url` | The address you gave; the address a redirect ended at is never kept |
| `kept` | `text`, or `copy` when a copy of the file is kept too; `null` for a duplicate |
| `searchable.words` | Its text is in the word search now |
| `searchable.meaning` | Its text waits for search by meaning: the search model is downloaded and `notes.embed` is not `false`. `files sync` embeds it |
| `subjects` | Everything it is about now, the subjects linked before included |

## Look at a source [#look-at-a-source]

```sh
files sources show document:42
files sources show document:42 --bytes 65536 --json
files sources mentions document:42
```

`sources show` gives the text (16 KiB by default, `--bytes` for more), what it is (`kind`, the `url` you gave,
`file_name`, `mime`, `bytes`), whether a copy is kept, the subjects with whether each is confirmed, and what cites it:
`facts`, `memories` and the findings `batches` whose evidence names it. `kept` is `copy` only while the copy is
still in files' data folder. Any other document shows with `added: false` and these fields `null`.

`sources mentions` lists the people and organizations files already knows whose names appear in the text, read on
this computer. A person is found by a name files has seen in a messenger or a meeting, or by an e-mail address or
phone number of theirs; an organization by its whole name. A name several people share lists each of them. files
reads the names of up to 500 organizations; past that, the answer says so in `missing`.

## Have a reader propose facts [#have-a-reader-propose-facts]

A reader is a model you choose that reads a source and proposes the facts in it. You confirm each one; nothing
becomes a fact on its own.

```sh
files sources readers list
files sources readers set ai-model
files sources suggest document:42 --subject person:12
wcat actions confirm 17 fact-1 fact-3 --fingerprint <fingerprint>
```

**Choose a reader once.** `files sources readers list` shows each reader: whether it is installed and signed in, its
model, whether the text leaves this computer (`leaves_computer`), and whether it could open files here
(`reads_files`). It runs one read-only check per reader and chooses nothing. `files sources readers set <reader>`
chooses one; only you choose, and until you do, `sources suggest` refuses with `reader.none-chosen` and names the
readers.

| Reader | What reads the text | Leaves this computer | Model |
|---|---|---|---|
| `ai-model` | The AI model you chose for every WireCat tool (`wcat models ai set`), with its one key | Yes, except a model on this computer such as Ollama | The one `wcat models ai set` chose |
| `claude-code` | Your signed-in Claude Code, with every tool, MCP server, hook and saved session off, in an empty folder | Yes, to Anthropic | Its own, or `--model` |
| `codex` | Your signed-in Codex CLI in its read-only sandbox, in an empty folder. It is an agent that could still read files on this computer | Yes, to OpenAI | Its own, or `--model` |
| `ollama` | The Ollama running on this computer, at `127.0.0.1:11434` only | No | Required: one that `ollama list` shows |
| `openai`, `anthropic` | The provider's API with your own key | Yes | Required |

An API reader takes its key from the system keyring, never from an environment variable or the command line:
`wcat models ai set openai --secret-stdin` keeps it, for every WireCat tool. `wcat models ai revoke`
forgets it. The key is never printed.

**What `sources suggest` does.** It sends the source's stored text to the reader with an instruction to propose
facts, each with the exact words they rest on, and treats the text as data, never as instructions. Then it checks
each answer:

- the quote must be in the text word for word, with spacing and line breaks ignored; a fact whose quote is not there
  is dropped as `quote-not-found`;
- a fact needs a statement and one of the fact types (`fact`, `statement`, `question`, `decision`, `promise`);
- a fact already stored from this source is dropped and named as `duplicate_of`, and a fact repeated in the answer
  is kept once.

What remains is one findings batch that cites the source, each fact with its quote, staged by `memo-reader` with
the reader and model as its model. **Only you confirm it**, even when `agent_decisions` is on:
`wcat actions confirm <batch> [fact ids] --fingerprint <fingerprint>` creates the facts you name and rejects the
rest. A confirmed fact keeps its quote on its evidence, so a later source check knows which words it rests on. The
answer lists the `facts` staged and the `dropped` ones with why.

Reading the same text again with the same reader, model and subject returns the batch it staged before with
`reused: true` and does not ask the reader again. `--rescan` asks again. `--subject` says who or what every fact is
about: `person:`, `organization:`, `project:` or `task:`. `--provider` and `--model` read with another reader once;
only you may give them.

An agent in its terminal may run `sources suggest`, but only with the reader you chose, and the batch still waits for
you. Over MCP it is not offered: an agent cannot send a source's text off this computer.

## Remove a source [#remove-a-source]

```sh
files sources remove document:42
```

Only you remove a source you added. Its text goes, the copy files kept is deleted, and the answer lists the facts and
memories that cite it as `facts` and `memories`. Removing changes none of them: they keep their status, and the next
source check of `files sync` opens a review of each, citing a source that is gone, for you to decide. A file on your
disk is never touched.

## For an agent [#for-an-agent]

An agent in a terminal adds a source the same way, and its subjects wait for you to confirm them:

```text prompt
Use the WireCat files CLI to keep these meeting notes as a source about Northbridge Bench, then list the people named in it.
```

Over MCP, `sources add` takes `text` only: an agent cannot make files read a file on this computer or open an
address. `sources remove`, `sources suggest` and `sources readers set` are not offered over MCP
([The MCP server](/llms.mdx/docs/files/configuration/content.md)).

## When adding fails [#when-adding-fails]

Each refusal names its reason and what to do next; [Troubleshooting](/llms.mdx/docs/files/troubleshooting/content.md) lists them
all, and the reasons a reader refuses. A link that needs you signed in, such as a private Google Doc, cannot be read this way: save it as a file and
add the file.
