---
title: Knowledge, memory and web research
description: Let an agent search your knowledge stores with citations, remember
  across tasks, and research the web, each decided by Titan.
url: https://hexelstudio.com/docs/harness/knowledge-and-memory
---

<Note>
On request. Knowledge search, agent memory and web research are built but each needs setting up for your organization. Ask Hexel Studio if you need one of them.
</Note>

Each of these gives an agent tools that go through Titan like its sandbox tools: your policy decides every call and the Agent Ledger records it.

## Knowledge search

A bundle names the knowledge stores the agent may search, in Atlas, Hexel Studio's context service:

```yaml
knowledge:
  - {store_id: kb_handbook, description: The engineering handbook}
  - kb_runbooks
```

Up to 20 stores. The agent gets `knowledge_search(query, store_id?, top_k?)`. Each call is Titan's `atlas.knowledge.search` capability: your policy may allow it or ask a person, and a store the bundle does not name is refused before Titan is asked.

Each result has a citation id, `atlas:<store_id>/<document_id>#<chunk_id>`, and its source URI; the agent cites by those ids. Results are content, so they stay in your runtime.

## Agent memory

A bundle asks for memory scopes:

```yaml
memory:
  scopes: [task, session, agent, workspace]
```

| Scope | Shared by |
| --- | --- |
| `task` | The runs of one task |
| `session` | One run |
| `agent` | Every task of this agent in the environment |
| `workspace` | Every agent in the environment |

The agent gets `remember(text, scope)` and `recall(query, scope?)`. Each call is a Titan capability (`harness.memory.remember`, `harness.memory.recall`). A scope the bundle does not list is refused.

Memory is guarded against leaking and against poisoning:

- `remember` is refused once the session holds content from a connected account, a knowledge search or the web.
- Memories other tasks wrote are untrusted. A `recall` that returns `agent` or `workspace` memories marks the session: from then on, a person confirms each `shell`, `write_file` and `edit_file`, and the session writes no more memory. `task` and `session` memories do not mark it.
- A run's `session` memories are erased when it ends; a task's `task` memories when the task is deleted.

Memory operations are billed on the harness meter `harness.memory_operations` ([Limits and pricing](https://hexelstudio.com/docs/harness/limits-and-pricing)).

## Web research

`web` in a bundle's `tools` gives the agent `web_fetch` and `web_search`.

- **Search** is the model provider's hosted search, billed per search on `harness.web_search_calls`.
- **Fetch** is decided by Titan on the URL's host (`harness.web.host`): your policy allows listed hosts and asks a person for any other. A URL with credentials, a non-default port or an IPv6 literal is refused. A redirect is followed only on the same host and never from `https` to `http`.
- **Untrusted content.** Web results mark the session: from then on a person confirms each `shell`, `write_file` and `edit_file` call before Titan decides it as usual. Once the session also holds private data (a knowledge search), `web_fetch` and `web_search` ask the same way.
