Building agents
This guide covers how to design, configure, and deploy autonomous AI agents in Rival. While workflows follow rigid, pre-defined step sequences, agents are goal-directed workers that evaluate information, choose appropriate tools dynamically, and execute complex operational tasks.
If your process is a fixed sequence of steps, build it as a workflow instead — see Building workflows.
What is an AI agent?
Section titled “What is an AI agent?”An agent is a domain-specific AI worker assigned a clear operational goal, baseline context, and a set of approved tools.
When given a task, an agent:
- Analyzes the input and breaks it down into required sub-tasks.
- Selects and executes the right tools from its assigned toolbox.
- Evaluates the intermediate results and adjusts its plan if needed.
- Delivers the final output or requests human approval for gated steps.
When to use an agent vs. a workflow
Section titled “When to use an agent vs. a workflow”| Operational need | Use a workflow | Use an agent |
|---|---|---|
| Logic structure | Strict, pre-defined step sequence (if A, then B) | Dynamic decision-making based on variable inputs |
| Task predictability | High (exact inputs and outputs are known in advance) | Variable (requires reasoning, research, or synthesis) |
| Tool usage | Fixed tools called at predetermined steps | Agent selects tools dynamically from an assigned catalog |
Core components of an agent
Section titled “Core components of an agent”To build an effective agent, you configure four key areas:
- System persona and role definition — high-level instructions defining the agent’s identity, operational boundaries, tone, and decision guidelines.
- Toolbox and connectors — the specific set of tools, functions, and system connectors the agent is authorized to call (for example, CRM lookup, email search, document analyzer).
- Knowledge and context — reference material, enterprise documentation, or guidelines the agent uses to ground its reasoning and avoid hallucinations.
- Execution boundaries and guardrails — limits placed on agent autonomy, such as maximum tool calls per run, permitted AI models, and required human sign-offs.
For the full reference on each of these, see What is a Rival Agent.
How to build an agent
Section titled “How to build an agent”-
Define the agent’s purpose and scope
Clearly state what job the agent is being built to do. For example:
- Purpose: “Research inbound sales leads and prepare account briefings for Account Executives.”
- Out of scope: “Sending emails directly to prospects without sales representative approval.”
-
Create a new agent
Navigate to Agents in the left navigation menu and click Create Agent. Choose to build from scratch or use RivalBot to draft initial instructions based on your requirements.
-
Write system instructions
Provide clear, structured guidance in the agent’s system prompt:
- Role — define who the agent is (for example, “You are a Senior Customer Support Specialist…”).
- Objective — outline the primary goal and success criteria.
- Constraints — list explicit rules (for example, “Never share internal pricing structures; always verify user IDs before querying account records”).
-
Assign tools and connectors
Equip your agent with the capabilities it needs to complete its job:
- Click Add Tools and select approved functions from your workspace catalog.
- Limit tool access strictly to those necessary for the role. Giving an agent access to unnecessary tools increases complexity and potential execution errors.
- Configure required connector permissions (for example, granting read-only access to Google Drive or write access to a specific Slack channel). See Connecting systems.
-
Add reference knowledge
Attach relevant documentation or knowledge bases so the agent grounds its answers in your company’s actual policies:
- Upload standard operating procedures, policy PDFs, or internal FAQ documents.
- Connect enterprise search indexes or database endpoints for live context retrieval.
-
Set guardrails and approval checkpoints
Define safety limits to govern agent execution:
- Function call limits — set a maximum number of sequential tool calls per task to prevent infinite loops.
- Model selection — restrict the agent to company-approved AI models.
- Action approvals — flag high-impact tool actions (such as database updates or external communications) as requiring human sign-off.
See Personality and guardrails for how each permission level behaves.
-
Test, refine, and deploy
- Run interactive test scenarios in the agent playground.
- Review the agent’s step-by-step reasoning logs to see how it selected tools and evaluated responses.
- Refine system instructions or tool descriptions if the agent makes incorrect choices.
- Once verified, tag the agent version and submit it to your administrator for team-wide approval. See Publishing an agent.