# AI Agent Library

## AI Agent Library

The **AI Agent Library** lets administrators define reusable AI agents and attach them to workflows.

This moves Gracie beyond chat. Instead of waiting for a user to ask, an agent can run automatically at the right point in a process.

{% hint style="info" %}
Think of an agent as a saved configuration for Gracie with a defined job, a set of skills, and an assigned permission context.
{% endhint %}

### What an agent is

Each agent is a reusable configuration made up of a few core settings:

{% stepper %}
{% step %}

#### Name and instructions

Give the agent a clear name and a plain-language instruction. This tells the agent what it should do.
{% endstep %}

{% step %}

#### Skills

Choose from the available [Skills Library](/surecloud-docs/documentation/gracie/skills-library.md). This controls which capabilities the agent can use.
{% endstep %}

{% step %}

#### Internet access toggle

Turn internet access on or off. Some agents should only use internal data, while others may need to reach external sources.
{% endstep %}

{% step %}

#### Permission assignment

Assign the role and hierarchy position the agent will use. An agent can only do what that assigned access allows.
{% endstep %}
{% endstepper %}

### Managing agents

The Agent Library in **Settings** lets admins manage agents for the tenant.

From here, you can:

* Create a new agent from scratch.
* Edit an existing agent's instructions, skills, or permissions.
* See where each agent is deployed across your workflows.
* Disable an agent temporarily without deleting it.

### Running agents on workflows

Once defined, agents can be attached to workflow behaviour in three places:

{% tabs %}
{% tab title="Stage logic" %}
Run an agent automatically when a record enters a stage. For example, when a SOC 2 report reaches a review stage, the agent can summarise it and populate key fields.
{% endtab %}

{% tab title="Transition logic" %}
Run an agent as part of a transition between stages. This is useful for checks or updates that should happen before the transition completes.
{% endtab %}

{% tab title="Button press" %}
Expose an agent behind a button on a record so users can run it on demand without opening chat.
{% endtab %}
{% endtabs %}

### Common use cases

Typical use cases include:

* **Third-party monitoring** — agents that check supplier trust centres and flag changes.
* **Document processing** — agents that read uploaded SOC 2 or ISO documents and produce structured summaries.
* **Questionnaire automation** — agents that create, send, and follow up on questionnaires.

{% hint style="success" %}
Agents are built from the same Skills Library that powers Gracie in chat. This helps keep behaviour consistent across manual and automated use.
{% endhint %}

### Reviewing agent activity

Each agent run is visible through the record and through Gracie. You can review:

* Whether the agent succeeded or failed.
* What output it produced.
* The reasoning it followed.

This follows the same transparency model used in Gracie chat.

### Permissions and control

Agents do not bypass permissions. They run within the access granted to the assigned role and hierarchy position.

Admins stay in control of which agents exist, where they are deployed, and whether they are enabled.

For broader controls around Gracie usage, approvals, and auditing, see [Governance & Controls](/surecloud-docs/documentation/gracie/governance-and-controls.md).

### Why the AI Agent Library matters

The AI Agent Library gives teams a reusable way to automate repetitive work with plain-language instructions and shared skills.

Instead of building the same logic repeatedly, admins can define an agent once and reuse it wherever it fits.


---

# 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://surecloud.gitbook.io/surecloud-docs/documentation/gracie/ai-agent-library.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.
