# Custom agent setup

For agent setup, perform the following steps:

1. Run `tessl init` from your project root first. Auto-detected agents (Cursor, Claude, Gemini, Copilot, Codex) need no further configuration. You can skip the rest of these steps and start your agent to [validate it's configured](#validating-configuration).
2. MCP configuration
3. Setup rules
4. Accept running Tessl

## Configuring your agent

### MCP setup

This will allow your agent to access context from installed tiles through the Tessl exposed tools.

Typically most agents have a settings file for MCP, often .mcp.json or support for that file. Refer to your agents documentation for the specific formats and files involved for your agent. The values are the following:\
\
**Name**: "tessl"\
\
**Command**: "tessl"

**Args**: "mcp", start"

**Type**, if asked: "stdio"

#### Examples

```json
{
  "mcpServers": {
    "tessl": {
      "command": "tessl",
      "args": [
        "mcp",
        "start"
      ]
    }
  }
}
```

```toml
[mcp_servers.tessl]
type = "stdio"
command = "tessl"
args = ["mcp", "start"]
```

### Rules setup

Rules setup will load the configuration to help your agent use the Tessl MCP effectively plus any other rules from the tiles you installed.

Determine what file you can indicate to the agent to use Tessl and provide steering rules. If there is capability to use AGENTS.md, use or create an `AGENTS.md` file with the following content:

```
# Agent Rules

@.tessl/RULES.md
```

### Enable Tessl

Most agents will prompt on startup to allow the MCP tool to be used, however some may require you to take an extra step and go into the agent's settings to enable it:

<figure><img src="https://1171143958-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbWzspFdXV0HNujz6gJ9%2Fuploads%2Foj5oBvyXXHx3zl6g8226%2Fimage.png?alt=media&#x26;token=b0fc2217-0469-470c-bc42-74100571bd5f" alt=""><figcaption></figcaption></figure>

## Validating configuration

Review the agent mcp configuration, often "/mcp" in terminal based agents, and determine if Tessl is enabled/review tools are available.\
\
`/mcp`

<figure><img src="https://1171143958-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbWzspFdXV0HNujz6gJ9%2Fuploads%2FFuNBmv9vTYAZBkmUTNlY%2Fimage.png?alt=media&#x26;token=908e8c73-a02d-4c31-a244-42bec64842aa" alt=""><figcaption></figcaption></figure>

Prompt your agent:\
`Use tessl to search for code review skills`

You will see calls to tessl **query\_library\_docs**, and/or tessl **search** , and results if configured properly.

<figure><img src="https://1171143958-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbWzspFdXV0HNujz6gJ9%2Fuploads%2F2jAno8m7cDdtSXcPYx0w%2Fimage.png?alt=media&#x26;token=6fac8a9c-1985-48d3-bf19-37caaaa0e188" alt=""><figcaption></figcaption></figure>

## Sample configurations for agents not auto-detected

[OpenCode](https://docs.tessl.io/reference/custom-agent-setup/opencode)


---

# 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/reference/custom-agent-setup.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.
