AutoGen v0.4+ models the world as conversing agents. Each agent's LLM client accepts an OpenAI-compatible base URL, so AIgateway slots in transparently for every agent in the conversation graph.
OpenAIChatCompletionClient accepts base_url and api_key. Use AIgateway's endpoint and key — every agent that takes this client routes through us.
Hand the client to AssistantAgent, UserProxyAgent, RoundRobinGroupChat — wherever AutoGen expects a model. Tool calls, structured output, and streaming all work.