Agents are AI workflows that autonomously decide which tools to use and how to accomplish goals. Unlike Flows, which follow predetermined steps, Agents reason about problems and choose their own path forward.
How Agents differ from Flows
Flows execute a fixed sequence of steps you define. Agents reason about problems and choose their own actions.
How Agents work
You give an Agent three things:
- Goal: What to accomplish
- Tools: Functions it can call
- Context: Information to work with
The Agent then:
- Analyzes the goal
- Decides which tool to use
- Calls the tool with appropriate parameters
- Reviews the result
- Repeats until the goal is achieved
An Agent in action
Sarah, a product manager at an interior design company, needs to compile competitive intelligence reports every Monday morning. Her stakeholders want summaries of what competitors shipped last week, but the information is scattered across blog posts, release notes, and documentation sites.
She tried building a Flow, but hit a problem. Each competitor publishes updates differently. Some announce on their blog. Others only update documentation. A few use Twitter threads. A fixed sequence of steps could not adapt to these differences.
Instead, Sarah builds an Agent.
She provides:
- Goal: “Research what [competitor name] shipped last week and summarize key features”
- Tools: Exa web search, Firecrawl scraper, a custom JavaScript function that formats markdown reports
- Context: The competitor’s domain and a list of keywords to watch for
When Sarah triggers the Agent with “Acme Design” as the competitor, it autonomously decides:
- Search first. Calls Exa to find recent articles mentioning “Acme Design” and “launch”
- Found a blog post. Calls Firecrawl to extract the full content from acmedesign.com/blog
- Spots more references. The blog post mentions a new docs section, so it calls Firecrawl again to scrape that page
- Synthesizes findings. Analyzes both sources and identifies three new features
- Formats output. Calls the custom formatting tool to generate a markdown report
- Done. Returns the final summary to Sarah
Sarah never specified these steps. The Agent chose its path based on what it found. When she ran the same Agent for a different competitor the following week, it took a completely different route and went straight to documentation because search returned nothing recent.
That is the difference: Flows execute your plan. Agents make their own.
When to use Agents
Agents are a good fit for:
- Complex, multi-step research tasks
- Open-ended problem solving
- Tasks that require adaptive decision-making
- Workflows where the path varies by input
Flows are a better fit for:
- Predictable, repeatable workflows
- Tasks with a fixed set of steps
- Workflows that need guaranteed execution order
- Performance-critical operations
If you’re not sure which to use, start with a Flow. If you find yourself needing more flexibility or your workflow changes based on intermediate results, that is a good signal to try an Agent instead.
Agents can tap into a wide range of tools to get things done. See What are Tools? for the full overview.
- Built-in tools: GPT Image 2 image generation, Exa search, Firecrawl web scraping, and more. See Built-in tools.
- Custom tools: JavaScript or Python functions you write for your specific needs
- External tools: Any HTTP API
- Flow tools: Run your existing Flows as tools to combine the predictability of Flows with the flexibility of Agents
- MCP tools: Connect to Slack, Google Workspace, Linear, GitHub, or custom MCP servers
- Subagent tools: Spawn focused child Agents with a subset of tools and isolated context
Next steps
- Creating and configuring Agents to build your first Agent
- What are Tools? to understand the tool types Agents can use
- What are Flows? to decide when a Flow is a better fit
- Agent and Flow Templates to start from an example