From 929dd7c1081c1baf95f02f5f346cb869725be854 Mon Sep 17 00:00:00 2001 From: Brendan Irvine-Broque Date: Tue, 28 Jan 2025 22:29:08 -0600 Subject: [PATCH 01/17] WIP /agents structure --- .../capabilities/control-web-browsers.mdx | 20 ++++++++++ .../agents/capabilities/human-in-the-loop.mdx | 22 +++++++++++ .../docs/agents/capabilities/index.mdx | 14 +++++++ .../docs/agents/capabilities/multiplayer.mdx | 24 ++++++++++++ .../agents/capabilities/persistent-memory.mdx | 20 ++++++++++ .../agents/capabilities/receive-email.mdx | 26 +++++++++++++ .../agents/capabilities/receive-webhooks.mdx | 20 ++++++++++ .../retreival-augmented-generation-rag.mdx | 20 ++++++++++ .../docs/agents/capabilities/send-email.mdx | 22 +++++++++++ .../docs/agents/capabilities/wake-up.mdx | 20 ++++++++++ src/content/docs/agents/examples/index.mdx | 14 +++++++ src/content/docs/agents/get-started.mdx | 19 ++++++++++ src/content/docs/agents/index.mdx | 37 +++++++++++++++++++ src/content/docs/agents/models.mdx | 21 +++++++++++ src/content/docs/agents/why-cloudflare.mdx | 26 +++++++++++++ src/icons/agents.svg | 1 + 16 files changed, 326 insertions(+) create mode 100644 src/content/docs/agents/capabilities/control-web-browsers.mdx create mode 100644 src/content/docs/agents/capabilities/human-in-the-loop.mdx create mode 100644 src/content/docs/agents/capabilities/index.mdx create mode 100644 src/content/docs/agents/capabilities/multiplayer.mdx create mode 100644 src/content/docs/agents/capabilities/persistent-memory.mdx create mode 100644 src/content/docs/agents/capabilities/receive-email.mdx create mode 100644 src/content/docs/agents/capabilities/receive-webhooks.mdx create mode 100644 src/content/docs/agents/capabilities/retreival-augmented-generation-rag.mdx create mode 100644 src/content/docs/agents/capabilities/send-email.mdx create mode 100644 src/content/docs/agents/capabilities/wake-up.mdx create mode 100644 src/content/docs/agents/examples/index.mdx create mode 100644 src/content/docs/agents/get-started.mdx create mode 100644 src/content/docs/agents/index.mdx create mode 100644 src/content/docs/agents/models.mdx create mode 100644 src/content/docs/agents/why-cloudflare.mdx create mode 100644 src/icons/agents.svg diff --git a/src/content/docs/agents/capabilities/control-web-browsers.mdx b/src/content/docs/agents/capabilities/control-web-browsers.mdx new file mode 100644 index 00000000000000..90647967787659 --- /dev/null +++ b/src/content/docs/agents/capabilities/control-web-browsers.mdx @@ -0,0 +1,20 @@ +--- +type: concept +title: Control Web Browsers +pcx_content_type: concept +sidebar: + order: 1 +--- + +import { + Render, + PackageManagers, + Steps, + FileTree, + Details, + Tabs, + TabItem, + WranglerConfig, +} from "~/components"; + +Control web browsers diff --git a/src/content/docs/agents/capabilities/human-in-the-loop.mdx b/src/content/docs/agents/capabilities/human-in-the-loop.mdx new file mode 100644 index 00000000000000..79d7e89cc384d5 --- /dev/null +++ b/src/content/docs/agents/capabilities/human-in-the-loop.mdx @@ -0,0 +1,22 @@ +--- +type: concept +title: Human in the loop +pcx_content_type: concept +sidebar: + order: 7 +--- + +import { + Render, + PackageManagers, + Steps, + FileTree, + Details, + Tabs, + TabItem, + WranglerConfig, +} from "~/components"; + +Human in the loop + +Show persisting state and waiting for human input before moving forward diff --git a/src/content/docs/agents/capabilities/index.mdx b/src/content/docs/agents/capabilities/index.mdx new file mode 100644 index 00000000000000..ce8032b141f1ed --- /dev/null +++ b/src/content/docs/agents/capabilities/index.mdx @@ -0,0 +1,14 @@ +--- +pcx_content_type: reference +title: Capabilities +sidebar: + order: 3 + group: + hideIndex: true +--- + +import { DirectoryListing } from "~/components"; + +Capabilities + + diff --git a/src/content/docs/agents/capabilities/multiplayer.mdx b/src/content/docs/agents/capabilities/multiplayer.mdx new file mode 100644 index 00000000000000..baff8db9c79e6d --- /dev/null +++ b/src/content/docs/agents/capabilities/multiplayer.mdx @@ -0,0 +1,24 @@ +--- +type: concept +title: Multiplayer +pcx_content_type: concept +sidebar: + order: 9 +--- + +import { + Render, + PackageManagers, + Steps, + FileTree, + Details, + Tabs, + TabItem, + WranglerConfig, +} from "~/components"; + +Show multiplayer chat + +https://x.com/threepointone/status/1883863974367866988 + +Little connecting dots to agents (multiple people can chat with same agent, shared chat with agent) diff --git a/src/content/docs/agents/capabilities/persistent-memory.mdx b/src/content/docs/agents/capabilities/persistent-memory.mdx new file mode 100644 index 00000000000000..d63faf7f4ad27a --- /dev/null +++ b/src/content/docs/agents/capabilities/persistent-memory.mdx @@ -0,0 +1,20 @@ +--- +type: concept +title: Persistent memory +pcx_content_type: concept +sidebar: + order: 6 +--- + +import { + Render, + PackageManagers, + Steps, + FileTree, + Details, + Tabs, + TabItem, + WranglerConfig, +} from "~/components"; + +Remember what you said last time, remember previous actions, etc. diff --git a/src/content/docs/agents/capabilities/receive-email.mdx b/src/content/docs/agents/capabilities/receive-email.mdx new file mode 100644 index 00000000000000..718aabd7c428bc --- /dev/null +++ b/src/content/docs/agents/capabilities/receive-email.mdx @@ -0,0 +1,26 @@ +--- +type: concept +title: Receive Email +pcx_content_type: concept +sidebar: + order: 2 +--- + +import { + Render, + PackageManagers, + Steps, + FileTree, + Details, + Tabs, + TabItem, + WranglerConfig, +} from "~/components"; + +Receive email + +https://developers.cloudflare.com/email-routing/email-workers/ + +and then reply + +https://developers.cloudflare.com/email-routing/email-workers/reply-email-workers/ diff --git a/src/content/docs/agents/capabilities/receive-webhooks.mdx b/src/content/docs/agents/capabilities/receive-webhooks.mdx new file mode 100644 index 00000000000000..22025ad13e27d8 --- /dev/null +++ b/src/content/docs/agents/capabilities/receive-webhooks.mdx @@ -0,0 +1,20 @@ +--- +type: concept +title: Receive Webhooks +pcx_content_type: concept +sidebar: + order: 5 +--- + +import { + Render, + PackageManagers, + Steps, + FileTree, + Details, + Tabs, + TabItem, + WranglerConfig, +} from "~/components"; + +Receive Webhooks diff --git a/src/content/docs/agents/capabilities/retreival-augmented-generation-rag.mdx b/src/content/docs/agents/capabilities/retreival-augmented-generation-rag.mdx new file mode 100644 index 00000000000000..61f5d5b5492231 --- /dev/null +++ b/src/content/docs/agents/capabilities/retreival-augmented-generation-rag.mdx @@ -0,0 +1,20 @@ +--- +type: concept +title: Retreival Augmented Generation (RAG) +pcx_content_type: concept +sidebar: + order: 5 +--- + +import { + Render, + PackageManagers, + Steps, + FileTree, + Details, + Tabs, + TabItem, + WranglerConfig, +} from "~/components"; + +Link to https://developers.cloudflare.com/workers-ai/tutorials/build-a-retrieval-augmented-generation-ai/ diff --git a/src/content/docs/agents/capabilities/send-email.mdx b/src/content/docs/agents/capabilities/send-email.mdx new file mode 100644 index 00000000000000..1c1799c1a24d3b --- /dev/null +++ b/src/content/docs/agents/capabilities/send-email.mdx @@ -0,0 +1,22 @@ +--- +type: concept +title: Send Email +pcx_content_type: concept +sidebar: + order: 3 +--- + +import { + Render, + PackageManagers, + Steps, + FileTree, + Details, + Tabs, + TabItem, + WranglerConfig, +} from "~/components"; + +Send email + +https://developers.cloudflare.com/email-routing/email-workers/send-email-workers/ diff --git a/src/content/docs/agents/capabilities/wake-up.mdx b/src/content/docs/agents/capabilities/wake-up.mdx new file mode 100644 index 00000000000000..c0962f71ee4369 --- /dev/null +++ b/src/content/docs/agents/capabilities/wake-up.mdx @@ -0,0 +1,20 @@ +--- +type: concept +title: Alarms +pcx_content_type: concept +sidebar: + order: 8 +--- + +import { + Render, + PackageManagers, + Steps, + FileTree, + Details, + Tabs, + TabItem, + WranglerConfig, +} from "~/components"; + +Explain DO Alarms in context of agents diff --git a/src/content/docs/agents/examples/index.mdx b/src/content/docs/agents/examples/index.mdx new file mode 100644 index 00000000000000..3b76f1455390a6 --- /dev/null +++ b/src/content/docs/agents/examples/index.mdx @@ -0,0 +1,14 @@ +--- +pcx_content_type: reference +title: Example Agents +sidebar: + order: 3 + group: + hideIndex: true +--- + +import { DirectoryListing } from "~/components"; + +Example Agents + + diff --git a/src/content/docs/agents/get-started.mdx b/src/content/docs/agents/get-started.mdx new file mode 100644 index 00000000000000..f15ca121e84ed9 --- /dev/null +++ b/src/content/docs/agents/get-started.mdx @@ -0,0 +1,19 @@ +--- +title: Get started +pcx_content_type: get-started +sidebar: + order: 2 +--- + +import { + Render, + PackageManagers, + Steps, + FileTree, + Details, + Tabs, + TabItem, + WranglerConfig, +} from "~/components"; + +Show step-by-step of getting to hello world diff --git a/src/content/docs/agents/index.mdx b/src/content/docs/agents/index.mdx new file mode 100644 index 00000000000000..5ea55fdfcdd3c1 --- /dev/null +++ b/src/content/docs/agents/index.mdx @@ -0,0 +1,37 @@ +--- +title: Overview +type: overview +pcx_content_type: overview +sidebar: + order: 1 +head: + - tag: title + content: Agents +--- + +import { + CardGrid, + Description, + Feature, + LinkButton, + LinkTitleCard, + Plan, + RelatedProduct, + Render, +} from "~/components"; + + + +Build agents + + + + + +Build AI-powered agents that can autonomously perform tasks, remember state, control web browsers, and communicate over email. + +Agents are deployed to Cloudflare's [Workers](/workers/) platform using [Durable Objects](/durable-objects/), [Browser Rendering](/browser-rendering/), [Email Routing](/email-routing/) and [more](/products/?product-group=Developer+platform). + + + Get started + diff --git a/src/content/docs/agents/models.mdx b/src/content/docs/agents/models.mdx new file mode 100644 index 00000000000000..b515c8bb6fcaba --- /dev/null +++ b/src/content/docs/agents/models.mdx @@ -0,0 +1,21 @@ +--- +title: AI Models +pcx_content_type: get-started +sidebar: + order: 5 +--- + +import { + Render, + PackageManagers, + Steps, + FileTree, + Details, + Tabs, + TabItem, + WranglerConfig, +} from "~/components"; + +Use any model from anywhere — whether its on Workers AI or a model outside of Cloudflare. + +Link to Workers AI model catalog diff --git a/src/content/docs/agents/why-cloudflare.mdx b/src/content/docs/agents/why-cloudflare.mdx new file mode 100644 index 00000000000000..0cd7637de27133 --- /dev/null +++ b/src/content/docs/agents/why-cloudflare.mdx @@ -0,0 +1,26 @@ +--- +title: Why Cloudflare? +pcx_content_type: concept +sidebar: + order: 1 +--- + +import { + Render, + PackageManagers, + Steps, + FileTree, + Details, + Tabs, + TabItem, + WranglerConfig, +} from "~/components"; + +https://sunilpai.dev/posts/cloudflare-workers-for-ai-agents/ + +https://x.com/ritakozlov_/status/1882503028160512302 + +combine + explain + +- durable objects are like starting a new server for every logical session, not every request +- actor model == designed for agents == do is actor model diff --git a/src/icons/agents.svg b/src/icons/agents.svg new file mode 100644 index 00000000000000..1427cd594016af --- /dev/null +++ b/src/icons/agents.svg @@ -0,0 +1 @@ + \ No newline at end of file From b8aed325ad836daba4d0868d8c80abca160051f3 Mon Sep 17 00:00:00 2001 From: Rita Kozlov Date: Wed, 29 Jan 2025 08:09:58 -0600 Subject: [PATCH 02/17] consolidate why cf with overview --- src/content/docs/agents/index.mdx | 70 +++++++++++++++++++--- src/content/docs/agents/why-cloudflare.mdx | 26 -------- 2 files changed, 63 insertions(+), 33 deletions(-) delete mode 100644 src/content/docs/agents/why-cloudflare.mdx diff --git a/src/content/docs/agents/index.mdx b/src/content/docs/agents/index.mdx index 5ea55fdfcdd3c1..3b82378f8818a6 100644 --- a/src/content/docs/agents/index.mdx +++ b/src/content/docs/agents/index.mdx @@ -1,5 +1,5 @@ --- -title: Overview +title: Build agents on Cloudflare type: overview pcx_content_type: overview sidebar: @@ -20,12 +20,6 @@ import { Render, } from "~/components"; - - -Build agents - - - Build AI-powered agents that can autonomously perform tasks, remember state, control web browsers, and communicate over email. @@ -35,3 +29,65 @@ Agents are deployed to Cloudflare's [Workers](/workers/) platform using [Durable Get started + +## Why build agents on Cloudflare? +- + +## Products + + + +Observe and control your AI applications with caching, rate limiting, request retries, model fallback, and more. + + + + + +Build full-stack AI applications with Vectorize, Cloudflare’s vector database. Adding Vectorize enables you to perform tasks such as semantic search, recommendations, anomaly detection or can be used to provide context and memory to an LLM. + + + + + + +Build serverless applications and deploy instantly across the globe for exceptional performance, reliability, and scale. + + + + + + +Create full-stack applications that are instantly deployed to the Cloudflare global network. + + + + + + +Store large amounts of unstructured data without the costly egress bandwidth fees associated with typical cloud storage services. + + + + + + +Create new serverless SQL databases to query from your Workers and Pages projects. + + + + + + +A globally distributed coordination API with strongly consistent storage. + + + + + + +Create a global, low-latency, key-value data storage. + + + + +*** \ No newline at end of file diff --git a/src/content/docs/agents/why-cloudflare.mdx b/src/content/docs/agents/why-cloudflare.mdx deleted file mode 100644 index 0cd7637de27133..00000000000000 --- a/src/content/docs/agents/why-cloudflare.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: Why Cloudflare? -pcx_content_type: concept -sidebar: - order: 1 ---- - -import { - Render, - PackageManagers, - Steps, - FileTree, - Details, - Tabs, - TabItem, - WranglerConfig, -} from "~/components"; - -https://sunilpai.dev/posts/cloudflare-workers-for-ai-agents/ - -https://x.com/ritakozlov_/status/1882503028160512302 - -combine + explain - -- durable objects are like starting a new server for every logical session, not every request -- actor model == designed for agents == do is actor model From 387c23fe07860e748ef725ef22954c2267e25c96 Mon Sep 17 00:00:00 2001 From: Rita Kozlov Date: Wed, 29 Jan 2025 08:49:09 -0600 Subject: [PATCH 03/17] add reference architectures and why cf --- .../capabilities/control-web-browsers.mdx | 22 +++++----------- .../agents/capabilities/human-in-the-loop.mdx | 22 ---------------- .../docs/agents/capabilities/multiplayer.mdx | 24 ----------------- .../agents/capabilities/persistent-memory.mdx | 20 -------------- .../agents/capabilities/receive-email.mdx | 26 ------------------- .../agents/capabilities/receive-webhooks.mdx | 20 -------------- .../retreival-augmented-generation-rag.mdx | 20 -------------- .../docs/agents/capabilities/run-models.mdx | 9 +++++++ .../docs/agents/capabilities/send-email.mdx | 21 ++++----------- .../docs/agents/capabilities/wake-up.mdx | 20 -------------- .../agents/capabilities/webrtc-realtime.mdx | 9 +++++++ src/content/docs/agents/examples/index.mdx | 2 +- src/content/docs/agents/index.mdx | 6 +++-- .../agents/reference-architectures/index.mdx | 14 ++++++++++ .../agents/reference-architectures/rag.mdx | 9 +++++++ 15 files changed, 57 insertions(+), 187 deletions(-) delete mode 100644 src/content/docs/agents/capabilities/human-in-the-loop.mdx delete mode 100644 src/content/docs/agents/capabilities/multiplayer.mdx delete mode 100644 src/content/docs/agents/capabilities/persistent-memory.mdx delete mode 100644 src/content/docs/agents/capabilities/receive-email.mdx delete mode 100644 src/content/docs/agents/capabilities/receive-webhooks.mdx delete mode 100644 src/content/docs/agents/capabilities/retreival-augmented-generation-rag.mdx create mode 100644 src/content/docs/agents/capabilities/run-models.mdx delete mode 100644 src/content/docs/agents/capabilities/wake-up.mdx create mode 100644 src/content/docs/agents/capabilities/webrtc-realtime.mdx create mode 100644 src/content/docs/agents/reference-architectures/index.mdx create mode 100644 src/content/docs/agents/reference-architectures/rag.mdx diff --git a/src/content/docs/agents/capabilities/control-web-browsers.mdx b/src/content/docs/agents/capabilities/control-web-browsers.mdx index 90647967787659..08618a97c854a2 100644 --- a/src/content/docs/agents/capabilities/control-web-browsers.mdx +++ b/src/content/docs/agents/capabilities/control-web-browsers.mdx @@ -1,20 +1,10 @@ --- -type: concept -title: Control Web Browsers -pcx_content_type: concept +pcx_content_type: navigation +title: Control Web Browsers (Browser Rendering API) +external_link: /browser-rendering/ sidebar: order: 1 ---- - -import { - Render, - PackageManagers, - Steps, - FileTree, - Details, - Tabs, - TabItem, - WranglerConfig, -} from "~/components"; +head: [] +description: The Workers Browser Rendering API allows developers to programmatically control and interact with a headless browser instance and create automation flows for their applications and products. -Control web browsers +--- diff --git a/src/content/docs/agents/capabilities/human-in-the-loop.mdx b/src/content/docs/agents/capabilities/human-in-the-loop.mdx deleted file mode 100644 index 79d7e89cc384d5..00000000000000 --- a/src/content/docs/agents/capabilities/human-in-the-loop.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -type: concept -title: Human in the loop -pcx_content_type: concept -sidebar: - order: 7 ---- - -import { - Render, - PackageManagers, - Steps, - FileTree, - Details, - Tabs, - TabItem, - WranglerConfig, -} from "~/components"; - -Human in the loop - -Show persisting state and waiting for human input before moving forward diff --git a/src/content/docs/agents/capabilities/multiplayer.mdx b/src/content/docs/agents/capabilities/multiplayer.mdx deleted file mode 100644 index baff8db9c79e6d..00000000000000 --- a/src/content/docs/agents/capabilities/multiplayer.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -type: concept -title: Multiplayer -pcx_content_type: concept -sidebar: - order: 9 ---- - -import { - Render, - PackageManagers, - Steps, - FileTree, - Details, - Tabs, - TabItem, - WranglerConfig, -} from "~/components"; - -Show multiplayer chat - -https://x.com/threepointone/status/1883863974367866988 - -Little connecting dots to agents (multiple people can chat with same agent, shared chat with agent) diff --git a/src/content/docs/agents/capabilities/persistent-memory.mdx b/src/content/docs/agents/capabilities/persistent-memory.mdx deleted file mode 100644 index d63faf7f4ad27a..00000000000000 --- a/src/content/docs/agents/capabilities/persistent-memory.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -type: concept -title: Persistent memory -pcx_content_type: concept -sidebar: - order: 6 ---- - -import { - Render, - PackageManagers, - Steps, - FileTree, - Details, - Tabs, - TabItem, - WranglerConfig, -} from "~/components"; - -Remember what you said last time, remember previous actions, etc. diff --git a/src/content/docs/agents/capabilities/receive-email.mdx b/src/content/docs/agents/capabilities/receive-email.mdx deleted file mode 100644 index 718aabd7c428bc..00000000000000 --- a/src/content/docs/agents/capabilities/receive-email.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -type: concept -title: Receive Email -pcx_content_type: concept -sidebar: - order: 2 ---- - -import { - Render, - PackageManagers, - Steps, - FileTree, - Details, - Tabs, - TabItem, - WranglerConfig, -} from "~/components"; - -Receive email - -https://developers.cloudflare.com/email-routing/email-workers/ - -and then reply - -https://developers.cloudflare.com/email-routing/email-workers/reply-email-workers/ diff --git a/src/content/docs/agents/capabilities/receive-webhooks.mdx b/src/content/docs/agents/capabilities/receive-webhooks.mdx deleted file mode 100644 index 22025ad13e27d8..00000000000000 --- a/src/content/docs/agents/capabilities/receive-webhooks.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -type: concept -title: Receive Webhooks -pcx_content_type: concept -sidebar: - order: 5 ---- - -import { - Render, - PackageManagers, - Steps, - FileTree, - Details, - Tabs, - TabItem, - WranglerConfig, -} from "~/components"; - -Receive Webhooks diff --git a/src/content/docs/agents/capabilities/retreival-augmented-generation-rag.mdx b/src/content/docs/agents/capabilities/retreival-augmented-generation-rag.mdx deleted file mode 100644 index 61f5d5b5492231..00000000000000 --- a/src/content/docs/agents/capabilities/retreival-augmented-generation-rag.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -type: concept -title: Retreival Augmented Generation (RAG) -pcx_content_type: concept -sidebar: - order: 5 ---- - -import { - Render, - PackageManagers, - Steps, - FileTree, - Details, - Tabs, - TabItem, - WranglerConfig, -} from "~/components"; - -Link to https://developers.cloudflare.com/workers-ai/tutorials/build-a-retrieval-augmented-generation-ai/ diff --git a/src/content/docs/agents/capabilities/run-models.mdx b/src/content/docs/agents/capabilities/run-models.mdx new file mode 100644 index 00000000000000..86a14253478d37 --- /dev/null +++ b/src/content/docs/agents/capabilities/run-models.mdx @@ -0,0 +1,9 @@ +--- +pcx_content_type: navigation +title: Run models (Workers AI) +external_link: /workers-ai/ +sidebar: + order: 2 +head: [] +description: Run popular open-source AI models on Cloudflare's network. +--- \ No newline at end of file diff --git a/src/content/docs/agents/capabilities/send-email.mdx b/src/content/docs/agents/capabilities/send-email.mdx index 1c1799c1a24d3b..b23feac138d75a 100644 --- a/src/content/docs/agents/capabilities/send-email.mdx +++ b/src/content/docs/agents/capabilities/send-email.mdx @@ -1,22 +1,11 @@ --- -type: concept +pcx_content_type: navigation title: Send Email -pcx_content_type: concept +external_link: /email-routing/email-workers/send-email-workers/ sidebar: - order: 3 + order: 2 +head: [] +description: Send emails from your Worker for async updates to a user. --- -import { - Render, - PackageManagers, - Steps, - FileTree, - Details, - Tabs, - TabItem, - WranglerConfig, -} from "~/components"; -Send email - -https://developers.cloudflare.com/email-routing/email-workers/send-email-workers/ diff --git a/src/content/docs/agents/capabilities/wake-up.mdx b/src/content/docs/agents/capabilities/wake-up.mdx deleted file mode 100644 index c0962f71ee4369..00000000000000 --- a/src/content/docs/agents/capabilities/wake-up.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -type: concept -title: Alarms -pcx_content_type: concept -sidebar: - order: 8 ---- - -import { - Render, - PackageManagers, - Steps, - FileTree, - Details, - Tabs, - TabItem, - WranglerConfig, -} from "~/components"; - -Explain DO Alarms in context of agents diff --git a/src/content/docs/agents/capabilities/webrtc-realtime.mdx b/src/content/docs/agents/capabilities/webrtc-realtime.mdx new file mode 100644 index 00000000000000..3acddf48f2e141 --- /dev/null +++ b/src/content/docs/agents/capabilities/webrtc-realtime.mdx @@ -0,0 +1,9 @@ +--- +pcx_content_type: navigation +title: Realtime voice (WebRTC) +external_link: /calls/ +sidebar: + order: 4 +head: [] +description: Build real-time serverless video, audio and data applications. +--- \ No newline at end of file diff --git a/src/content/docs/agents/examples/index.mdx b/src/content/docs/agents/examples/index.mdx index 3b76f1455390a6..7f9c845be888a7 100644 --- a/src/content/docs/agents/examples/index.mdx +++ b/src/content/docs/agents/examples/index.mdx @@ -2,7 +2,7 @@ pcx_content_type: reference title: Example Agents sidebar: - order: 3 + order: 4 group: hideIndex: true --- diff --git a/src/content/docs/agents/index.mdx b/src/content/docs/agents/index.mdx index 3b82378f8818a6..40ae0478b7523a 100644 --- a/src/content/docs/agents/index.mdx +++ b/src/content/docs/agents/index.mdx @@ -31,9 +31,11 @@ Agents are deployed to Cloudflare's [Workers](/workers/) platform using [Durable ## Why build agents on Cloudflare? -- +- *Designed for durable execution:* [Durable Objects](/durable-objects/) and [Workflows](/workflows) are built for a programming model that enables guaranteed execution for async tasks like long-running deep thinking LLM calls, human-in-the-loop, or unreliable API calls. +- *Non I/O bound pricing:* don't pay for long-running processes when your code is not executing. Cloudflare Workers is designed to scale down and [only charge you for CPU time](https://blog.cloudflare.com/workers-pricing-scale-to-zero/), as opposed to wall-clock time. +- *Scalable, and reliable, without compromising on performance:* by running on Cloudflare's network, agents can execute tasks close to the user without introducing latency for real-time experiences. -## Products +## All the products you need in one platform diff --git a/src/content/docs/agents/reference-architectures/index.mdx b/src/content/docs/agents/reference-architectures/index.mdx new file mode 100644 index 00000000000000..713d5259871678 --- /dev/null +++ b/src/content/docs/agents/reference-architectures/index.mdx @@ -0,0 +1,14 @@ +--- +pcx_content_type: reference +title: Reference Architectures +sidebar: + order: 3 + group: + hideIndex: true +--- + +import { DirectoryListing } from "~/components"; + +Example Reference Architectures + + diff --git a/src/content/docs/agents/reference-architectures/rag.mdx b/src/content/docs/agents/reference-architectures/rag.mdx new file mode 100644 index 00000000000000..2f1bef0e791a25 --- /dev/null +++ b/src/content/docs/agents/reference-architectures/rag.mdx @@ -0,0 +1,9 @@ +--- +pcx_content_type: navigation +title: Retrieval Augmented Generation +external_link: /reference-architecture/diagrams/ai/ai-rag/ +sidebar: + order: 1 +head: [] +description: Build RAG architectures on Cloudflare +--- \ No newline at end of file From 1713f922ea6b35a1e9255a464d3cd4ddac836bec Mon Sep 17 00:00:00 2001 From: Matt Silverlock Date: Wed, 29 Jan 2025 08:52:23 -0600 Subject: [PATCH 04/17] add examples WIP --- src/content/docs/agents/index.mdx | 234 +++++++++++++++++++++++++----- 1 file changed, 200 insertions(+), 34 deletions(-) diff --git a/src/content/docs/agents/index.mdx b/src/content/docs/agents/index.mdx index 40ae0478b7523a..075c8a0c12b37d 100644 --- a/src/content/docs/agents/index.mdx +++ b/src/content/docs/agents/index.mdx @@ -18,6 +18,8 @@ import { Plan, RelatedProduct, Render, + TabItem, + Tabs, } from "~/components"; @@ -30,10 +32,11 @@ Agents are deployed to Cloudflare's [Workers](/workers/) platform using [Durable Get started -## Why build agents on Cloudflare? -- *Designed for durable execution:* [Durable Objects](/durable-objects/) and [Workflows](/workflows) are built for a programming model that enables guaranteed execution for async tasks like long-running deep thinking LLM calls, human-in-the-loop, or unreliable API calls. -- *Non I/O bound pricing:* don't pay for long-running processes when your code is not executing. Cloudflare Workers is designed to scale down and [only charge you for CPU time](https://blog.cloudflare.com/workers-pricing-scale-to-zero/), as opposed to wall-clock time. -- *Scalable, and reliable, without compromising on performance:* by running on Cloudflare's network, agents can execute tasks close to the user without introducing latency for real-time experiences. +## Why build agents on Cloudflare? + +- *Designed for durable execution:* [Durable Objects](/durable-objects/) and [Workflows](/workflows) are built for a programming model that enables guaranteed execution for async tasks like long-running deep thinking LLM calls, human-in-the-loop, or unreliable API calls. +- *Non I/O bound pricing:* don't pay for long-running processes when your code is not executing. Cloudflare Workers is designed to scale down and [only charge you for CPU time](https://blog.cloudflare.com/workers-pricing-scale-to-zero/), as opposed to wall-clock time. +- *Scalable, and reliable, without compromising on performance:* by running on Cloudflare's network, agents can execute tasks close to the user without introducing latency for real-time experiences. ## All the products you need in one platform @@ -48,48 +51,211 @@ Observe and control your AI applications with caching, rate limiting, request re Build full-stack AI applications with Vectorize, Cloudflare’s vector database. Adding Vectorize enables you to perform tasks such as semantic search, recommendations, anomaly detection or can be used to provide context and memory to an LLM. - - - - -Build serverless applications and deploy instantly across the globe for exceptional performance, reliability, and scale. - - - - - - -Create full-stack applications that are instantly deployed to the Cloudflare global network. - +## Start Building - - - - -Store large amounts of unstructured data without the costly egress bandwidth fees associated with typical cloud storage services. - - - + + - + + -Create new serverless SQL databases to query from your Workers and Pages projects. + + - + + - + -A globally distributed coordination API with strongly consistent storage. +## Use your favorite AI framework +Build agents using your favorite AI frameworks, and deploy it directly to [Cloudflare Workers](/workers/). - + + - +Use [LangChain](https://js.langchain.com/docs/integrations/text_embedding/cloudflare_ai/) to build Retrieval-Augmented Generation (RAG) applications using [Workers AI](/workers-ai/) and [Vectorize](/vectorize/). -Create a global, low-latency, key-value data storage. +Give your agents more context and the ability to search across content, reply to user queries, and expand their domain knowledge. +```sh +npm i @langchain/cloudflare hono +``` - +```ts +import { + CloudflareVectorizeStore, + CloudflareWorkersAIEmbeddings +} from "@langchain/cloudflare"; +import { VectorizeIndex } from "@cloudflare/workers-types"; +import { Ai } from "@cloudflare/ai"; +import { Hono } from "hono"; + +export interface Env { + VECTORIZE_INDEX: VectorizeIndex; + AI: Ai; +} + +const app = new Hono<{ Bindings: Env }>(); + +app.get("/", async (c) => { + const embeddings = new CloudflareWorkersAIEmbeddings({ + binding: c.env.AI, + model: "@cf/baai/bge-small-en-v1.5", + }); + + const store = new CloudflareVectorizeStore(embeddings, { + index: c.env.VECTORIZE_INDEX, + }); + + const results = await store.similaritySearch("hello", 5); + return c.json(results); +}); + +app.post("/load", async (c) => { + const embeddings = new CloudflareWorkersAIEmbeddings({ + binding: c.env.AI, + model: "@cf/baai/bge-small-en-v1.5", + }); + + const store = new CloudflareVectorizeStore(embeddings, { + index: c.env.VECTORIZE_INDEX, + }); + + const documents = [ + { pageContent: "hello", metadata: {} }, + { pageContent: "world", metadata: {} }, + { pageContent: "hi", metadata: {} } + ]; + + await store.addDocuments(documents, { + ids: ["id1", "id2", "id3"] + }); + + return c.json({ success: true }); +}); + +app.delete("/clear", async (c) => { + const embeddings = new CloudflareWorkersAIEmbeddings({ + binding: c.env.AI, + model: "@cf/baai/bge-small-en-v1.5", + }); + + const store = new CloudflareVectorizeStore(embeddings, { + index: c.env.VECTORIZE_INDEX, + }); + + await store.delete({ ids: ["id1", "id2", "id3"] }); + return c.json({ success: true }); +}); + +export default app; +``` + + + + +Ship faster with the [AI SDK](https://sdk.vercel.ai/docs/introduction): make it easier to generate text, tool call and/or get structured output from your AI models (and then deploy it [Workers](/workers/). + +```sh +npm i ai workers-ai-provider +``` + +```ts +import { createWorkersAI } from 'workers-ai-provider'; +import { streamText } from 'ai'; + +type Env = { + AI: Ai; +}; + +export default { + async fetch(_: Request, env: Env) { + const workersai = createWorkersAI({ binding: env.AI }); + const result = streamText({ + model: workersai('@cf/meta/llama-3.2-3b-instruct'), + prompt: 'Write short essay on why you like Cloudflare Durable Objects.', + }); + + return result.toTextStreamResponse({ + headers: { + 'Content-Type': 'text/x-unknown', + 'content-encoding': 'identity', + 'transfer-encoding': 'chunked', + }, + }); + }, +}; +``` + + + + +Use any model provider with OpenAI compatible endpoints, including [ChatGPT](https://platform.openai.com/docs/quickstart), [DeepSeek](https://api-docs.deepseek.com/) and [Workers AI](/workers-ai/configuration/open-ai-compatibility/), directly from Cloudflare Workers. + +```sh +npm i openai +``` + +```ts +import OpenAI from "openai"; + +export interface Env { + OPENAI_API_KEY: string; +} + +export default { + async fetch(request: Request, env: Env) { + const url = new URL(request.url); + const prompt = url.searchParams.get('prompt') || "Make some robot noises"; + + const openai = new OpenAI({ + apiKey: env.OPENAI_API_KEY + }); + + const chatCompletion = await openai.chat.completions.create({ + messages: [{ role: "user", content: prompt }], + model: "gpt-3.5-turbo", + }); + + const embeddings = await openai.embeddings.create({ + model: "text-embedding-ada-002", + input: "Cloudflare Agents documentation", + }); + + return new Response(JSON.stringify({ chatCompletion, embeddings })); + } +} +``` + + + + +Use [AI Gateway](/ai-gateway/) to cache, log, retry and run [evals](/ai-gateway/evaluations/) (evaluations) for your agents, no matter where they're deployed. + +```py +from anthropic import Anthropic + +anthropic = Anthropic( + api_key="", + # Route, cache, fallback and log prompt-response pairs between your app + # and your AI model provider. + base_url="https://gateway.ai.cloudflare.com/v1/${accountId}/${gatewayId}/anthropic" +) + +message = anthropic.messages.create( + model="claude-3-opus-20240229", + max_tokens=1000, + messages=[{ + "role": "user", + "content": "Generate a Cloudflare Worker that returns a simple JSON payload based on a query param", + }] +) + +print(message.content) +``` + + *** \ No newline at end of file From becf9c47465c7c0e8fad2845ee2ede284ab546cb Mon Sep 17 00:00:00 2001 From: Matt Silverlock Date: Wed, 29 Jan 2025 08:59:27 -0600 Subject: [PATCH 05/17] fix tabs closing tags --- src/content/docs/agents/index.mdx | 60 +++++++++++++++++-------------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/src/content/docs/agents/index.mdx b/src/content/docs/agents/index.mdx index 075c8a0c12b37d..c5ed9f4fad5541 100644 --- a/src/content/docs/agents/index.mdx +++ b/src/content/docs/agents/index.mdx @@ -63,10 +63,42 @@ Build full-stack AI applications with Vectorize, Cloudflare’s vector database. +Use the [Browser Rendering API](/browser-rendering/) to allow your agents to search the web, take screenshots, and directly interact with websites. + +```ts + +``` + + +Use [AI Gateway](/ai-gateway/) to cache, log, retry and run [evals](/ai-gateway/evaluations/) (evaluations) for your agents, no matter where they're deployed. + +```py +from anthropic import Anthropic + +anthropic = Anthropic( + api_key="", + # Route, cache, fallback and log prompt-response pairs between your app + # and your AI model provider. + base_url="https://gateway.ai.cloudflare.com/v1/${accountId}/${gatewayId}/anthropic" +) + +message = anthropic.messages.create( + model="claude-3-opus-20240229", + max_tokens=1000, + messages=[{ + "role": "user", + "content": "Generate a Cloudflare Worker that returns a simple JSON payload based on a query param", + }] +) + +print(message.content) +``` + + ## Use your favorite AI framework @@ -230,32 +262,6 @@ export default { ``` - - -Use [AI Gateway](/ai-gateway/) to cache, log, retry and run [evals](/ai-gateway/evaluations/) (evaluations) for your agents, no matter where they're deployed. - -```py -from anthropic import Anthropic - -anthropic = Anthropic( - api_key="", - # Route, cache, fallback and log prompt-response pairs between your app - # and your AI model provider. - base_url="https://gateway.ai.cloudflare.com/v1/${accountId}/${gatewayId}/anthropic" -) - -message = anthropic.messages.create( - model="claude-3-opus-20240229", - max_tokens=1000, - messages=[{ - "role": "user", - "content": "Generate a Cloudflare Worker that returns a simple JSON payload based on a query param", - }] -) - -print(message.content) -``` - - + *** \ No newline at end of file From c3e8f00f1576a49acaf4cbeea7f618624ee1bd4c Mon Sep 17 00:00:00 2001 From: Matt Silverlock Date: Wed, 29 Jan 2025 09:09:13 -0600 Subject: [PATCH 06/17] browser rendering example --- src/content/docs/agents/index.mdx | 43 ++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/src/content/docs/agents/index.mdx b/src/content/docs/agents/index.mdx index c5ed9f4fad5541..3423807ae1f5b6 100644 --- a/src/content/docs/agents/index.mdx +++ b/src/content/docs/agents/index.mdx @@ -65,10 +65,51 @@ Build full-stack AI applications with Vectorize, Cloudflare’s vector database. Use the [Browser Rendering API](/browser-rendering/) to allow your agents to search the web, take screenshots, and directly interact with websites. +```sh +npm install @cloudflare/puppeteer --save-dev +``` + ```ts +import puppeteer from "@cloudflare/puppeteer"; -``` +interface Env { + MYBROWSER: Fetcher; + BROWSER_KV_DEMO: KVNamespace; +} + +export default { + async fetch(request: Request, env: Env): Promise { + const { searchParams } = new URL(request.url); + const url = searchParams.get("url"); + + if (!url) { + return new Response("Please add an ?url=https://example.com/ parameter"); + } + + const normalizedUrl = new URL(url).toString(); + let img = await env.BROWSER_KV_DEMO.get(normalizedUrl, { type: "arrayBuffer" }); + if (img === null) { + const browser = await puppeteer.launch(env.MYBROWSER); + const page = await browser.newPage(); + await page.goto(normalizedUrl); + img = await page.screenshot() as Buffer; + + await env.BROWSER_KV_DEMO.put(normalizedUrl, img, { + expirationTtl: 60 * 60 * 24, // 24 hours + }); + + await browser.close(); + } + + return new Response(img, { + headers: { + "content-type": "image/jpeg", + }, + }); + }, +}; +``` From cb2b877fae7dc39b975679a62354d6bf5c261ec1 Mon Sep 17 00:00:00 2001 From: Matt Silverlock Date: Wed, 29 Jan 2025 10:21:18 -0600 Subject: [PATCH 07/17] add workflows example --- src/content/docs/agents/index.mdx | 210 ++++++++++++++++++++++++++++++ 1 file changed, 210 insertions(+) diff --git a/src/content/docs/agents/index.mdx b/src/content/docs/agents/index.mdx index 3423807ae1f5b6..4e35ccf725b925 100644 --- a/src/content/docs/agents/index.mdx +++ b/src/content/docs/agents/index.mdx @@ -50,15 +50,225 @@ Observe and control your AI applications with caching, rate limiting, request re Build full-stack AI applications with Vectorize, Cloudflare’s vector database. Adding Vectorize enables you to perform tasks such as semantic search, recommendations, anomaly detection or can be used to provide context and memory to an LLM. + ## Start Building +Build agents that can execute complex tasks, progressively save state, and call out to _any_ third party API they need to using [Workflows](/workflows/). Send emails or [text messages](/workflows/examples/twilio/), [browse the web](/browser-rendering/), process and summarize documents, and/or query your database. + +```sh +npm create cloudflare@latest workflows-starter -- --template "cloudflare/workflows-starter" +cd workflows-starter +npm i resend +``` + +```ts +import { WorkflowEntrypoint, WorkflowStep, WorkflowEvent } from 'cloudflare:workers'; +import { Resend } from 'resend'; + +type Env = { + MY_WORKFLOW: Workflow; + RESEND_API_KEY: string; +}; + +type Params = { + email: string; + metadata: Record; +}; + +export class MyWorkflow extends WorkflowEntrypoint { + async run(event: WorkflowEvent, step: WorkflowStep) { + + const files = await step.do('my first step', async () => { + // Fetch a list of files from $SOME_SERVICE + return { + files: [ + 'doc_7392_rev3.pdf', + 'report_x29_final.pdf', + 'memo_2024_05_12.pdf', + 'file_089_update.pdf', + 'proj_alpha_v2.pdf', + 'data_analysis_q2.pdf', + 'notes_meeting_52.pdf', + 'summary_fy24_draft.pdf', + ], + }; + }); + + const summaries = await step.do('summarize text', async () => { + const results = {}; + for (const filename of files.files) { + const fileContent = await this.env.MY_BUCKET.get(filename); + if (!fileContent) continue; + + const text = await fileContent.text(); + const summary = await this.env.WORKERS_AI.run('@cf/meta/llama-3.2-3b-instruct', { + messages: [{ + role: 'user', + content: `Please summarize the following text concisely: ${text}` + }] + }); + results[filename] = summary.response; + } + return results; + }); + + await step.sleep('wait on something', '1 minute'); + + let summaryKey = await step.do( + 'store summaries in R2', + async () => { + const summaryKey = `summaries-${Date.now()}.json`; + await this.env.MY_BUCKET.put(summaryKey, JSON.stringify(summaries)); + return summaryKey; + }, + ); + + await step.do( + 'email summaries', + { + retries: { + limit: 3, + delay: '5 second', + backoff: 'exponential', + } + }, + async () => { + const summaryText = Object.entries(summaries) + .map(([filename, summary]) => `${filename}:\n${summary}\n\n`) + .join(''); + + const resend = new Resend(this.env.RESEND_API_KEY); + + await resend.emails.send({ + from: 'notifications@yourdomain.com', + to: event.payload.email, + subject: 'Your Document Summaries', + text: summaryText, + }); + } + ); + + return summaryKey; + } +} + +export default { + async fetch(req: Request, env: Env): Promise { + let id = new URL(req.url).searchParams.get('instanceId'); + + if (id) { + let instance = await env.MY_WORKFLOW.get(id); + return Response.json({ + status: await instance.status(), + }); + } + + let instance = await env.MY_WORKFLOW.create(); + return Response.json({ + id: instance.id, + details: await instance.status(), + }); + }, +}; +``` + +Ship interactive, real-time agents that can connect to the latest AI models, stream responses, and don't time out while waiting for the latest chain-of-thought models — including `o1` or `deepseek-r1` — to respond. + +```ts +npm i openai +``` + +```ts +import { DurableObject } from "cloudflare:workers"; + +export interface Env { + DURABLE_AGENT: DurableObjectNamespace; + OPENAI_API_KEY: string; +} + +export default { + async fetch(request: Request, env: Env, ctx: ExecutionContext) { + if (request.url.endsWith("/websocket")) { + const upgradeHeader = request.headers.get("Upgrade"); + if (!upgradeHeader || upgradeHeader !== "websocket") { + return Response.json( + { error: "Durable Object expected Upgrade: websocket" }, + { status: 426 } + ); + } + + const url = new URL(request.url); + const agentId = url.searchParams.get("id") || (await crypto.randomUUID()); + + let id = env.DURABLE_AGENT.idFromName(agentId); + let agent = env.DURABLE_AGENT.get(id); + + return agent.fetch(request); + } + + return Response.json({ message: "Bad Request" }, { status: 400 }); + }, +}; + +export class DurableAgent extends DurableObject { + constructor(private state: DurableObjectState, private env: Env) { + super(); + } + + async fetch(request: Request): Promise { + const webSocketPair = new WebSocketPair(); + const [client, server] = Object.values(webSocketPair); + + this.ctx.acceptWebSocket(server); + + return new Response(null, { + status: 101, + webSocket: client, + }); + } + + async webSocketMessage(ws: WebSocket, message: ArrayBuffer | string) { + try { + const openai = new OpenAI({ + apiKey: this.env.OPENAI_API_KEY, + timeout: 10 * 60 * 1000, // 10 minute timeout + }); + + const stream = await openai.chat.completions.create({ + model: "o1", + messages: [{ role: "user", content: message.toString() }], + stream: true, // Stream the response to immediately start sending chunks to the client, + // rather than buffering the entire response and making the user wait + }); + + for await (const chunk of stream) { + const content = chunk.choices[0]?.delta?.content; + if (content) { + ws.send(content); + } + } + } catch (error) { + ws.send( + JSON.stringify({ + error: "OpenAI request failed", + message: error.message, + }) + ); + } + } + + async webSocketClose(ws: WebSocket, code: number, reason: string, wasClean: boolean) { + ws.close(code, "Durable Object is closing WebSocket"); + } +} +``` From 796963dd16217d913625e6669b4ddfe3b8b59b9d Mon Sep 17 00:00:00 2001 From: Matt Silverlock Date: Wed, 29 Jan 2025 10:41:29 -0600 Subject: [PATCH 08/17] update DO summary --- src/content/docs/agents/index.mdx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/content/docs/agents/index.mdx b/src/content/docs/agents/index.mdx index 4e35ccf725b925..ee367fd5b90978 100644 --- a/src/content/docs/agents/index.mdx +++ b/src/content/docs/agents/index.mdx @@ -179,7 +179,9 @@ export default { -Ship interactive, real-time agents that can connect to the latest AI models, stream responses, and don't time out while waiting for the latest chain-of-thought models — including `o1` or `deepseek-r1` — to respond. +Use Durable Objects (/durable-objects/) — stateful, serverless, long-running micro-servers — to ship interactive, real-time agents that can connect to the latest AI models. + +Stream responses over [WebSockets](/durable-objects/best-practices/websockets/), and don't time out while waiting for the latest chain-of-thought models — including `o1` or `deepseek-r1` — to respond. ```ts npm i openai @@ -195,7 +197,7 @@ export interface Env { export default { async fetch(request: Request, env: Env, ctx: ExecutionContext) { - if (request.url.endsWith("/websocket")) { + if (request.url.endsWith("/agent/chat")) { const upgradeHeader = request.headers.get("Upgrade"); if (!upgradeHeader || upgradeHeader !== "websocket") { return Response.json( @@ -238,14 +240,15 @@ export class DurableAgent extends DurableObject { try { const openai = new OpenAI({ apiKey: this.env.OPENAI_API_KEY, - timeout: 10 * 60 * 1000, // 10 minute timeout + timeout: 10 * 60 * 1000, // Don't let it think TOO long. }); + // Stream the response to immediately start sending chunks to the client, + // rather than buffering the entire response and making the user wait const stream = await openai.chat.completions.create({ model: "o1", messages: [{ role: "user", content: message.toString() }], - stream: true, // Stream the response to immediately start sending chunks to the client, - // rather than buffering the entire response and making the user wait + stream: true, }); for await (const chunk of stream) { From eddf1133b46d1bf71a584eabaef71f8cd54f3bb0 Mon Sep 17 00:00:00 2001 From: Matt Silverlock Date: Wed, 29 Jan 2025 11:33:43 -0600 Subject: [PATCH 09/17] add examples --- .../docs/agents/reference-architectures/index.mdx | 2 +- src/content/docs/agents/reference-architectures/rag.mdx | 2 +- .../agents/reference-architectures/text-and-call.mdx | 9 +++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 src/content/docs/agents/reference-architectures/text-and-call.mdx diff --git a/src/content/docs/agents/reference-architectures/index.mdx b/src/content/docs/agents/reference-architectures/index.mdx index 713d5259871678..e1dd3af47f3a47 100644 --- a/src/content/docs/agents/reference-architectures/index.mdx +++ b/src/content/docs/agents/reference-architectures/index.mdx @@ -2,7 +2,7 @@ pcx_content_type: reference title: Reference Architectures sidebar: - order: 3 + order: 1 group: hideIndex: true --- diff --git a/src/content/docs/agents/reference-architectures/rag.mdx b/src/content/docs/agents/reference-architectures/rag.mdx index 2f1bef0e791a25..7154404f2de659 100644 --- a/src/content/docs/agents/reference-architectures/rag.mdx +++ b/src/content/docs/agents/reference-architectures/rag.mdx @@ -3,7 +3,7 @@ pcx_content_type: navigation title: Retrieval Augmented Generation external_link: /reference-architecture/diagrams/ai/ai-rag/ sidebar: - order: 1 + order: 2 head: [] description: Build RAG architectures on Cloudflare --- \ No newline at end of file diff --git a/src/content/docs/agents/reference-architectures/text-and-call.mdx b/src/content/docs/agents/reference-architectures/text-and-call.mdx new file mode 100644 index 00000000000000..5471f0d78645de --- /dev/null +++ b/src/content/docs/agents/reference-architectures/text-and-call.mdx @@ -0,0 +1,9 @@ +--- +pcx_content_type: navigation +title: Send text messages from agents +external_link: /workflows/examples/twilio/ +sidebar: + order: 3 +head: [] +description: Send text messages and accept phone calls from your agent +--- \ No newline at end of file From fbb2b22788ed247ed54fa36cdadacc3d7aae8138 Mon Sep 17 00:00:00 2001 From: Matt Silverlock Date: Wed, 29 Jan 2025 11:38:46 -0600 Subject: [PATCH 10/17] collapse code blocks --- src/content/docs/agents/index.mdx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/content/docs/agents/index.mdx b/src/content/docs/agents/index.mdx index ee367fd5b90978..ee50cd311e6c2c 100644 --- a/src/content/docs/agents/index.mdx +++ b/src/content/docs/agents/index.mdx @@ -34,10 +34,11 @@ Agents are deployed to Cloudflare's [Workers](/workers/) platform using [Durable ## Why build agents on Cloudflare? -- *Designed for durable execution:* [Durable Objects](/durable-objects/) and [Workflows](/workflows) are built for a programming model that enables guaranteed execution for async tasks like long-running deep thinking LLM calls, human-in-the-loop, or unreliable API calls. - *Non I/O bound pricing:* don't pay for long-running processes when your code is not executing. Cloudflare Workers is designed to scale down and [only charge you for CPU time](https://blog.cloudflare.com/workers-pricing-scale-to-zero/), as opposed to wall-clock time. +- *Designed for durable execution:* [Durable Objects](/durable-objects/) and [Workflows](/workflows) are built for a programming model that enables guaranteed execution for async tasks like long-running deep thinking LLM calls, human-in-the-loop, or unreliable API calls. - *Scalable, and reliable, without compromising on performance:* by running on Cloudflare's network, agents can execute tasks close to the user without introducing latency for real-time experiences. + + ## Start Building @@ -65,7 +68,7 @@ cd workflows-starter npm i resend ``` -```ts +```ts collapse={30,1000} import { WorkflowEntrypoint, WorkflowStep, WorkflowEvent } from 'cloudflare:workers'; import { Resend } from 'resend'; @@ -187,7 +190,7 @@ Stream responses over [WebSockets](/durable-objects/best-practices/websockets/), npm i openai ``` -```ts +```ts collapse={30,1000} import { DurableObject } from "cloudflare:workers"; export interface Env { @@ -282,7 +285,7 @@ Use the [Browser Rendering API](/browser-rendering/) to allow your agents to sea npm install @cloudflare/puppeteer --save-dev ``` -```ts +```ts collapse={30,1000} import puppeteer from "@cloudflare/puppeteer"; interface Env { @@ -329,7 +332,7 @@ export default { Use [AI Gateway](/ai-gateway/) to cache, log, retry and run [evals](/ai-gateway/evaluations/) (evaluations) for your agents, no matter where they're deployed. -```py +```py collapse={30,1000} from anthropic import Anthropic anthropic = Anthropic( @@ -369,7 +372,7 @@ Give your agents more context and the ability to search across content, reply to npm i @langchain/cloudflare hono ``` -```ts +```ts collapse={30,1000} import { CloudflareVectorizeStore, CloudflareWorkersAIEmbeddings @@ -448,7 +451,7 @@ Ship faster with the [AI SDK](https://sdk.vercel.ai/docs/introduction): make it npm i ai workers-ai-provider ``` -```ts +```ts collapse={30,1000} import { createWorkersAI } from 'workers-ai-provider'; import { streamText } from 'ai'; @@ -484,7 +487,7 @@ Use any model provider with OpenAI compatible endpoints, including [ChatGPT](htt npm i openai ``` -```ts +```ts collapse={30,1000} import OpenAI from "openai"; export interface Env { From 1afb5b3636635f595c7802a398c4d42ec237a541 Mon Sep 17 00:00:00 2001 From: Matt Silverlock Date: Wed, 29 Jan 2025 11:41:02 -0600 Subject: [PATCH 11/17] update agents.yaml --- src/content/docs/agents/index.mdx | 2 +- src/content/products/agents.yaml | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 src/content/products/agents.yaml diff --git a/src/content/docs/agents/index.mdx b/src/content/docs/agents/index.mdx index ee50cd311e6c2c..1bd69aa1e33e6f 100644 --- a/src/content/docs/agents/index.mdx +++ b/src/content/docs/agents/index.mdx @@ -24,7 +24,7 @@ import { -Build AI-powered agents that can autonomously perform tasks, remember state, control web browsers, and communicate over email. +Build AI-powered agents that can autonomously perform tasks, persist state, browse the web, and communicate back to users in real-time over any channel. Agents are deployed to Cloudflare's [Workers](/workers/) platform using [Durable Objects](/durable-objects/), [Browser Rendering](/browser-rendering/), [Email Routing](/email-routing/) and [more](/products/?product-group=Developer+platform). diff --git a/src/content/products/agents.yaml b/src/content/products/agents.yaml new file mode 100644 index 00000000000000..3e3afcae96408b --- /dev/null +++ b/src/content/products/agents.yaml @@ -0,0 +1,28 @@ +name: Agents + +product: + title: Agents + url: /agents/ + group: Developer platform + preview_tryout: true + +meta: + title: Cloudflare Agents + description: Build AI-powered agents that can autonomously perform tasks, persist state, browse the web, and communicate back to users in real-time over any channel. + author: "@cloudflare" + +resources: + community: https://community.cloudflare.com/c/developers/workers/40 + dashboard_link: https://dash.cloudflare.com/?to=/:account/workers + learning_center: https://www.cloudflare.com/learning/serverless/what-is-serverless/ + discord: https://discord.com/invite/cloudflaredev + +externals: + - title: Workers home + url: https://workers.cloudflare.com + - title: Playground + url: https://workers.cloudflare.com/playground + - title: Pricing + url: https://workers.cloudflare.com/#plans + - title: Discord + url: https://discord.cloudflare.com From 24a629da610c77c668e371ab58761b7496c89c72 Mon Sep 17 00:00:00 2001 From: Rita Kozlov Date: Wed, 29 Jan 2025 11:58:26 -0600 Subject: [PATCH 12/17] clean up main page --- src/content/docs/agents/examples/index.mdx | 14 ----- src/content/docs/agents/get-started.mdx | 19 ------ src/content/docs/agents/index.mdx | 67 ++++++++++++---------- src/content/docs/agents/models.mdx | 21 ------- 4 files changed, 36 insertions(+), 85 deletions(-) delete mode 100644 src/content/docs/agents/examples/index.mdx delete mode 100644 src/content/docs/agents/get-started.mdx delete mode 100644 src/content/docs/agents/models.mdx diff --git a/src/content/docs/agents/examples/index.mdx b/src/content/docs/agents/examples/index.mdx deleted file mode 100644 index 7f9c845be888a7..00000000000000 --- a/src/content/docs/agents/examples/index.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -pcx_content_type: reference -title: Example Agents -sidebar: - order: 4 - group: - hideIndex: true ---- - -import { DirectoryListing } from "~/components"; - -Example Agents - - diff --git a/src/content/docs/agents/get-started.mdx b/src/content/docs/agents/get-started.mdx deleted file mode 100644 index f15ca121e84ed9..00000000000000 --- a/src/content/docs/agents/get-started.mdx +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: Get started -pcx_content_type: get-started -sidebar: - order: 2 ---- - -import { - Render, - PackageManagers, - Steps, - FileTree, - Details, - Tabs, - TabItem, - WranglerConfig, -} from "~/components"; - -Show step-by-step of getting to hello world diff --git a/src/content/docs/agents/index.mdx b/src/content/docs/agents/index.mdx index 1bd69aa1e33e6f..76c103cfa1ca6d 100644 --- a/src/content/docs/agents/index.mdx +++ b/src/content/docs/agents/index.mdx @@ -22,38 +22,11 @@ import { Tabs, } from "~/components"; - - Build AI-powered agents that can autonomously perform tasks, persist state, browse the web, and communicate back to users in real-time over any channel. -Agents are deployed to Cloudflare's [Workers](/workers/) platform using [Durable Objects](/durable-objects/), [Browser Rendering](/browser-rendering/), [Email Routing](/email-routing/) and [more](/products/?product-group=Developer+platform). - - - Get started - - -## Why build agents on Cloudflare? - -- *Non I/O bound pricing:* don't pay for long-running processes when your code is not executing. Cloudflare Workers is designed to scale down and [only charge you for CPU time](https://blog.cloudflare.com/workers-pricing-scale-to-zero/), as opposed to wall-clock time. -- *Designed for durable execution:* [Durable Objects](/durable-objects/) and [Workflows](/workflows) are built for a programming model that enables guaranteed execution for async tasks like long-running deep thinking LLM calls, human-in-the-loop, or unreliable API calls. -- *Scalable, and reliable, without compromising on performance:* by running on Cloudflare's network, agents can execute tasks close to the user without introducing latency for real-time experiences. - - +- **Non I/O bound pricing:** don't pay for long-running processes when your code is not executing. Cloudflare Workers is designed to scale down and [only charge you for CPU time](https://blog.cloudflare.com/workers-pricing-scale-to-zero/), as opposed to wall-clock time. +- **Designed for durable execution:** [Durable Objects](/durable-objects/) and [Workflows](/workflows) are built for a programming model that enables guaranteed execution for async tasks like long-running deep thinking LLM calls, human-in-the-loop, or unreliable API calls. +- **Scalable, and reliable, without compromising on performance:** by running on Cloudflare's network, agents can execute tasks close to the user without introducing latency for real-time experiences. ## Start Building @@ -521,4 +494,36 @@ export default { -*** \ No newline at end of file +*** + +## All the products you need in one platform + + + +Observe and control your AI applications with caching, rate limiting, request retries, model fallback, and more. + + + + + +Build full-stack AI applications with Vectorize, Cloudflare’s vector database. Adding Vectorize enables you to perform tasks such as semantic search, recommendations, anomaly detection or can be used to provide context and memory to an LLM. + + + + + +Run machine learning models, powered by serverless GPUs, on Cloudflare's global network. + + + + + +Build real-time serverless video, audio and data applications with WebRTC running on Cloudflare's network. + + + + + +Build stateful agents that guarantee executions, including automatic retries, persistent state that runs for minutes, hours, days, or weeks. + + \ No newline at end of file diff --git a/src/content/docs/agents/models.mdx b/src/content/docs/agents/models.mdx deleted file mode 100644 index b515c8bb6fcaba..00000000000000 --- a/src/content/docs/agents/models.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: AI Models -pcx_content_type: get-started -sidebar: - order: 5 ---- - -import { - Render, - PackageManagers, - Steps, - FileTree, - Details, - Tabs, - TabItem, - WranglerConfig, -} from "~/components"; - -Use any model from anywhere — whether its on Workers AI or a model outside of Cloudflare. - -Link to Workers AI model catalog From 9578034f5e190e276512e9f142428b86e25d1819 Mon Sep 17 00:00:00 2001 From: Matt Silverlock Date: Wed, 29 Jan 2025 12:05:15 -0600 Subject: [PATCH 13/17] add agents links --- src/content/docs/ai-gateway/integrations/agents.mdx | 8 ++++++++ src/content/docs/durable-objects/examples/agents.mdx | 8 ++++++++ src/content/docs/vectorize/examples/agents.mdx | 8 ++++++++ src/content/docs/workers-ai/guides/agents.mdx | 8 ++++++++ src/content/docs/workflows/examples/agents.mdx | 8 ++++++++ 5 files changed, 40 insertions(+) create mode 100644 src/content/docs/ai-gateway/integrations/agents.mdx create mode 100644 src/content/docs/durable-objects/examples/agents.mdx create mode 100644 src/content/docs/vectorize/examples/agents.mdx create mode 100644 src/content/docs/workers-ai/guides/agents.mdx create mode 100644 src/content/docs/workflows/examples/agents.mdx diff --git a/src/content/docs/ai-gateway/integrations/agents.mdx b/src/content/docs/ai-gateway/integrations/agents.mdx new file mode 100644 index 00000000000000..72bf7fd4219283 --- /dev/null +++ b/src/content/docs/ai-gateway/integrations/agents.mdx @@ -0,0 +1,8 @@ +--- +pcx_content_type: navigation +title: Agents +external_link: /agents/ + order: 10 +head: [] +description: Build AI-powered Agents on Cloudflare +--- \ No newline at end of file diff --git a/src/content/docs/durable-objects/examples/agents.mdx b/src/content/docs/durable-objects/examples/agents.mdx new file mode 100644 index 00000000000000..72bf7fd4219283 --- /dev/null +++ b/src/content/docs/durable-objects/examples/agents.mdx @@ -0,0 +1,8 @@ +--- +pcx_content_type: navigation +title: Agents +external_link: /agents/ + order: 10 +head: [] +description: Build AI-powered Agents on Cloudflare +--- \ No newline at end of file diff --git a/src/content/docs/vectorize/examples/agents.mdx b/src/content/docs/vectorize/examples/agents.mdx new file mode 100644 index 00000000000000..72bf7fd4219283 --- /dev/null +++ b/src/content/docs/vectorize/examples/agents.mdx @@ -0,0 +1,8 @@ +--- +pcx_content_type: navigation +title: Agents +external_link: /agents/ + order: 10 +head: [] +description: Build AI-powered Agents on Cloudflare +--- \ No newline at end of file diff --git a/src/content/docs/workers-ai/guides/agents.mdx b/src/content/docs/workers-ai/guides/agents.mdx new file mode 100644 index 00000000000000..72bf7fd4219283 --- /dev/null +++ b/src/content/docs/workers-ai/guides/agents.mdx @@ -0,0 +1,8 @@ +--- +pcx_content_type: navigation +title: Agents +external_link: /agents/ + order: 10 +head: [] +description: Build AI-powered Agents on Cloudflare +--- \ No newline at end of file diff --git a/src/content/docs/workflows/examples/agents.mdx b/src/content/docs/workflows/examples/agents.mdx new file mode 100644 index 00000000000000..72bf7fd4219283 --- /dev/null +++ b/src/content/docs/workflows/examples/agents.mdx @@ -0,0 +1,8 @@ +--- +pcx_content_type: navigation +title: Agents +external_link: /agents/ + order: 10 +head: [] +description: Build AI-powered Agents on Cloudflare +--- \ No newline at end of file From 5fee071326e9736bacff5991925a45d11fc47741 Mon Sep 17 00:00:00 2001 From: Rita Kozlov Date: Wed, 29 Jan 2025 12:12:11 -0600 Subject: [PATCH 14/17] fix up link outs --- src/content/docs/ai-gateway/integrations/agents.mdx | 4 +++- src/content/docs/durable-objects/examples/agents.mdx | 1 + src/content/docs/vectorize/examples/agents.mdx | 1 + src/content/docs/workers-ai/guides/agents.mdx | 1 + src/content/docs/workflows/examples/agents.mdx | 1 + 5 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/content/docs/ai-gateway/integrations/agents.mdx b/src/content/docs/ai-gateway/integrations/agents.mdx index 72bf7fd4219283..235f6ea5ebfd11 100644 --- a/src/content/docs/ai-gateway/integrations/agents.mdx +++ b/src/content/docs/ai-gateway/integrations/agents.mdx @@ -2,7 +2,9 @@ pcx_content_type: navigation title: Agents external_link: /agents/ +sidebar: order: 10 head: [] description: Build AI-powered Agents on Cloudflare ---- \ No newline at end of file +--- + diff --git a/src/content/docs/durable-objects/examples/agents.mdx b/src/content/docs/durable-objects/examples/agents.mdx index 72bf7fd4219283..2ba4fdef824cfc 100644 --- a/src/content/docs/durable-objects/examples/agents.mdx +++ b/src/content/docs/durable-objects/examples/agents.mdx @@ -2,6 +2,7 @@ pcx_content_type: navigation title: Agents external_link: /agents/ +sidebar: order: 10 head: [] description: Build AI-powered Agents on Cloudflare diff --git a/src/content/docs/vectorize/examples/agents.mdx b/src/content/docs/vectorize/examples/agents.mdx index 72bf7fd4219283..2ba4fdef824cfc 100644 --- a/src/content/docs/vectorize/examples/agents.mdx +++ b/src/content/docs/vectorize/examples/agents.mdx @@ -2,6 +2,7 @@ pcx_content_type: navigation title: Agents external_link: /agents/ +sidebar: order: 10 head: [] description: Build AI-powered Agents on Cloudflare diff --git a/src/content/docs/workers-ai/guides/agents.mdx b/src/content/docs/workers-ai/guides/agents.mdx index 72bf7fd4219283..2ba4fdef824cfc 100644 --- a/src/content/docs/workers-ai/guides/agents.mdx +++ b/src/content/docs/workers-ai/guides/agents.mdx @@ -2,6 +2,7 @@ pcx_content_type: navigation title: Agents external_link: /agents/ +sidebar: order: 10 head: [] description: Build AI-powered Agents on Cloudflare diff --git a/src/content/docs/workflows/examples/agents.mdx b/src/content/docs/workflows/examples/agents.mdx index 72bf7fd4219283..2ba4fdef824cfc 100644 --- a/src/content/docs/workflows/examples/agents.mdx +++ b/src/content/docs/workflows/examples/agents.mdx @@ -2,6 +2,7 @@ pcx_content_type: navigation title: Agents external_link: /agents/ +sidebar: order: 10 head: [] description: Build AI-powered Agents on Cloudflare From 7c46eb1d554750908bbfb55e5fb010670ecd97f4 Mon Sep 17 00:00:00 2001 From: Matt Silverlock Date: Wed, 29 Jan 2025 12:34:32 -0600 Subject: [PATCH 15/17] fix collapse syntax --- src/content/docs/agents/index.mdx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/content/docs/agents/index.mdx b/src/content/docs/agents/index.mdx index 76c103cfa1ca6d..e3b4675cdce9cb 100644 --- a/src/content/docs/agents/index.mdx +++ b/src/content/docs/agents/index.mdx @@ -28,7 +28,7 @@ Build AI-powered agents that can autonomously perform tasks, persist state, brow - **Designed for durable execution:** [Durable Objects](/durable-objects/) and [Workflows](/workflows) are built for a programming model that enables guaranteed execution for async tasks like long-running deep thinking LLM calls, human-in-the-loop, or unreliable API calls. - **Scalable, and reliable, without compromising on performance:** by running on Cloudflare's network, agents can execute tasks close to the user without introducing latency for real-time experiences. -## Start Building +## Start building @@ -41,7 +41,7 @@ cd workflows-starter npm i resend ``` -```ts collapse={30,1000} +```ts collapse={30-1000} import { WorkflowEntrypoint, WorkflowStep, WorkflowEvent } from 'cloudflare:workers'; import { Resend } from 'resend'; @@ -163,7 +163,7 @@ Stream responses over [WebSockets](/durable-objects/best-practices/websockets/), npm i openai ``` -```ts collapse={30,1000} +```ts collapse={30-1000} import { DurableObject } from "cloudflare:workers"; export interface Env { @@ -258,7 +258,7 @@ Use the [Browser Rendering API](/browser-rendering/) to allow your agents to sea npm install @cloudflare/puppeteer --save-dev ``` -```ts collapse={30,1000} +```ts collapse={30-1000} import puppeteer from "@cloudflare/puppeteer"; interface Env { @@ -305,7 +305,7 @@ export default { Use [AI Gateway](/ai-gateway/) to cache, log, retry and run [evals](/ai-gateway/evaluations/) (evaluations) for your agents, no matter where they're deployed. -```py collapse={30,1000} +```py collapse={30-1000} from anthropic import Anthropic anthropic = Anthropic( @@ -345,7 +345,7 @@ Give your agents more context and the ability to search across content, reply to npm i @langchain/cloudflare hono ``` -```ts collapse={30,1000} +```ts collapse={30-1000} import { CloudflareVectorizeStore, CloudflareWorkersAIEmbeddings @@ -424,7 +424,7 @@ Ship faster with the [AI SDK](https://sdk.vercel.ai/docs/introduction): make it npm i ai workers-ai-provider ``` -```ts collapse={30,1000} +```ts collapse={30-1000} import { createWorkersAI } from 'workers-ai-provider'; import { streamText } from 'ai'; @@ -460,7 +460,7 @@ Use any model provider with OpenAI compatible endpoints, including [ChatGPT](htt npm i openai ``` -```ts collapse={30,1000} +```ts collapse={30-1000} import OpenAI from "openai"; export interface Env { From cc4a04726be655b23b79a045fa678c14a03dbb4c Mon Sep 17 00:00:00 2001 From: Matt Silverlock Date: Wed, 29 Jan 2025 12:48:25 -0600 Subject: [PATCH 16/17] fix link --- src/content/docs/agents/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/agents/index.mdx b/src/content/docs/agents/index.mdx index e3b4675cdce9cb..c396697639ca9f 100644 --- a/src/content/docs/agents/index.mdx +++ b/src/content/docs/agents/index.mdx @@ -155,7 +155,7 @@ export default { -Use Durable Objects (/durable-objects/) — stateful, serverless, long-running micro-servers — to ship interactive, real-time agents that can connect to the latest AI models. +Use [Durable Objects](/durable-objects/) — stateful, serverless, long-running micro-servers — to ship interactive, real-time agents that can connect to the latest AI models. Stream responses over [WebSockets](/durable-objects/best-practices/websockets/), and don't time out while waiting for the latest chain-of-thought models — including `o1` or `deepseek-r1` — to respond. From 8cb514959b095943f72e0658e253b8a3f46c7f30 Mon Sep 17 00:00:00 2001 From: Matt Silverlock Date: Wed, 29 Jan 2025 12:59:05 -0600 Subject: [PATCH 17/17] add products sidebar --- src/content/docs/agents/capabilities/index.mdx | 2 +- src/content/docs/agents/products/ai-gateway.mdx | 11 +++++++++++ .../docs/agents/products/durable-objects.mdx | 11 +++++++++++ src/content/docs/agents/products/email-workers.mdx | 11 +++++++++++ src/content/docs/agents/products/index.mdx | 14 ++++++++++++++ src/content/docs/agents/products/real-time.mdx | 11 +++++++++++ src/content/docs/agents/products/workers-ai.mdx | 11 +++++++++++ src/content/docs/agents/products/workflows.mdx | 11 +++++++++++ 8 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 src/content/docs/agents/products/ai-gateway.mdx create mode 100644 src/content/docs/agents/products/durable-objects.mdx create mode 100644 src/content/docs/agents/products/email-workers.mdx create mode 100644 src/content/docs/agents/products/index.mdx create mode 100644 src/content/docs/agents/products/real-time.mdx create mode 100644 src/content/docs/agents/products/workers-ai.mdx create mode 100644 src/content/docs/agents/products/workflows.mdx diff --git a/src/content/docs/agents/capabilities/index.mdx b/src/content/docs/agents/capabilities/index.mdx index ce8032b141f1ed..dfcca68ba21de9 100644 --- a/src/content/docs/agents/capabilities/index.mdx +++ b/src/content/docs/agents/capabilities/index.mdx @@ -2,7 +2,7 @@ pcx_content_type: reference title: Capabilities sidebar: - order: 3 + order: 2 group: hideIndex: true --- diff --git a/src/content/docs/agents/products/ai-gateway.mdx b/src/content/docs/agents/products/ai-gateway.mdx new file mode 100644 index 00000000000000..152bb1879e435b --- /dev/null +++ b/src/content/docs/agents/products/ai-gateway.mdx @@ -0,0 +1,11 @@ +--- +pcx_content_type: navigation +title: AI Gateway +external_link: /ai-gateway/ +sidebar: + order: 3 +head: [] +description: Observe and control your AI applications. +--- + + diff --git a/src/content/docs/agents/products/durable-objects.mdx b/src/content/docs/agents/products/durable-objects.mdx new file mode 100644 index 00000000000000..955c94ff44a712 --- /dev/null +++ b/src/content/docs/agents/products/durable-objects.mdx @@ -0,0 +1,11 @@ +--- +pcx_content_type: navigation +title: Durable Objects +external_link: /durable-objects/ +sidebar: + order: 6 +head: [] +description: Create collaborative applications, real-time chat, multiplayer games and more without needing to coordinate state or manage infrastructure. +--- + + diff --git a/src/content/docs/agents/products/email-workers.mdx b/src/content/docs/agents/products/email-workers.mdx new file mode 100644 index 00000000000000..98865d42a4bf5c --- /dev/null +++ b/src/content/docs/agents/products/email-workers.mdx @@ -0,0 +1,11 @@ +--- +pcx_content_type: navigation +title: Email Workerss +external_link: /email-routing/email-workers/ +sidebar: + order: 4 +head: [] +description: Implement any logic you need to process your emails and create complex rules +--- + + diff --git a/src/content/docs/agents/products/index.mdx b/src/content/docs/agents/products/index.mdx new file mode 100644 index 00000000000000..0fce7832787300 --- /dev/null +++ b/src/content/docs/agents/products/index.mdx @@ -0,0 +1,14 @@ +--- +pcx_content_type: reference +title: Products +sidebar: + order: 3 + group: + hideIndex: true +--- + +import { DirectoryListing } from "~/components"; + +Example Reference Architectures + + diff --git a/src/content/docs/agents/products/real-time.mdx b/src/content/docs/agents/products/real-time.mdx new file mode 100644 index 00000000000000..c27b7f2713c3f8 --- /dev/null +++ b/src/content/docs/agents/products/real-time.mdx @@ -0,0 +1,11 @@ +--- +pcx_content_type: navigation +title: Real Time +external_link: /real-time/ +sidebar: + order: 10 +head: [] +description: Build real-time serverless video, audio and data applications. +--- + + diff --git a/src/content/docs/agents/products/workers-ai.mdx b/src/content/docs/agents/products/workers-ai.mdx new file mode 100644 index 00000000000000..fb54c8993df240 --- /dev/null +++ b/src/content/docs/agents/products/workers-ai.mdx @@ -0,0 +1,11 @@ +--- +pcx_content_type: navigation +title: Workers AI +external_link: /workers-ai/ +sidebar: + order: 2 +head: [] +description: Run machine learning models, powered by serverless GPUs, on Cloudflare's global network. +--- + + diff --git a/src/content/docs/agents/products/workflows.mdx b/src/content/docs/agents/products/workflows.mdx new file mode 100644 index 00000000000000..eeb7aca8b0d2bc --- /dev/null +++ b/src/content/docs/agents/products/workflows.mdx @@ -0,0 +1,11 @@ +--- +pcx_content_type: navigation +title: Workflows +external_link: /workflows/ +sidebar: + order: 5 +head: [] +description: Build durable multi-step applications on Cloudflare Workers with Workflows. +--- + +