Loading...
Loading...
Build AI agents on Cloudflare Workers with MCP integration, tool use, and LLM providers.
npx skill4agent add secondsky/claude-skills cloudflare-agentsexport default {
async fetch(request, env, ctx) {
const agent = {
tools: [
{ name: 'getTodo', handler: async ({id}) => ({id, title: 'Task'}) }
],
async run(input) {
return await processWithLLM(input, this.tools);
}
};
return Response.json(await agent.run(await request.text()));
}
};const agent = {
tools: [...],
systemPrompt: 'You are a helpful assistant',
model: 'gpt-4o',
async run(input) {
// Process with LLM
}
};references/patterns-concepts.mdreferences/configuration-guide.mdreferences/agent-api.mdreferences/http-sse-guide.mdreferences/websockets-guide.mdreferences/state-management.mdreferences/mcp-integration.mdreferences/advanced-features.mdreferences/error-catalog.mdtemplates/basic-agent.tstemplates/browser-agent.tstemplates/calling-agents-worker.tstemplates/chat-agent-streaming.tstemplates/hitl-agent.tstemplates/mcp-server-basic.tstemplates/rag-agent.tstemplates/react-useagent-client.tsxtemplates/scheduled-agent.tstemplates/state-sync-agent.tstemplates/websocket-agent.tstemplates/workflow-agent.tstemplates/wrangler-agents-config.jsonc