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

# Getting Started with Agents

> Understand the basics and start building an AI agent.

Agents give your team the power to build AI-driven automations that reason over user context, make decisions, and execute tools — all inside of Flywheel. Let's dive in to understand the basics and get you started on building your first agent.

## What are agents?

Agents are AI-powered automations that go beyond fixed step-by-step workflows. Instead of following a predetermined path, agents use a language model to evaluate context, choose which tools to call, and decide how to act — all in real time. They're ideal when the right action depends on nuanced user data, behavioral patterns, or external information that can't be captured with simple if/else branching.

Whether you're looking to automate personalized outreach, triage customer risk, enrich user profiles with web data, or handle complex onboarding sequences, agents have you covered. From customer success to revenue operations, if you can describe the decision, an agent can make it.

## Components of an agent

Understanding the components of an agent will give you a clearer picture of how to create, run, and refine your AI automations:

**Triggers**: Defines when an agent run starts. It could be a specific user event (like a signup or purchase) or a drop-off condition (when a user fails to complete expected actions).

**Agent Node**: The core reasoning engine. This is where you configure the model, system prompt, memory settings, and output behavior that control how the agent thinks and responds.

**Tools**: Individual capabilities the agent can call during a run. Tools range from sending emails and Slack messages, to searching the web, creating Intercom tickets, and setting user properties. The agent decides which tools to use based on context.

**Prompt**: The system-level instructions that guide the agent's reasoning, tone, and decision-making. A well-crafted prompt is the most important factor in agent quality.

**Memory**: Controls what context the agent retains across tool calls within a single run. Memory settings determine how much prior reasoning is available when the agent makes its next decision.

**Runs**: Each execution of an agent is called a "run". Runs produce logs, debug timelines, and tool call results that you can inspect to understand agent behavior.

**Test Mode**: A controlled environment where you can run agents against real or sample payloads without affecting production data.

## Building an agent

To build an agent, start by creating one from **Automation → Agents**. Here's a step-by-step guide:

**Choose your trigger:**

<Columns cols={2}>
  <Card title="New Event Trigger" horizontal icon="mouse-pointer-click" href="/agents/triggers/new-event-trigger">
    Starts a run when a specific user event occurs, like a signup or purchase
  </Card>

  <Card title="Drop-off Trigger" horizontal icon="circle-arrow-out-down-right" href="/agents/triggers/drop-off-trigger">
    Starts a run when users fail to complete expected actions within a timeframe
  </Card>
</Columns>

**Configure the agent node**: Set your model, system prompt, memory, and output settings. The prompt is where you describe the agent's role, goals, constraints, and the context it should consider.

## Agent node preview

<iframe src="http://localhost:3000/doc-comp-previews/agent-node-preview?type=agent-v1&selected=true" title="Agent Node Preview" width="100%" height="250px" className="border dark:border-[#1C1C20] rounded-xl" />

## Agent configuration preview

<iframe src="http://localhost:3000/doc-comp-previews/agent-config-preview?type=agent-v1" title="Agent Config Preview" width="100%" height="520px" className="border dark:border-[#1C1C20] rounded-xl" />

**Add tools**: Click the + icon on the agent node to add tools. The agent will decide which tools to call based on context and your prompt instructions. Available tools include:

**Communication Tools:**

<Columns cols={2}>
  <Card title="Email" horizontal icon="mail" href="/agents/tools/email/email">
    Send preconfigured emails with agent-controlled timing
  </Card>

  <Card title="Marketing Email" horizontal icon="mail" href="/agents/tools/email/marketing-email">
    Send builder-defined marketing emails
  </Card>

  <Card title="One-to-One Email" horizontal icon="mail" href="/agents/tools/email/one-to-one-email">
    Send personal emails from team members
  </Card>

  <Card title="AI Marketing Email" horizontal icon="sparkles" href="/agents/tools/email/ai-marketing-email">
    Generate and send AI-authored marketing emails
  </Card>

  <Card title="AI One-to-One Email" horizontal icon="sparkles" href="/agents/tools/email/ai-one-to-one-email">
    Generate and send AI-authored personal emails
  </Card>

  <Card title="Smart Message" horizontal icon="message-square" href="/agents/tools/messaging/smart-message">
    Send context-aware messages across email and Slack
  </Card>
</Columns>

**Slack Tools:**

<Columns cols={2}>
  <Card title="Slack Message" horizontal icon="message-square" href="/agents/tools/slack/slack-message">
    Send messages to Slack channels with context-aware content
  </Card>

  <Card title="Send Slack Channel Invites" horizontal icon="user-plus" href="/agents/tools/slack/send-slack-channel-invites">
    Invite users to existing Slack channels
  </Card>

  <Card title="Create Slack Channel" horizontal icon="hash" href="/agents/tools/slack/create-slack-channel">
    Create dedicated Slack channels and invite users
  </Card>
</Columns>

**Assignment & Management Tools:**

<Columns cols={2}>
  <Card title="Assign CSM" horizontal icon="user-plus" href="/agents/tools/workspace/assign-csm">
    Assign Customer Success Managers to users
  </Card>

  <Card title="Round Robin" horizontal icon="shuffle" href="/agents/tools/workspace/round-robin">
    Distribute ownership fairly across team members
  </Card>

  <Card title="Set Custom Property" horizontal icon="settings" href="/agents/tools/workspace/set-custom-property">
    Write values to user custom properties
  </Card>
</Columns>

**Data & Research Tools:**

<Columns cols={2}>
  <Card title="Find Event" horizontal icon="search" href="/agents/tools/events/find-event">
    Search past user events for additional context
  </Card>

  <Card title="Exa Web Search" horizontal icon="globe" href="/agents/tools/search/exa-web-search">
    Search the web for external context and enrichment
  </Card>
</Columns>

**Content & Support Tools:**

<Columns cols={2}>
  <Card title="Agent Assets" horizontal icon="folder" href="/agents/tools/content/agent-assets">
    Provide approved links, text, and images for agent outputs
  </Card>

  <Card title="Create Intercom Ticket" horizontal icon="ticket" href="/agents/tools/intercom/create-ticket">
    Escalate issues by creating support tickets
  </Card>
</Columns>

**Configure tool inputs**: Each tool has inputs that you can set as fixed values in the builder, or leave for the agent to determine at runtime. Use the tool prompt field to guide when and how the agent should use each tool.

**Test your agent**: Use the Test tab to run your agent against real or sample payloads. Select a target user, choose or edit an event payload, and click Run test to see how the agent behaves.

**Publish**: Click Publish changes to take your agent live. Use the Live toggle to control whether production events trigger the agent.

**Pause**: Toggle the Live switch off to stop the agent from processing production events while keeping the published configuration intact.

## Builder tabs

### Editor

Configure the selected trigger, agent node, or tool node. This is your primary workspace for building and iterating on agent behavior.

### Runs

Inspect historical runs with full logs and debug timelines. Each run shows the agent's reasoning, tool calls, inputs/outputs, and any errors encountered.

### Test

Run controlled tests with selected users and event payloads before going live. Test mode writes a test run you can inspect in the Runs tab.

## Publishing and lifecycle

Agent drafts and published state are separated to give you safe iteration:

* **Publish changes** writes the current draft graph as the next live version
* **Discard changes** resets draft state back to the last published version
* **Live toggle** controls whether published logic is active for production events

<Note>Publishing and going live are separate actions. You can publish a new version without enabling it for production traffic.</Note>

## Important things to know

**Prompt quality matters most**: The system prompt is the single biggest lever for agent quality. Be specific about the agent's role, goals, constraints, tone, and what information to consider.

**Test before going live**: Always test your agent with representative users and edge-case payloads. Check the debug timeline to verify tool selection, reasoning quality, and output correctness.

**Tool prompts guide selection**: Each tool has its own prompt field. Use it to tell the agent when this specific tool should (and should not) be called. This prevents unnecessary tool usage and improves decision quality.

**Monitor and iterate**: Review run history regularly. Look for unexpected tool calls, poor reasoning, or missed opportunities. Refine your prompts and tool configurations based on real run data.

## Next steps

* Learn about [testing and monitoring agents](/agents/basics/testing-and-monitoring-agents)
* Explore each trigger and tool page under the **Agents** docs section
