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

# Rewst Agent

## What is the Rewst Agent?

<figure><img src="https://3039672601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh0G0em3PH6aDfPoI5XpN%2Fuploads%2FUTMT9fBf4OD9yaue4D2R%2Fimage.png?alt=media&amp;token=d1cd576a-cb6b-43b5-9b98-c9faf1a2b48f" alt=""><figcaption></figcaption></figure>

The *Rewst Agent* is an AI assistant built into the Rewst platform to help you design, build, and troubleshoot automation. Its job is to turn what you want to accomplish into working automation inside Rewst. It grounds its plans in your connected integrations and real data rather than guessing at field names or values. Instead of manually building your assets and automations in Rewst like our users did in Rewst Classic, the Rewst Agent is the main tool you'll use to build whatever you require and help you achieve your automation goals.

Whereas RoboRewsty in Rewst Classic referenced Rewst documentation to provide answers and follow directions, the Rewst Agent operates off of *playbooks*, structured procedures it must load before authoring workflows, forms, or apps. Each one enforces required reads, required contracts, ordered steps, and verification. Before it creates or changes anything real, it shows you a concrete proposal and waits for your go-ahead. When it's unsure, the Rewst Agent defaults to safe, read-only, or drafted and simulated approaches first. To complete your request, the Rewst Agent will need you to complete back-and-forth conversation, and provide any missing information it identifies and asks for in your chat. If you're missing integrations needed to achieve your goals, the Agent will notify you and prompt you to go install those before completing its work.

<figure><img src="https://3039672601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh0G0em3PH6aDfPoI5XpN%2Fuploads%2Fi74yPhs70Cg6Oz8hUQVN%2FScreenshot%202026-07-16%20at%2010.15.15%E2%80%AFAM.png?alt=media&amp;token=c09cceca-fd08-4ce0-a358-c4a2d20cc4d9" alt=""><figcaption><p>An example conversation where the Rewst Agent identifies missing information and asks for clarification before continuing its build process</p></figcaption></figure>

{% hint style="info" %}
The Rewst Agent shouldn't be confused with the **Agents** menu of new Rewst, where you can build your own agents for use in the platform. The Rewst Agent is the native, stock agent that is built-in to the Rewst Platform.
{% endhint %}

## Access the Rewst Agent

Any time you navigate to an organization via the drop-down organization selector, you'll land on the Rewst Agent start screen. Type your question or request into the message field to begin.&#x20;

{% columns %}
{% column %}

<figure><img src="https://3039672601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh0G0em3PH6aDfPoI5XpN%2Fuploads%2FMrojdj5CZ7LSlpnEpEE1%2FScreenshot%202026-07-16%20at%2010.07.27%E2%80%AFAM.png?alt=media&amp;token=e1eb0c4b-18ae-45dd-8250-cc712b3cc944" alt=""><figcaption></figcaption></figure>

{% endcolumn %}

{% column %}

<figure><img src="https://3039672601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh0G0em3PH6aDfPoI5XpN%2Fuploads%2FNC4Ce5nsv908TfCeI7Oz%2FScreenshot%202026-07-16%20at%2010.08.51%E2%80%AFAM.png?alt=media&amp;token=a2e6072b-e60f-40e5-bad6-210a1d3bc87b" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

At any time and from any screen, click **Ask the Agent...** in the right side menu of your Rewst platform to access the Agent dialog.

{% hint style="warning" %}
As a safety measure to prevent accidental changes being cascaded instance-wide, the Rewst Agent is not accessible from the Platform organization. It's only available for individual organizations.
{% endhint %}

Click <img src="https://3039672601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh0G0em3PH6aDfPoI5XpN%2Fuploads%2FvAm1GvhxTSZWA6xeEAZe%2FScreenshot%202026-08-27%20at%202.56.29%E2%80%AFPM.png?alt=media&amp;token=d3c38989-08cf-4c78-89c3-f9d2e5585979" alt="" data-size="line"> to exit the full screen view of the Rewst Agent and collapse it into a smaller sidebar window, which allows you to view the Rewst platform center screen while continuing your conversation.

<figure><img src="https://3039672601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh0G0em3PH6aDfPoI5XpN%2Fuploads%2FTqEPpZyyTIVmUtLjZIet%2FScreenshot%202026-08-27%20at%202.58.59%E2%80%AFPM.png?alt=media&amp;token=f3a94109-9c0f-4228-ab0b-e7d5996869e6" alt=""><figcaption><p>The Rewst Agent chat appears to the left, while the platform can be used center screen</p></figcaption></figure>

You can access previous chats in the **Recent Chats** section of your left side menu. Chats will appear in this list for 90 days after their start. Hover over any of the chats in the list to expose the additional menu. Click **...** **> Delete** to delete any of the chats in the list. Note that once deleted, you can't get that chat history back.

<figure><img src="https://3039672601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh0G0em3PH6aDfPoI5XpN%2Fuploads%2FzJrrK4tehS6zJhtk5tCe%2FScreenshot%202026-07-27%20at%2010.31.47%E2%80%AFAM.png?alt=media&amp;token=20d3464d-d067-4ae8-9456-b4f7ae87badd" alt=""><figcaption></figcaption></figure>

## Tailor the Rewst Agent's response to your experience level

If the conversation coming from the Rewst Agent feels too technical for you, feel free to say so. Try "Speak to me like I'm not a developer, with less technical explanations." It will adjust its responses to fit your comfort level and existing experience.

Likewise, if you want to know deeper technical content about why it's deciding to do something, you can also ask for that information.

{% hint style="warning" %}
Currently, you can't set custom instructions for the Rewst Agent that carry over across all chats and sessions. If you have a preference, add it to your prompt every time you start a chat.
{% endhint %}

## How the Rewst Agent works

The Rewst Agent runs on a single Claude model, either Sonnet, Opus, or Haiku, chosen by Rewst depending on the nature of your ask. Within a session, the agent automatically detects which phase of work it's in, whether that's chat, design, build, or debugging, based on the tools it calls, and escalates its reasoning depth for harder phases. The Agent runs on a *ReAct (Reasoning + Acting)* loop built on Anthropic's official Claude Agent SDK. On every turn, the agent sees the user's goal, the full conversation history, and the catalog of platform tools. It decides which tool to call, observes the result, and decides what to do next, including stopping, asking the user, or trying a different approach.

{% hint style="info" %}
Currently, custom instructions are not available for the Rewst Agent. The Rewst Agent does not have learned memory of your preferences over different chat sessions. If either of these is something you wish to see prioritized by our product team, let us know in [Canny](https://rewst.canny.io/).
{% endhint %}

### Tokens and billing

Every Agent request is metered before it leaves Rewst. Tenants have daily and monthly budgets enforced at the gateway, and the platform refuses to forward requests that would exceed them.

{% hint style="info" %}
The Rewst Agent can tell you how many actions are in a workflow, but that number should not be used to predict task usage. The Agent is not able to tabulate your billing totals. The actual number of actions executed in each workflow run may vary depending on workflow logic, conditions, skips, and subworkflows. For accurate counts, check the Execution History for individual workflow runs and your Rewst Dashboard.
{% endhint %}

### Security guardrails

#### **Approval gates**

The agent proposes. The user approves. Nothing gets created, updated, or published without an explicit human approval.

* Every action that changes state in a workflow requires a person in the loop.&#x20;
* Eight tools available to the Rewst Agent require explicit, structured user approval before they can run. Before any of these run, the Agent must surface a proposal in the chat, shown as a proposed workflow or proposed solution, and you must approve it through a structured approval card or an explicit affirmation:
  * workflows\_create
  * workflows\_publish
  * workflows\_update
  * workflows\_update\_node
  * forms\_create
  * forms\_update
  * forms\_publish
  * forms\_bind\_workflow&#x20;
* If an action hasn't been approved, the default is to deny it.

#### **Tenant isolation**

The Rewst Agent can't reach across customer boundaries. Tenant isolation is enforced at the token, gateway, and database layers, the same isolation that protects all customer data in Rewst.

* Every agent session is bound to a single tenant through a signed gateway token that embeds the tenant ID and funding source, and the gateway rejects any request whose tenant doesn't match.
* All tools execute inside an explicit per-tenant context, the same enforcement that powers the rest of the Rewst platform.&#x20;
* Standard row-level security applies to every database query. There is no agent bypass for this.
* An advisory lock per session also prevents concurrent requests from corrupting agent state.

#### **Platform invariants**

The Rewst Agent operates inside the same security envelope as the rest of the platform. It doesn't get a shortcut or backdoor around the rules that protect customer data.

* We've implemented security invariants that apply across the entire codebase, and apply to Agent code paths the same way they apply to everything else.&#x20;
* Sensitive headers such as auth tokens and API keys are filtered from connector responses and can't be exfiltrated through tool output.&#x20;
* Outbound URLs can't be arbitrarily injected, since all of them flow through a validated branded type.&#x20;
* Pagination limits prevent memory exhaustion, and the workflow linter and contract validator reject any agent output that violates the workflow schema before it can be persisted or executed.

### Playbooks: How the agent uses tools correctly

If tools are what the Rewst Agent can do, playbooks are what it should do, and in what order. A *playbook* is a structured procedure the Agent must follow when authoring a workflow, form, or app. It's not optional. The Agent loads the playbook before proposing anything to you in the chat.

What's inside a playbook:

* Required reads: The guides the Agent must consult before proposing anything - e.g., the workflow-building guide
* Required contracts: The field-shape schemas the Agent must fetch so it can't guess at API shapes
* Steps: Ordered instructions that codify Rewst best practice for that kind of build
* Verify with: The tools the Agent must use afterward to prove the build actually worked

## Data accessed by the Rewst Agent

#### Inside the customer's tenant, scoped to the logged-in user

The agent can read and, with approval, modify:

* Workflows - published, drafts, all versions
* Forms and form submissions
* Apps and pages
* Connected integrations and their configuration
* Workflow execution runs, run history, step inputs and outputs
* Org-scoped variables, credentials metadata - not the secrets themselves

#### Across tenants: no access

* A session is bound to one tenant via a signed gateway token
* The token format embeds the tenant ID and funding scope
* The gateway rejects mismatches
* Even multi-tenant MSP scenarios, such as publish to all my customers, are handled by the user having access to each tenant — the Rewst Agent inherits the user's existing tenant access and does not have its own

#### Execution identity

The Rewst Agent runs as the logged-in user, not as a service account. This means:

* Tools enforce the same role and permission checks as if you clicked through the UI manually
* Your existing integration credentials are what the Rewst Agent uses for external calls - there is no separate agent identity with elevated rights
* Audit trail attributes actions to the user, not to a generic agent identity

#### Secrets

* The Rewst Agent can list credentials but doesn't see the secret values
* Sensitive headers in connector traffic are filtered before they reach the Agent's tool output&#x20;


---

# 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.rewst.help/rewst-documentation/documentation/rewst-agent.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.
