> For the complete documentation index, see [llms.txt](https://purecodedocs.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://purecodedocs.gitbook.io/docs/features/markdown/agent-mode.md).

# Agent Mode

Agent Mode is ideal for more in-depth tasks, such as planning, researching, and executing complex workflows. It enables the AI to take a step back, analyze the entire project, and suggest architectural changes or new implementations. The AI operates more like an assistant, helping you plan the next steps, make architectural decisions, and ultimately deliver these changes.

**Key Features:**

* **Tool-Enhanced Flow:** In Agent Mode, PureCodeAI has access to more advanced tools that can analyze, test, and modify your code. This mode enables you to do in-depth research, code reviews, or implementation planning before making changes.
* **Research & Ideation:** The AI helps you explore different approaches and consider alternatives, making it easier to decide on the best implementation strategy.
* **High-Level Planning:** Agent Mode helps you lay out the steps for a feature or project and offers insights into the architecture, dependencies, and necessary components.
* **Execution Control:** While in this mode, the AI helps guide you through execution after thorough research and planning, reducing the risk of errors in complex features.

<figure><img src="/files/l4ZWMnLqE8EuPl5Gb98D" alt=""><figcaption></figcaption></figure>

**When to Use:**

* When planning new features or large-scale refactors and want the AI to guide you step-by-step.
* When exploring complex architectural decisions or assessing different approaches before implementing code changes.


---

# 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://purecodedocs.gitbook.io/docs/features/markdown/agent-mode.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.
