Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 21, 04:45 UTC
| 1 | /** |
| 2 | * OpenAI × Composio — Cloudflare Workers |
| 3 | * |
| 4 | * Runs the same Tool Router agent path used by the Node entrypoint with |
| 5 | * credentials supplied through Worker bindings. |
| 6 | */ |
| 7 | import { |
| 8 | runToolRouterHackerNewsAgent, |
| 9 | type ToolRouterHackerNewsAgentEnvironment, |
| 10 | } from './hackernews-agent/tool-router'; |
| 11 | |
| 12 | export type Env = Required<ToolRouterHackerNewsAgentEnvironment>; |
| 13 | |
| 14 | export default { |
| 15 | async fetch(_request: Request, env: Env): Promise<Response> { |
| 16 | const text = await runToolRouterHackerNewsAgent(env); |
| 17 | |
| 18 | return new Response(text, { |
| 19 | headers: { 'content-type': 'text/plain; charset=utf-8' }, |
| 20 | }); |
| 21 | }, |
| 22 | }; |