Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Abbenay Python Client

A Python gRPC client for the Abbenay daemon.

Installation

Install from PyPI:

pip install abbenay-client

Note: The pip package is abbenay-client but the Python import is abbenay_grpc:

from abbenay_grpc import AbbenayClient

Cross-platform: works on Linux, macOS, and Windows with Python 3.9+.

Quick Start

import asyncio
from abbenay_grpc import AbbenayClient

async def main():
    async with AbbenayClient() as client:
        async for chunk in client.chat("openai/gpt-4o", "Hello!"):
            if chunk.type == "text":
                print(chunk.text, end="")
        print()

asyncio.run(main())

Event Loop Lifecycle

grpc.aio channels are bound to the event loop that was active at connect() time. If you call asyncio.run() more than once (which creates and destroys loops), call reconnect() in the new loop:

async def preflight():
    async with AbbenayClient() as client:
        await client.health_check()

asyncio.run(preflight())  # loop created and closed

async def main():
    client = AbbenayClient()
    await client.connect()  # auto-detects dead channel, reconnects
    # ... or explicitly: await client.reconnect()

Connecting to a Container

When the daemon runs in a container with TLS (default image CMD), connect via TCP and trust the daemon CA:

async with AbbenayClient(
    host="localhost",
    port=50051,
    tls=True,
    ca_cert="/path/to/ca.crt",
) as client:
    async for chunk in client.chat("openrouter/anthropic/claude-sonnet-4", "Hello!"):
        if chunk.text:
            print(chunk.text, end="")

The container must be started with --grpc-port 50051 (the default Containerfile CMD does this with --grpc-tls) and the port published (-p 50051:50051). Copy or mount <runtime-dir>/tls/ca.crt for client trust.

See docs/CONTAINER.md for full container deployment instructions and the --insecure escape hatch.

Features

  • Chat: Streaming chat with any configured model
  • Sessions: Create, list, fork, and manage chat sessions
  • Models: List available models from all providers
  • Tools: Dynamic MCP server registration and tool filtering
  • Secrets: Manage API keys via keychain
  • Configuration: Get/update daemon config

Requirements

  • Python 3.9+
  • Abbenay daemon running (abbenay daemon)

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

abbenay_client-2026.8.0a0.tar.gz (36.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

abbenay_client-2026.8.0a0-py3-none-any.whl (38.1 kB view details)

Uploaded Python 3

File details

Details for the file abbenay_client-2026.8.0a0.tar.gz.

File metadata

  • Download URL: abbenay_client-2026.8.0a0.tar.gz
  • Upload date:
  • Size: 36.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for abbenay_client-2026.8.0a0.tar.gz
Algorithm Hash digest
SHA256 3136a4df2513b3fe27d5936d891f44bb074f31c53f7660502bae6e87a8ae4bce
MD5 8effe15811cfd953e9ca392028480fbb
BLAKE2b-256 845a266c4492d2209516ec463d5dde5ad355db499aad2dde064c27216431b6d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for abbenay_client-2026.8.0a0.tar.gz:

Publisher: release.yml on redhat-developer/abbenay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file abbenay_client-2026.8.0a0-py3-none-any.whl.

File metadata

File hashes

Hashes for abbenay_client-2026.8.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 8def8890cbdd45cc44513313a4fe9bc94680011147db5458c1d83b4f1fd7d4d1
MD5 29f1e42d566f076c5ecc2d3b60ec0dfd
BLAKE2b-256 71da36d9a9f418e2f479e612c2e35c55b7fc7913bbe540b4c20089f9cad96f54

See more details on using hashes here.

Provenance

The following attestation bundles were made for abbenay_client-2026.8.0a0-py3-none-any.whl:

Publisher: release.yml on redhat-developer/abbenay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page