> For the complete documentation index, see [llms.txt](https://docs.zerve.ai/zerve-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zerve.ai/zerve-docs/agents-in-the-workspace/giving-the-agent-context.md).

# Giving the agent context

Give the agent files, skills, other notebooks and data to work with.

The more relevant context the agent has, the better its work. You can give it files, skills, other notebooks and access to your data.

## From the composer

Open the **+** menu in the agent composer:

| Option                  | What it does                                                                                                                            |
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| **Upload Files**        | Attach files to your message, such as a spreadsheet, a PDF or a sample of data                                                          |
| **Use Skills**          | Attach [skills](/zerve-docs/agents-in-the-workspace/skills.md) for the agent to follow on this request                                  |
| **Reference Notebooks** | Let the agent read other notebooks, including their code, outputs and [Learnings](/zerve-docs/agents-in-the-workspace/learnings.md)     |
| **Subagents**           | Choose [custom subagents](/zerve-docs/agents-in-the-workspace/custom-subagents.md) for the agent to use. Only available in Evolve Mode. |

### File limits

| Limit           | Value                  |
| --------------- | ---------------------- |
| **Per file**    | 1 MB                   |
| **Per message** | 5 files, 2 MB in total |

For larger data, use a [data connection](/zerve-docs/data-and-assets/connections.md) or add the file to the notebook's [files](/zerve-docs/notebooks/files.md) instead.

### Referencing notebooks

Referencing a notebook gives the agent read-only access to it. It's the quickest way to build on earlier work: the agent can see how a previous analysis was done, and read that notebook's Learnings for its findings and assumptions.

> Using the approach in the "Q3 factor review" notebook, run the same analysis on Q4 data.

## Through the notebook

The agent can also use what's attached to the notebook it's working in:

* [**Data connections**](/zerve-docs/data-and-assets/connections.md), such as your Snowflake warehouse
* [**Constants and secrets**](/zerve-docs/data-and-assets/constants-and-secrets.md), such as API keys for data providers
* [**Functions**](/zerve-docs/data-and-assets/functions.md), such as your team's shared code

## Through your tools

[MCP servers](/zerve-docs/agents-in-the-workspace/mcp-servers.md) you've connected give the agent tools for other systems, which it finds and uses as it needs them.

## In your message

Context in the message itself matters too. Say what the work is for, what good looks like and any constraints, for example:

> This is for the Monday risk meeting, so keep it to one page. Use our positions data in Snowflake, not the vendor feed, and report everything in basis points.

For instructions you give repeatedly, write a [skill](/zerve-docs/agents-in-the-workspace/skills.md) instead.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.zerve.ai/zerve-docs/agents-in-the-workspace/giving-the-agent-context.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
