Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7,362 changes: 7,362 additions & 0 deletions src/assets/images/agents/agent-workflow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7,356 changes: 7,356 additions & 0 deletions src/assets/images/agents/co-pilot.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7,348 changes: 7,348 additions & 0 deletions src/assets/images/agents/workflow-automation.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/content/docs/agents/concepts/calling-llms.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Communicating with users
title: Calling LLMs
pcx_content_type: concept
sidebar:
order: 4
order: 5

---

Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/agents/concepts/communcating-with-users.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Calling LLMs
title: Human in the Loop
pcx_content_type: concept
sidebar:
order: 3
order: 4

---

Expand Down
62 changes: 57 additions & 5 deletions src/content/docs/agents/concepts/what-are-agents.mdx
Original file line number Diff line number Diff line change
@@ -1,14 +1,66 @@
---
title: Workflows
title: What are Agents?
pcx_content_type: concept
sidebar:
order: 1
order: 2

---

import { Render } from "~/components";

TODO - what are agents?
### What is an agent?
An agent is an AI system that can autonomously execute tasks by making decisions about tool usage and process flow. Unlike traditional automation that follows predefined paths, agents can dynamically adapt their approach based on context and intermediate results. Agents are also distinct from co-pilots (e.g. traditional chat applications) in that they can fully automate a task, as opposed to simply augmenting and extending human input.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
An agent is an AI system that can autonomously execute tasks by making decisions about tool usage and process flow. Unlike traditional automation that follows predefined paths, agents can dynamically adapt their approach based on context and intermediate results. Agents are also distinct from co-pilots (e.g. traditional chat applications) in that they can fully automate a task, as opposed to simply augmenting and extending human input.
An agent is an AI system that can autonomously execute tasks by making decisions about tool usage and process flow. Unlike traditional automation that follows predefined paths, agents can dynamically adapt their approach based on context and intermediate results. Agents are also distinct from co-pilots, such as traditional chat applications, in that they can fully automate a task, as opposed to simply augmenting and extending human input.

Issues:

  • Style Guide - (cloudflare.LatinTerms-warning) Use 'for example' instead of 'e.g.', but consider rewriting the sentence.

Fix Explanation:

Replaced 'e.g.' with 'such as' to follow the style guide recommendation and improve sentence flow.


- terminology
- diagram: orchestrator / container / task / workflow
- **Agents** → non-linear, non-deterministic (can change from run to run)
- **Workflows** → linear, deterministic execution paths
- **Co-pilots** → augmentative AI assistance requiring human intervention

### Example: Booking Vacations
If this is your first time working with, or interacting with agents, this example will illustrate how an agent works within a context like booking a vacation. If you're already familiar with the topic, read on.

Imagine you're trying to book a vacation. You need to research flights, find hotels, check restaurant reviews, and keep track of your budget.

##### Traditional Workflow Automation
A traditional automation system follows a predetermined sequence:
- Takes specific inputs (dates, location, budget)
- Calls predefined API endpoints in a fixed order
- Returns results based on hardcoded criteria
- Cannot adapt if unexpected situations arise

![Traditional workflow automation diagram](~/assets/images/agents/workflow-automation.svg)

##### AI Co-pilot
A co-pilot acts as an intelligent assistant that:

- Provides hotel and itinerary recommendations based on your preferences
- Can understand and respond to natural language queries
- Offers guidance and suggestions
- Requires human decision-making and action for execution

![A co-pilot diagram](~/assets/images/agents/co-pilot.svg)

##### Agent
An agent combines AI's ability to make judgements and call the relevant tools to execute the task. An agent's output will be nondeterministic given:

- Real-time availability and pricing changes
- Dynamic prioritization of constraints
- Ability to recover from failures
- Adaptive decision-making based on intermediate results

![An agent diagram](~/assets/images/agents/agent-workflow.svg)

An agents can dynamically generate and itinerary and execute on booking reservations, similarly to what you would expect from a travel agent.

### Three primary components of agent systems:

- **Decision Engine**: Usually an LLM (Large Language Model) that determines action steps
- **Tool Integration**: APIs, functions, and services the agent can utilize
- **Memory System**: Maintains context and tracks task progress

#### How Agents Work

Agents operate in a continuous loop of:
1. **Observing** the current state or task
2. **Planning** what actions to take, using AI for reasoning
3. **Executing** those actions using available tools (often APIs or [MCPs](https://modelcontextprotocol.io/introduction))
4. **Learning** from the results (storing results in memory, updating task progress, and preparing for next iteration)
4 changes: 2 additions & 2 deletions src/content/docs/agents/concepts/workflows.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: What are Agents
title: Workflows
pcx_content_type: concept
sidebar:
order: 2
order: 3

---

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/agents/getting-started/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ If you're new to Cloudflare Workers, Agents, or Cloudflare in general, we recomm

:::

TODO: quick start. <= 5 steps.
TODO: quick start

1. Use the template to create a new project
2. Open `src/index.ts`
Expand Down
Loading