# Make your agents smarter with documentation

## Introduction

A ***tile*** can contain reusable context, documentation, such as how to use a library, as well as instructions and rules to guide the Agent to perform certain actions. The following concepts and commands will be demonstrated:

**Installing and updating tiles**

* `tessl init` when you want to use Tessl with a project, run this command to add Tessl files to your project and configure your coding agent's MCP integration.
* If someone else setup the project, and you're cloning the repository, run `tessl install` to fetch the tiles already declared in `tessl.json`. Your agent will likely require to approve the Tessl MCP.
* `tessl search` and `tessl install` manually search and install tiles using the CLI.

**Using tiles**

* Instruct the agent to create and it will search for related tile information to help inform building your application with Tessl's documentation, and additional context!

## Initialize Tessl in your project and setup your agent

First, from your project folder, make sure you have run `tessl init` and set up your agent (see the [Quick start guide](/introduction-to-tessl/quickstart-skills-docs-rules.md) for additional details). This creates a `tessl.json` manifest and configures your coding agent to use the Tessl MCP.

The next section walks through searching the registry and installing a tile for a library you want to add to your project.

## Manually searching and installing a new tile

Once your agent is ready, you can ask it to search and install tiles from the Tessl Registry for a dependency you are using. **Example:** Install a tile for FastAPI, prompting Claude Code with:

```
Search for the FastAPI tile in Tessl Registry and install it.
```

### What happens when installing a tile?

The following information is provided to help understand what occurs when installing a tile using any of the methods described in this document and background information on how Tessl works. You can jump ahead to [Using tiles with your agent](#using-tiles-with-your-agent) if your interests are more focused on how to use Tessl and its capabilities.

Performing the above example installs `pypi-fastapi@0.116.1` locally by adding it under `.tessl/tiles/tessl/pypi-fastapi/` .

```
.tessl
└── tiles
    └── tessl
        └── pypi-fastapi
                ├── docs
                └── tile.json
```

That directory is linked to `tessl.json`. This tile provides documentation for the FastAPI framework, which you, or your agent, can now query using the `query_library_docs` tool when you need information about FastAPI usage, features, and best practices.

Inside the tile directory, you’ll find a manifest file called `tile.json` that contains metadata about the tile, including the package version:

```json
{
  "name": "tessl/pypi-fastapi",
  "version": "0.116.0",
  "docs": "docs/index.md",
  "describes": "pkg:pypi/fastapi@0.116.1",
  "summary": "FastAPI framework, high performance, easy to learn, fast to code, ready for production",
  "private": true
}
```

* If a tile describes a package, you must have (at a minimum)
  * `describes` - a valid [PURL](https://github.com/package-url/purl-spec) to identify the package
  * `docs` - to describe the package\
    \
    Essentially `docs` is required when `describes` is set.
* If a tile does not describe a package, you can have one or more of
  * `docs` - to describe whatever you want
  * `rules` - for agent guidance and instructions (formerly called `steering`)

Tessl also tracks installed Tiles in `tessl.json` at the root of your project:

```json
{
  "name": "my-project",
  "dependencies": {
    "tessl/pypi-fastapi": {
      "version": "0.116.0"
    }
  }
}
```

## Adding tiles when you add a new dependency

When you add a new open source dependency to your project, use the CLI to discover and install the matching tile.

**Example:** After adding Express, ReactJS, or another library with your package manager (`npm install`, `pip install`, etc.), use `tessl search` to find the tile, then `tessl install` to add it to your project:

```sh
# Search the registry for a library's tile
tessl search fastapi

# Install the tile you found
tessl install tessl/pypi-fastapi
```

Installed tiles are added to `.tessl/tiles/` and tracked in your `tessl.json`.

## Using tiles with your agent

When you start a project with `tessl init`, the prompts guide your agent to use the `query_library_docs` tool. This ensures the agent loads tiles into memory and relies on accurate documentation for your dependencies instead of guessing APIs or missing details.

For example, with Claude Code you can ask:

<pre><code><strong>Build a hello world app using fastapi.
</strong></code></pre>

The agent will read the FastAPI tile from `tessl.json` and use it as context when generating code.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tessl.io/use/make-your-agents-smarter-with-documentation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
