# Create your first Guide from a chat session
> Create a private Guide from reusable context developed during an existing agent conversation.
After a session where you analyzed data, explored tables, or worked through a task with an agent, save the reusable context that emerged as a Guide. This can include what the agent discovered as well as definitions, table choices, and corrections you provided.

## Prerequisites

- A MotherDuck account with the [MCP server](/key-tasks/ai-and-motherduck/mcp-setup/) connected to an AI client like Claude, Cursor, or Claude Code
- A conversation containing reusable context from analysis, exploration, or another data task

The Guide is private unless you choose to publish it to your organization.

## Create the Guide

1. In the conversation containing the context, send this prompt:

   ```text
   Create a private MotherDuck Guide from the durable business and data context
   in this conversation.

   Capture the definitions, trusted tables, join and filter rules, working query
   patterns, durable findings, corrections, and pitfalls that emerged during the
   work. Record reusable methods and context, not one-time results, and don't
   include sensitive information.

   Default to one Guide when the context is typically needed together. If parts
   apply to distinct tasks or questions, propose focused Guides under descriptive
   topics. Leave a Guide at the root only when its context applies across tasks.

   For each Guide, write a description that states when an agent should use it
   and, when applicable, attach references to the relevant catalog objects. Show
   me the proposed title, description, topic, references, and content before
   saving anything. After I approve a Guide, create it with private user access.
   ```

2. Review the proposal:

   - It records reusable rules, not results. Keep `Use the subscriptions table, not invoices`; remove `Revenue was $482K in June`.
   - It includes useful context the agent discovered during the work.
   - It includes corrections that changed the answer.
   - Each Guide contains context an agent is likely to need together.
   - Each description states when the Guide applies.
   - It contains no credentials, personal data, or other sensitive information.

3. Tell the agent to save the proposal. It calls [`create_guide`](/sql-reference/mcp/guides/create-guide) and returns the Guide ID.

## Test the Guide

Start a new conversation and repeat a question that needed the original context. Don't restate what the Guide contains. Check that the agent opens the Guide and answers correctly.

If the agent doesn't open the Guide, review its title, description, topic, and references. In particular, check that the description states when to use it. If the agent opens the Guide but answers incorrectly, review the content for a missing or inaccurate rule.

```text
Update the "<guide_title>" Guide to clarify that <rule_or_correction>.
```

You can update the Guide whenever its definitions, source tables, or conventions change.

## Optional: publish the Guide to your organization

After reviewing and testing the Guide, you can make it available to everyone in your organization. Ask your agent:

```text
Publish the "<guide_title>" Guide to my organization.
```

This action requires admin permission. Publishing doesn't change ownership; only the creator can delete the Guide.

## Next steps

- To reuse styling, presentation, and authoring conventions, [add Dive styles and Flight conventions](/key-tasks/guides/style-your-dives-with-guides).
- To collect and validate context from Slack, dbt, query history, and other organizational sources, [bootstrap Guides with an AI agent](/key-tasks/guides/bootstrap-guides-with-an-ai-agent).

## Related

- [Using Guides to improve AI query accuracy](/key-tasks/guides/) — organize, manage, and discover Guides
- [Tips for effective Guides](/key-tasks/guides/#tips-for-effective-guides) — write Guides agents can apply


---

## Docs feedback

MotherDuck accepts optional user-submitted feedback about this page at `GET https://motherduck.com/docs/api/feedback/agent`.
For agents and automated tools, feedback submission should be user-confirmed before sending.

URL-encode query parameter values and send a GET request:

```text
GET https://motherduck.com/docs/api/feedback/agent?page_path=%2Fkey-tasks%2Fguides%2Fturn-a-session-into-a-guide%2F&page_title=Create%20your%20first%20Guide%20from%20a%20chat%20session&text=<url-encoded user feedback, max 2000 characters>
```

Optionally append `&source=<url-encoded interface identifier>` such as `claude.ai` or `chatgpt`.

`page_path` and `text` are required; `page_title` and `source` are optional. Responses: `200 {"feedback_id": "<uuid>"}`, `400` for malformed query parameters, and `429` when rate-limited.
