openai-example
Runnable OpenAI examples for Composio tools and Tool Router
pinned to #a0f37a7updated 2 weeks ago
Ask your AI client: “install mcps/openai-example”.
Requires the metahub MCP server installed in your client. Set up MCP.
mh install mcps/openai-examplemetahub onboarded this repo on the author's behalf.
If you own github.com/ComposioHQ/composio on GitHub, claim the listing to take over publishing. Your claim preserves the existing eval history and badges; only the curator label is replaced with verified-publisher on your next publish.
Stars
29,169
Last commit
2 weeks ago
Latest release
published
- #agentic-ai
- #agents
- #ai
- #ai-agents
- #aiagents
- #developer-tools
- #function-calling
- #gpt-4
- #javascript
- #js
- #llm
- #llmops
- #mcp
- #python
- #remote-mcp-server
- #sse
- #typescript
Evaluation report
PassingAutomated checks the publisher passed at publish time — structure, docs, safety, and whether the artifact behaves as claimed.a0f37a7· 2 weeks ago
Select a category above to see its individual checks.
Release history
1- releasecurrenta0f37a7pass2 weeks ago
Contents
OpenAI × Composio
Runnable references for using Composio tools with OpenAI Chat Completions. The
canonical examples use the unauthenticated HACKERNEWS toolkit, so no connected
account is required.
These examples double as tests: the package is typechecked and linted on every PR, and its smoke and agent entries run nightly against the staging backend.
Setup
pnpm install
cp ts/examples/openai/.env.example ts/examples/openai/.env
Set COMPOSIO_API_KEY and OPENAI_API_KEY in .env before running an agent.
Canonical examples
| File | What it shows | Run |
|---|---|---|
src/index.ts | Direct tools with a bounded OpenAI function-calling loop | pnpm --filter openai-example start |
src/tool-router.ts | Tool Router tools executed through the session that created them | pnpm --filter openai-example tool-router |
src/smoke.ts | Provider and Tool Router wrapping without an OpenAI request | pnpm --filter openai-example run smoke |
src/cloudflare.ts | The Tool Router agent on the Cloudflare Workers runtime | pnpm --filter openai-example run cf:dev |
The direct and Tool Router agents are separate modules under
src/hackernews-agent/. Each loop is capped at ten model turns and rejects an
empty final response.
Existing examples
The existing Chat Completions, Responses API, OpenAI Agents SDK, and MCP
experiments remain under src/ and keep their existing package scripts.
Cloudflare Workers
The Worker reads credentials from its env binding rather than process.env.
Configure both secrets before deployment:
pnpm --filter openai-example exec wrangler secret put COMPOSIO_API_KEY
pnpm --filter openai-example exec wrangler secret put OPENAI_API_KEY
CI validates the Worker bundle with wrangler deploy --dry-run.
Reviews
No reviews yet. Be the first.
Related
excel-mcp-server
Excel MCP Server for manipulating Excel files
agent-lsp
Stateful LSP runtime for AI agents — 50+ tools across 30+ languages via MCP.
mcpproxy-go
Local-first MCP proxy with BM25 tool discovery, security scanning, quarantine & ~99% token savings
mh install mcps/openai-example