Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

next
ts 21 lines 524 Bytes
Raw
1 /**
2 * OpenAI × Composio — direct tools
3 *
4 * Fetches a Composio tool in OpenAI function-calling format and runs a bounded
5 * Chat Completions tool loop.
6 *
7 * Prerequisites:
8 * - COMPOSIO_API_KEY (https://app.composio.dev)
9 * - OPENAI_API_KEY
10 *
11 * Run:
12 * bun ts/examples/openai/src/index.ts
13 */
14 import 'dotenv/config';
15
16 import { runDirectHackerNewsAgent } from './hackernews-agent/direct';
17
18 const text = await runDirectHackerNewsAgent(process.env);
19
20 console.log('\n🤖 Agent response:\n');
21 console.log(text);