Skip to content

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.

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:

  1. Analyzes the input and breaks it down into required sub-tasks.
  2. Selects and executes the right tools from its assigned toolbox.
  3. Evaluates the intermediate results and adjusts its plan if needed.
  4. Delivers the final output or requests human approval for gated steps.
Operational needUse a workflowUse an agent
Logic structureStrict, pre-defined step sequence (if A, then B)Dynamic decision-making based on variable inputs
Task predictabilityHigh (exact inputs and outputs are known in advance)Variable (requires reasoning, research, or synthesis)
Tool usageFixed tools called at predetermined stepsAgent selects tools dynamically from an assigned catalog

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.

  1. 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.”
  2. 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.

  3. 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”).
  4. 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.
  5. 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.
  6. 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.

  7. 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.