> ## Documentation Index
> Fetch the complete documentation index at: https://docs.relayhub.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Building Custom Agents

> Create AI agents with custom instructions, knowledge, and tools

## Overview

RelayHub provides two ways to create agents: the **Agent Builder**, which generates a full agent configuration from a natural language description, and the **manual editor**, which gives you control over every setting. Both produce the same result -- a fully configured agent ready to use in chat.

## Using the Agent Builder

The Agent Builder is an AI-assisted wizard that creates agents from a plain English description of what you need.

<Steps>
  <Step title="Open the Builder">
    Navigate to Agent Hub and click **New Agent**. Select **Use Agent Builder** at the top of the creation form.
  </Step>

  <Step title="Describe your agent">
    Write a natural language description of what you want the agent to do. Be specific about the domain, tone, and tasks. For example: *"A customer support agent that answers questions about our SaaS product using our help center docs. It should be friendly but concise, and always suggest relevant documentation links."*
  </Step>

  <Step title="Review the generated configuration">
    The Builder produces a system prompt, suggested model, recommended tools, and tags based on your description. Review each section and adjust anything that does not match your intent.
  </Step>

  <Step title="Attach knowledge and finalize">
    Add any files the agent should reference, set the scope, and save. The agent is immediately available for use.
  </Step>
</Steps>

<Tip>
  The Agent Builder works best when you give it context about your audience, the kind of questions the agent will handle, and any rules it should follow. Vague descriptions produce generic agents.
</Tip>

## Manual Configuration

If you prefer full control, the manual editor lets you configure each aspect of the agent directly.

### System Prompt

The system prompt defines the agent's personality, domain expertise, and behavioral rules. This is the most important part of the configuration -- it determines how the agent responds in every conversation.

Write your system prompt as clear instructions. Include:

* **Role definition** -- who the agent is and what it specializes in
* **Behavioral rules** -- tone, formatting preferences, things to avoid
* **Domain context** -- terminology, processes, or constraints the agent should know

<Note>
  The system prompt is injected at the start of every conversation with this agent. Keep it focused. Overly long prompts can dilute the model's attention on the parts that matter most.
</Note>

### Model Selection

Choose which LLM powers the agent. Different models have different strengths:

| Use Case                       | Recommended Model             |
| ------------------------------ | ----------------------------- |
| General conversation           | GPT-5-mini, Claude Sonnet 4.5 |
| Complex reasoning and analysis | GPT-5.1, Claude Opus 4.5      |
| Fast, low-cost responses       | GPT-5-nano, Gemini 3 Flash    |
| Coding and technical tasks     | GPT-5.2, Claude Sonnet 4.5    |

The model you select applies whenever someone chats with this agent, regardless of their personal default model preference.

### Attaching Files and Knowledge

Agents can have files permanently attached to their configuration. These files are included as context in every conversation with the agent -- the user does not need to upload them manually.

Common use cases:

* Product documentation for a support agent
* Style guides for a content writing agent
* Financial templates for an analysis agent
* Code standards for a review agent

<Warning>
  Attached files count toward the model's context window. If you attach very large documents, consider summarizing them or using workspace-scoped agents that leverage RAG-based retrieval instead of full-context injection.
</Warning>

### Enabling Tools

Toggle which tools the agent can use during conversations. Available tools include document reading, spreadsheet querying, image analysis, data visualization, file creation, and web search. Only enable tools the agent actually needs -- unnecessary tools can lead to the model attempting actions that are not relevant to the task.

### Tags

Add tags to categorize your agent for easy discovery in the Agent Hub. Tags like "Sales", "Engineering", "Onboarding", or "Legal" help team members find the right agent quickly.

### Setting Scope

Choose whether the agent is personal, company-wide, or workspace-specific. See [Agent Hub](/ai-agents/overview) for details on each scope level.

## Testing Your Agent

After saving, open a new chat and select your agent. Run through a few representative scenarios to verify the system prompt produces the behavior you expect. Pay attention to:

* Does the agent stay in character and follow its instructions?
* Does it use attached files when answering relevant questions?
* Does it invoke the right tools at the right time?

Iterate on the system prompt and configuration until the agent performs reliably. You can edit an agent at any time from the Agent Hub without losing existing conversations that used it.
