← All examples

OpenAI SDK Agent

Agent using the OpenAI SDK directly. Chat completions, function calling, and streaming — no framework overhead.

agentopenaigpt

Agent using the OpenAI SDK directly. Chat completions, function calling, and streaming — no framework overhead, just the official SDK.

What's included

  • Direct OpenAI SDK — no abstraction layer, use the official client
  • Chat completions — standard chat API with full control
  • Function calling — define tools and let GPT invoke them
  • Streaming — real-time token streaming via SSE
  • GPT-4o — use the latest GPT models (GPT-4o, GPT-4o-mini, etc.)

When to use this

Pick this example when you want to:

  • Use the OpenAI SDK directly without any framework
  • Have full control over prompts, models, and parameters
  • Build a simple agent with GPT-4o and function calling

Project structure

├── src/
│   ├── index.ts                # Entry point — serve({ agents })
│   └── agents/
│       └── openai-agent.ts     # OpenAI SDK agent
├── package.json
├── tsconfig.json
└── reminix.config.ts

Quick start

Deploy the example and invoke the agent via the Reminix API. The OpenAI SDK handles chat completions, function calling, and streaming — you get a production REST endpoint with direct GPT-4o access.