gitmyhub

ogx

Python ★ 8.4k updated 22h ago

Open GenAI Stack

A self-hosted API server that works as a drop-in replacement for OpenAI, letting you swap between AI models from Ollama, OpenAI, Gemini, Mistral, and others without changing your application code.

PythonOllamasetup: moderatecomplexity 3/5

OGX is an open-source API server that you run yourself, giving you a single interface for working with AI language models from different providers. It is designed to be a drop-in replacement for the OpenAI API, which means any code or tool already written to talk to OpenAI can be pointed at an OGX server instead, with no code changes required.

The main benefit is flexibility around which AI model actually runs behind the scenes. You can configure OGX to use a locally-running model through Ollama during development, then swap to a faster production-grade setup or a cloud-hosted model when deploying, without touching your application code. Models like Llama, GPT, Gemini, and Mistral are all supported through a pluggable provider system.

Beyond basic chat and text generation, OGX offers a Responses API that handles more complex sequences of actions: calling external tools, connecting to MCP servers, and searching through uploaded documents, all within a single API call. It also provides endpoints for storing and searching documents (vector stores), handling uploaded files, and running large processing jobs in batch mode.

The server supports not just the OpenAI API format but also the Anthropic SDK format and the Google GenAI SDK format, so clients written for any of those three providers can connect to the same OGX server. This means a team using different AI libraries can all point at one internal server rather than managing multiple API keys and endpoints.

OGX started life as a project called Llama Stack and was renamed when the scope expanded beyond Llama models. Client libraries are available in Python and TypeScript. The project is open source and actively maintained with a public community call each week.

Where it fits