This repository is a Python client SDK for the OGX AI inference API, which is OpenAI-compatible. It provides both synchronous (`OgxClient`) and asynchronous (`AsyncOgxClient`) clients with typed resources for chat completions, embeddings, vector stores, models, prompts, responses, batches, files, and more. The SDK is auto-generated by Stainless from an OpenAPI spec, ensuring the API surface stays aligned with the backend. It includes a CLI tool (`ogx-client`) for interacting with the OGX server, and a higher-level agent library (`lib/agents/`) for building conversational agents with tool use, turn/step event models, and ReAct-style reasoning. The architecture follows a resource pattern: each API endpoint group (e.g., `chat/completions`, `vector_stores`) is a class inheriting from `SyncAPIResource`/`AsyncAPIResource`, registered as properties on the client. The base client handles HTTP transport via `httpx`, retries with exponential backoff, streaming via SSE, cursor-based pagination, and error classification. The agent library wraps the Responses API, manages conversation state, and synthesizes structured events from raw stream data. The CLI uses `click` for command groups covering models, vector stores, eval, datasets, providers, and inference. Key data flows: users instantiate a client, call resource methods (e.g., `client.chat.completions.create()`), which serialize parameters via Pydantic models, send HTTP requests, and parse responses. Streaming responses are handled by `Stream`/`AsyncStream` classes that decode SSE events. The agent library consumes stream events and emits turn/step lifecycle events for UI or logging. External dependencies are minimal: `httpx`, `pydantic`, `typing-extensions`, and optional `aiohttp` for async transport. The codebase is well-structured but heavily generated; the custom agent code is the most reusable and demonstrates non-obvious skill in event synthesis and tool orchestration.