@devries-cameron20 / composio Mirror · read-only
Fork 0

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

next
ts 22 lines 657 Bytes
Raw
1 /**
2 * Mastra × Composio — direct tools
3 *
4 * Fetches a Composio tool as a Mastra tool and lets a Mastra Agent call it.
5 * Uses the unauthenticated HACKERNEWS toolkit, so no connected account is
6 * required — set only the two keys below and run.
7 *
8 * Prerequisites:
9 * - COMPOSIO_API_KEY (https://app.composio.dev)
10 * - OPENAI_API_KEY (or swap the model — see README)
11 *
12 * Run:
13 * bun ts/examples/mastra/src/index.ts
14 */
15 import 'dotenv/config';
16
17 import { runDirectHackerNewsAgent } from './hackernews-agent/direct';
18
19 const text = await runDirectHackerNewsAgent(process.env);
20
21 console.log('\n🤖 Agent response:\n');
22 console.log(text);