cd /news/ai-tools/show-hn-padwan-ai-an-llm-client-for-… Β· home β€Ί topics β€Ί ai-tools β€Ί article
[ARTICLE Β· art-166993] src=polarsen-io.github.io β†— pub= topic=ai-tools verified=true sentiment=↑ positive

Show HN: Padwan AI, an LLM Client for Python with HTTP/2 and HTTP/3

A developer released Padwan AI, an open-source async Python client for large language model APIs that depends only on the niquests HTTP library and supports OpenAI, Gemini, Mistral, Grok, Anthropic, Voyage AI, ElevenLabs (experimental), Gradium (experimental) and any OpenAI-compatible endpoint. Padwan AI negotiates HTTP/2 and HTTP/3 automatically, types all requests and responses as plain TypedDicts with no validation framework, and includes an AgentSession agentic loop with tool dispatch, parallel execution, approval hooks and snapshot persistence, plus Model Context Protocol tool servers over streamable HTTP and stdio transports. The client also streams thinking tokens from Gemini, Claude, Mistral, Grok and vLLM through an on_thought callback and runs realtime speech-to-speech WebSocket sessions for OpenAI Realtime, Gemini Live and Grok Voice; it installs via pip install padwan-ai or uv add padwan-ai.

read4 min views1 publishedNov 10, 2026

Lightweight async client for OpenAI, Gemini, Mistral, Grok, Anthropic, ElevenLabs (experimental), Gradium (experimental), TypeSafe (JEV, experimental), and any OpenAI-compatible API.

Why #

Most LLM client libraries pull in a stack of dependencies and lock you into a single provider's SDK. Padwan AI takes a different approach:

  • One dependency β€”niquests , nothing else. No provider SDKs: Padwan talks to each API directly.
  • TypedDict-only β€” all request/response types are plainTypedDict s, no validation framework required. No runtime cost, full editor support.
  • Multi-provider, extensible β€” supports the major providers (OpenAI, Gemini, Mistral, Grok, Anthropic) with a shared base class that makes adding new ones straightforward.

Features #

  • Unified interface - Single API for multiple LLM providers
  • Async-first - Built on async/await for high performance
  • HTTP/2 and HTTP/3 - Automatic protocol negotiation vianiquests
  • Fully typed - Complete type hints with Python 3.13+ generics
  • Streaming support - Real-time token streaming for all providers
  • Conversation management - Built-in conversation history handling
  • Agentic loop -AgentSession drives multi-turn conversations with tool dispatch, parallel execution, approval hooks, and snapshot persistence
  • MCP support - Streamable HTTP and stdio transports forModel Context Protocol tool servers
  • Thinking models - Stream Gemini, Claude, Mistral, Grok and vLLM thought tokens separately via anon_thought callback
  • Realtime voice - Speech-to-speech WebSocket sessions (OpenAI Realtime, Gemini Live, Grok Voice) viaRealtimeClient
  • Text-to-speech - Single and two-speaker Gemini TTS viaGeminiClient.generate_speech (details ), ElevenLabs and Gradium TTS (REST, streaming and WebSocket), transcription and speech-to-speech, plus ElevenLabs sound effects and music, viaElevenLabsClient and GradiumClient

Supported Providers #

Provider Chat Streaming Batch Realtime Transcription TTS Embeddings
OpenAI βœ… βœ… βœ… βœ… βœ… ❌ βœ…
Gemini βœ… βœ… βœ… βœ… βž– βœ… βœ…
Mistral βœ… βœ… ❌ ❌ βœ… ❌ βœ…
Grok βœ… βœ… βœ… βœ… βž– ❌ βž–
Anthropic βœ… βœ… ❌ βž– βž– βž– βž–
Voyage AI βž– βž– βž– βž– βž– βž– βœ…
ElevenLabs (experimental) βž– βž– βž– βœ… βœ… βœ… βž–
Gradium (experimental) βž– βž– βž– βœ… βœ… βœ… βž–
OpenAI-Compatible βœ… βœ… βž• βž• βž• ❌ βž•
  • ❌ = the provider offers it, Padwan does not implement it yet.
  • βž– = the provider has no such API (Gemini transcribes through chat audio input; Anthropic recommends Voyage AI for embeddings).
  • βž• = depends on the endpoint: the request is sent in OpenAI's wire format; support is up to the server.
  • Realtime: Gradium's is speech-to-speech translation, not a voice-agent session; ElevenLabs and Gradium also stream TTS and STT over WebSocket.

Quick Example #

export OPENAI_API_KEY="sk-..."
uvx padwan-ai "Hello!" -m gpt-5.4-mini
python
from padwan_ai import LLMClient

async with LLMClient(model="gpt-5.5") as client:
    response, usage = await client.complete_chat(
        [{"role": "user", "content": "Hello!"}]
    )
    print(response["content"])

Installation #

pip install padwan-ai

Or with uv:

uv add padwan-ai

Agentic loop #

AgentSession wraps a conversation with the loop that calls the LLM, dispatches any tool calls, feeds the results back, and repeats until the model produces a plain text answer. It accepts individual McpTool instances and whole McpTransport servers in the same list, transports are entered as part of the session lifecycle:

from padwan_ai import AgentSession, LLMClient, McpStdio

async with AgentSession(
    client=LLMClient(model="gpt-5.5"),
    mcp_tools=[McpStdio(command="uvx", args=["weather-mcp"])],
    system="You have access to weather tools.",
) as session:
    text = await session.send("What is the weather in Paris?")

See the Agents page for approval hooks, parallel execution, and snapshot persistence.

MCP (Model Context Protocol) #

Connect to MCP tool servers over streamable HTTP or stdio:

from padwan_ai import McpStreamable, McpStdio

async with McpStreamable(url="https://mcp.example.com/mcp", token="sk-...") as mcp:
    result = await mcp.tools[0].handler({"query": "test"})

See the MCP page for architecture diagrams, the dual-channel design of McpStreamable, the stdio reader model, and the reconnection flow.

CLI / TUI #

The interactive CLI/TUI is available as a separate package: padwan-cli.

uvx padwan-cli "Explain Python decorators" -m gemini-3.8-flash

uvx padwan-cli chat -m gpt-5.5
── more in #ai-tools 4 stories Β· sorted by recency
── more on @padwan ai 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/show-hn-padwan-ai-an…] indexed:0 read:4min 2026-11-10 Β· β€”