cai is a C89/POSIX SDK for building OpenAI Responses API agents in C and Lua. It gives applications a handle-oriented client, agents, sessions, streaming, tool execution, ChatGPT subscription auth, MCP serving, model/cost accounting, and release-packaged C/Lua integration without making embedders hand-roll HTTP, WebSocket, JSON, or tool orchestration.
Repository: https://github.com/sa6mwa/cai
Examples: https://github.com/sa6mwa/cai/tree/main/examples