Skip to content
Open
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
1 change: 1 addition & 0 deletions apps/dojo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@ag-ui/a2a-middleware": "workspace:*",
"@ag-ui/adk": "workspace:*",
"@ag-ui/agno": "workspace:*",
"@ag-ui/cloudflare": "workspace:*",
"@ag-ui/crewai": "workspace:*",
"@ag-ui/langgraph": "workspace:*",
"@ag-ui/llamaindex": "workspace:*",
Expand Down
15 changes: 15 additions & 0 deletions apps/dojo/scripts/generate-content-json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,21 @@ const agentFilesMapper: Record<string, (agentKeys: string[]) => Record<string, s
{},
);
},
cloudflare: (agentKeys: string[]) => {
return agentKeys.reduce(
(acc, agentId) => ({
...acc,
[agentId]: [
path.join(
__dirname,
integrationsFolderPath,
`/cloudflare/typescript/examples/src/agents/${agentId}/agent.ts`,
),
],
}),
{},
);
},
};

async function runGenerateContent() {
Expand Down
5 changes: 5 additions & 0 deletions apps/dojo/scripts/prep-dojo-everything.js
100755 β†’ 100644
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ const ALL_TARGETS = {
name: "A2A Middleware",
cwd: path.join(middlewaresRoot, "a2a-middleware/examples"),
},
cloudflare: {
command: 'pnpm install --no-frozen-lockfile',
name: 'Cloudflare',
cwd: path.join(integrationsRoot, 'cloudflare/typescript/examples')
},
dojo: {
command: "pnpm install --no-frozen-lockfile && pnpm build --filter=demo-viewer...",
name: "Dojo",
Expand Down
7 changes: 7 additions & 0 deletions apps/dojo/scripts/run-dojo-everything.js
100755 β†’ 100644
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@ const ALL_SERVICES = {
cwd: path.join(middlewaresRoot, "a2a-middleware/examples"),
env: { PORT: 8014 },
}],
cloudflare: [{
command: 'pnpm start',
name: 'Cloudflare',
cwd: path.join(integrationsRoot, 'cloudflare/typescript/examples'),
env: { PORT: 4114, HOST: '0.0.0.0' }
}],
'dojo': [{
command: 'pnpm run start',
name: 'Dojo',
Expand All @@ -157,6 +163,7 @@ const ALL_SERVICES = {
LLAMA_INDEX_URL: 'http://localhost:8007',
MASTRA_URL: 'http://localhost:8008',
PYDANTIC_AI_URL: 'http://localhost:8009',
CLOUDFLARE_URL: 'http://localhost:4114',
ADK_MIDDLEWARE_URL: 'http://localhost:8010',
A2A_MIDDLEWARE_BUILDINGS_MANAGEMENT_URL: 'http://localhost:8011',
A2A_MIDDLEWARE_FINANCE_URL: 'http://localhost:8012',
Expand Down
27 changes: 27 additions & 0 deletions apps/dojo/src/agents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { ADKAgent } from "@ag-ui/adk";
import { SpringAiAgent } from '@ag-ui/spring-ai';
import { HttpAgent } from "@ag-ui/client";
import { A2AMiddlewareAgent } from "@ag-ui/a2a-middleware";
import { CloudflareHttpAgent } from "@ag-ui/cloudflare";

const envVars = getEnvVars();
export const agentsIntegrations: AgentIntegrationConfig[] = [
Expand Down Expand Up @@ -375,4 +376,30 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
};
},
},
{
id: "cloudflare",
agents: async () => {
return {
agentic_chat: new CloudflareHttpAgent({
url: `${envVars.cloudflareUrl}/agentic_chat`,
}),
tool_based_generative_ui: new CloudflareHttpAgent({
url: `${envVars.cloudflareUrl}/tool_based_generative_ui`,
}),
};
},
},
{
id: "cloudflare-agents-sdk",
agents: async () => {
return {
human_in_the_loop: new CloudflareHttpAgent({
url: `${envVars.cloudflareUrl}/human_in_the_loop_sdk`,
}),
tool_based_generative_ui: new CloudflareHttpAgent({
url: `${envVars.cloudflareUrl}/tool_based_generative_ui_sdk`,
}),
};
},
},
];
2 changes: 2 additions & 0 deletions apps/dojo/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ type envVars = {
a2aMiddlewareFinanceUrl: string;
a2aMiddlewareItUrl: string;
a2aMiddlewareOrchestratorUrl: string;
cloudflareUrl: string;
customDomainTitle: Record<string, string>;
}

Expand Down Expand Up @@ -44,6 +45,7 @@ export default function getEnvVars(): envVars {
a2aMiddlewareFinanceUrl: process.env.A2A_MIDDLEWARE_FINANCE_URL || 'http://localhost:9002',
a2aMiddlewareItUrl: process.env.A2A_MIDDLEWARE_IT_URL || 'http://localhost:9003',
a2aMiddlewareOrchestratorUrl: process.env.A2A_MIDDLEWARE_ORCHESTRATOR_URL || 'http://localhost:9000',
cloudflareUrl: process.env.CLOUDFLARE_URL || 'http://localhost:4114',
customDomainTitle: customDomainTitle,
}
}
156 changes: 156 additions & 0 deletions apps/dojo/src/files.json

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions apps/dojo/src/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,22 @@ export const menuIntegrations: MenuIntegrationConfig[] = [
"tool_based_generative_ui",
],
},
{
id: "cloudflare",
name: "Cloudflare Workers AI",
features: [
"agentic_chat",
"tool_based_generative_ui",
],
},
{
id: "cloudflare-agents-sdk",
name: "Cloudflare Agents SDK",
features: [
"human_in_the_loop",
"tool_based_generative_ui",
],
},
{
id: "a2a",
name: "A2A",
Expand Down
8 changes: 8 additions & 0 deletions integrations/cloudflare/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules
dist
*.log
.env
.DS_Store

# Development guides (context for AI assistants)
DEVELOPMENT-GUIDE.md
Loading