> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trycaesar.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent Development Kit

> Use Caesar as function tools or MCP tools in Agent Development Kit projects.

Agent Development Kit projects usually need only two Caesar tools: search and read. If your runtime can consume MCP tools, connect the [remote MCP server](/clients/mcp/remote). If you prefer local function tools, wrap the Python SDK:

```bash theme={"system"}
pip install caesar-search
```

## Function implementations

```python theme={"system"}
from typing import Any

from caesar_search import Caesar

client = Caesar()  # reads CAESAR_API_KEY


def web_search(query: str, max_results: int = 5) -> dict[str, Any]:
    """Search the web with Caesar and return compact, citable results."""
    response = client.search(query, max_results=max_results, verbosity="compact")
    return response.model_dump()


def web_fetch(target: str, query: str | None = None, max_chars: int | None = None) -> dict[str, Any]:
    """Read a Caesar doc_id or URL as clean markdown."""
    response = client.read(target, query=query, max_chars=max_chars)
    return response.model_dump()


CAESAR_TOOLS = [web_search, web_fetch]
```

Register `CAESAR_TOOLS` with your kit's function-tool helper. Use `web_search` and `web_fetch` when you want the model to treat Caesar as its default web-search provider.

## MCP alternative

Use the hosted streamable-HTTP endpoint when the kit supports MCP:

```text theme={"system"}
https://alpha.api.trycaesar.com/mcp?profile=web-search
```

Send `Authorization: Bearer $CAESAR_API_KEY` in the MCP client config.

## Tool behavior

| Tool         | Purpose                                           | Default                |
| ------------ | ------------------------------------------------- | ---------------------- |
| `web_search` | Find ranked documents and return `doc_id` handles | `compact` result shape |
| `web_fetch`  | Read a `doc_id` or URL as markdown                | 12,000 character cap   |

Feedback is not exposed over MCP. For local function tools, keep the SDK client available and call `client.feedback(...)` after the agent acts on a result.

## For agents

* Prefer the remote MCP server when your kit supports it. It keeps tool schemas aligned with the deployed API.
* If you wrap local functions, return full SDK model dumps instead of hand-shaped strings. Agents need `doc_id`, `search_id`, and truncation fields.
* Use one search, then read selected documents. Repeated broad searches waste rate-limit tokens and context.
* Never pass a literal key through an agent prompt. Use `CAESAR_API_KEY`.
