> For the complete documentation index, see [llms.txt](https://docs.frayme.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.frayme.ai/resources/ai-tools.md).

# Use these docs from your agent

These docs are built to be read by AI coding assistants — plain-text indexes, per-page markdown, and an MCP endpoint.

## llms.txt

A machine-readable index of every page, following the [llms.txt convention](https://llmstxt.org):

```
https://docs.frayme.ai/llms.txt        # index — titles + URLs + one-line summaries
https://docs.frayme.ai/llms-full.txt   # every docs page concatenated into one file
```

Point a coding assistant at `llms.txt` when it should discover pages itself; paste `llms-full.txt` into context when you want everything at once.

## Every page as markdown

Append `.md` to any docs URL to get the raw markdown — no HTML, no chrome:

```
https://docs.frayme.ai/api/compose.md
https://docs.frayme.ai/api/errors.md
```

This is the cheapest way to give an agent exactly the pages a task needs.

## The docs MCP server

Once the docs site is live, an MCP endpoint serves searchable docs directly to MCP-capable agents (Claude Code, Cursor, and friends):

```
https://docs.frayme.ai/~gitbook/mcp
```

Add it as an MCP server in your agent's config and it can search and read these docs as a tool — no copy-pasting. For Claude Code:

```bash
claude mcp add --transport http frayme-docs https://docs.frayme.ai/~gitbook/mcp
```

## A rules file for your assistant

Drop a snippet like this in your project's rules file — `.cursor/rules/frayme.mdc`, `CLAUDE.md`, `AGENTS.md`, or your tool's equivalent — so the assistant reaches for the docs instead of guessing:

```markdown
# Frayme

When working with Frayme (@frayme/api, @frayme/runtime, @frayme/catalog, or
the api.frayme.ai REST API):

- Docs index: https://docs.frayme.ai/llms.txt — fetch the relevant page as
  markdown by appending .md to its URL.
- The compose request body is snake_case and STRICT — unknown fields are
  rejected with 400. /v1/me responds in camelCase.
- Ops streamed over SSE are provisional until compose.completed; on
  compose.restarted, discard all rendered state.
- Branch errors on error.code, not HTTP status — two different conditions
  share status 429 (RATE_LIMITED is retryable, QUOTA_EXCEEDED is not).
- Never put an API key in browser code — use keyless proxy mode:
  new Frayme({ apiKey: null, baseURL: '/api/your-proxy' }).
```

## Giving your agent the compose tool itself

Reading the docs is half the story — your agent can also *call* Frayme as a tool. `@frayme/api/tools` exports one tool definition that plugs into Vercel AI SDK, Mastra, LangChain.js, and OpenAI Agents unchanged:

```ts
import { createComposeTool } from '@frayme/api/tools';

const tools = { compose_ui: createComposeTool(frayme) };
```

See the [framework guides](/agent-frameworks/ai-sdk.md) for wiring per framework.

## Related

* [API reference](/api-reference/api.md) — the contract your agent will be coding against
* [OpenAPI spec](https://api.frayme.ai/v1/openapi.json) — machine-readable, for codegen
* [Troubleshooting](/resources/troubleshooting.md) — the failures assistants most often introduce


---

# 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 dynamically by asking a question.

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

```
GET https://docs.frayme.ai/resources/ai-tools.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
