# document

Canonical URL: https://developers.iagenify.com/pt/sdk/agent/tools/document/
Language: pt

`document({ action: "add" | "list" | "remove", path?, storage?, document? })`

Indicza un documente per che la ricerca semântica possa trobarla per significat. Senza di essa, quella ricerca solo mai trova quello che un humano uploaded.

Status: read on list, write otherwise · feeds query_storage search · workspace files

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `action` | string | obrigatório | `add` · `list` · `remove`. |
| `path` | string |  | Fichier di workspace a indexare — a PDF, a DOCX, testo. |
| `storage` | string |  | Per label. Default del cont, altrimenti. |
| `document` | string |  | Id, da `list`. |

## Finalidade {#why}

> **Chiude un loop il agente non puèr chiudere da sè**
>
> query_storage { azione: "search" } trova documenti per significat — ma solo quelli che sono indexati. Senza questo strumento un agente potrebbe produrre un report e mai mai essere in grado di reperit dal che dice.

## La paia {#pair}

```javascript
document({ action: "add", path: "Reports/q3.pdf" })
query_storage({ action: "search", query: "what did we say about churn" })
```

## Custo {#cost}

L'indexare carica il file e consume l'espace del storage. La ricerca in si è un credito per chiamata.

## lista è gratis {#list}

La categoria è calculata a partir de l'azione: listando è un let, aggiundu e removindo scrie.

- [query_storage](/pt/sdk/agent/tools/query-storage): La ricerca di questo feed.
- [ricerca](/pt/sdk/ref/connected-storage/run/search): L'actèn enseme.
- [Ferramentas do agente](/pt/sdk/agent/tools): The 35, by family.

```python
# The calls the model makes:
document = {"action": "add", "path": "Reports/q3.pdf"}
query_storage = {"action": "search", "query": "what did we say about churn"}
```
