<a id="agents"></a>
<a id="id1"></a>
# Agents

TrialGrid provides AI-powered agents that can assist you with various tasks within the application. Agents are conversational assistants that understand the context of what you're working on and can help you accomplish tasks more efficiently.

> **Important:** Agents are powered by large language models (LLMs) and may occasionally produce inaccurate or incomplete information. Always verify important information and review any generated content before use. TrialGrid is not responsible for decisions made based on agent responses.
>
> Do not share sensitive credentials or confidential information beyond what is necessary for the task at hand.

- [Agent Configuration](agent_configuration.html.md)
- [Agents Catalog](agents_catalog.html.md)

<a id="accessing-agents"></a>
## Accessing Agents

Agents are accessed via the **Agent** button in the top navigation bar. Click the button to open the agent overlay, which provides a chat interface for interacting with available agents.

> **Note:** Agent availability depends on your user permissions and organization settings. If you don't see any agents available, contact your organization administrator.

<a id="features"></a>
## Features

- **Context-Aware Assistance:** Agents understand the context you're working in - whether you're at the organization level, within a specific URL, project, or draft. This allows them to provide relevant assistance based on your current location in the application.
- **Conversation History:** Your conversations with agents are saved as sessions. You can return to previous sessions to continue a conversation or review past interactions. Sessions are available until you delete them, at which point they will still be stored in the TrialGrid database but you will not be able to see them.

> **Important:** Your conversation history with agents is not private - it may be reviewed by TrialGrid Ltd staff to improve the functionality of agents and by your organization management. Do not share personal details. Your data is not used to train AI models.

- **Multiple Agents:** Different agents are available for different purposes. Select the appropriate agent from the dropdown menu based on the task you need help with.

<a id="action-hooks"></a>
## Action Hooks

Some agents support **action hooks** — triggers that automatically run [actions](../urls/actions/index.html.md#actions) when the agent reaches a specific point in its workflow. For example, when the Spec Review agent completes a review, a hook can automatically add a label to the reviewed object.

Each hook exports **variables** that capture details about what the agent did. These variables can be used in action [preconditions](../urls/actions/preconditions.html.md#action-preconditions) via the `agent()` function to control whether an action fires. For example:

```
agent("error_count") > 0
```

This precondition would cause the action to run only when the agent found errors.

Hooks are configured per-URL on the [Agent Configuration](agent_configuration.html.md) page. Only actions with the **Agent** [action type](../urls/actions/index.html.md#action-type) can be used as hooks. See [Agent Action Hooks](agent_configuration.html.md#agent-action-hooks) for setup instructions.

The [Agents Catalog](agents_catalog.html.md) lists the available hooks and exported variables for each agent.

<a id="available-agents"></a>
## Available Agents

The following pages describe the agents available in TrialGrid:

- [Agents Catalog](agents_catalog.html.md)
