Skip to content
STIRUP

TECHNOLOGY INTELLIGENCE

Understand what's next.

Padwan AI: Lightweight Async Python Client for Multiple LLM Providers

Padwan AI is a lightweight, asynchronous Python client that supports multiple large language model providers, offering flexibility and efficiency through a single dependency and compatibility with modern networking protocols.

Share
AI-generated conceptual illustration accompanying: Padwan AI: Lightweight Async Python Client for Multiple LLM Providers
AI-generated editorial illustration of the article topic; not a photograph, product screenshot or measured result.

Overview of Padwan AI and Its Features

Padwan AI is a lightweight, asynchronous Python client designed for interacting with multiple large language model (LLM) providers, including OpenAI, Gemini, Mistral, Grok, Anthropic, and others. It supports experimental integrations with ElevenLabs, Gradium, and TypeSafe (JEV). Unlike many LLM client libraries that require a heavy stack of dependencies and tie users to a single provider's SDK, Padwan AI offers a streamlined approach by relying on a single dependency — niquests — and supporting a wide range of APIs. This design allows developers greater flexibility and control over their LLM interactions. The library is particularly suited for applications that require high performance and minimal overhead, making it an attractive option for developers seeking a more modular and efficient solution for working with multiple LLM providers.

Design Philosophy and Technical Implementation

The design philosophy of Padwan AI centers on simplicity, extensibility, and compatibility with modern networking protocols. By using TypedDict-only structures for all request and response types, Padwan eliminates the need for external validation frameworks, streamlining development and reducing overhead [Hacker News Show]. The client is also multi-provider and extensible, supporting major LLM providers such as OpenAI, Gemini, Mistral, Grok, and Anthropic through a shared base class, making it easy to add new providers as needed [Hacker News Show]. Additionally, Padwan leverages HTTP/2 and HTTP/3 for efficient communication, ensuring performance and compatibility with modern infrastructure. However, some providers lack certain APIs, such as Gemini’s absence of a dedicated transcription API and Anthropic’s recommendation of Voyage AI for embeddings, which users should be aware of when selecting features [Hacker News Show].

Realtime and Multi-Provider Capabilities

Padwan AI supports real-time interactions and multi-provider capabilities by leveraging HTTP/2 and HTTP/3 protocols. According to the evidence, the support for these features depends on the endpoint, as the request is sent in OpenAI's wire format, and compatibility is determined by the server. Real-time functionality includes speech-to-speech translation via Gradium and streaming of text-to-speech and speech-to-text over WebSocket by ElevenLabs and Gradium. An example of usage is provided, demonstrating how to send a request using the command line or Python code. Installation instructions are also included, showing how to install the package via pip or uv. The agentic loop, implemented through AgentSession, allows for a conversation loop that calls the LLM, dispatches tool calls, and feeds results back until a plain text answer is produced.

AgentSession and Agentic Loop Implementation

The AgentSession and Agentic Loop implementation in Padwan AI enables seamless integration of language models with external tools through the Model Context Protocol (MCP). As described in the documentation, AgentSession accepts both individual McpTool instances and entire McpTransport servers within the same list, allowing tools to be incorporated as part of the session lifecycle. This is demonstrated in the example where an AgentSession is initialized with an LLMClient and a McpStdio tool, enabling the model to interact with external commands like uvx for weather data.

For connecting to MCP tool servers, the McpStreamable and McpStdio classes support both streamable HTTP and stdio interfaces, as shown in the example using McpStreamable with a URL and token. Further details on the MCP architecture, including dual-channel design and reconnection flow, are available on the MCP page.

CLI/TUI and Usage Examples

Padwan AI provides a CLI/TUI interface for interacting with multiple large language models (LLMs) via a lightweight async client. Users can execute one-shot prompts using commands like uvx padwan-cli "Explain Python decorators" -m gemini-3.8-flash or engage in interactive chats with uvx padwan-cli chat -m gpt-5.5. The tool supports models from OpenAI, Gemini, Mistral, Grok, Anthropic, and others, including experimental integrations with ElevenLabs and Gradium. Installation is straightforward via pip install padwan-ai or uv add padwan-ai. For more advanced usage, the LLMClient class allows asynchronous interactions, as demonstrated in the example where a chat completion is initiated with gpt-5.4-mini. The AgentSession class further enables agentic loops, allowing the LLM to call tools, process results, and iterate until a final response is generated.

Sources and reporting notes

Based on published source material. No independent hands-on testing is claimed.

Read more