Skip to main content

Connect your AI agent to a Genio avatar — face, voice, and real-time video.

Project description

genio-sdk

Connect your AI agent to a Genio avatar. Your agent handles the conversation logic; Genio handles the face, voice, and real-time video.

Install

pip install genio-sdk

Quick Start (CLI)

export GENIO_API_KEY="gk_..."
export GENIO_AVATAR_ID="your_avatar_id"

# Test connectivity (placeholder agent)
genio-bridge --backend stub

# Hermes (requires run_agent on PYTHONPATH)
genio-bridge --backend hermes --model "provider/model"

# Custom agent module
export GENIO_AGENT_MODULE="my_agent.bridge:stream_reply"
genio-bridge --backend custom

Create a .env file in your working directory — the CLI loads it automatically via python-dotenv.

You should see SSE connected in the logs; the Genio dashboard shows Agent Connected within a few seconds.

One-click install (macOS / Linux)

curl -sL https://genio.works/bridge.sh | bash -s -- \
  --api-key "gk_..." \
  --avatar-id "your_avatar_id" \
  --backend stub

Library usage

from genio import GenioBridge

bridge = GenioBridge(api_key="gk_xxx", avatar_id="your_avatar_id")

@bridge.on_user_speech
async def handle(text, turn_id, reply):
    async for token in my_agent.stream(text):
        await reply.send_token(token)
    await reply.done()

bridge.run()  # blocks, auto-reconnects

API

GenioBridge(api_key, avatar_id, base_url?)

Param Type Required Description
api_key str Yes Your BYOA API key (starts with gk_)
avatar_id str Yes The avatar document ID
base_url str No Genio API base URL (default: https://genio.works)

@bridge.on_user_speech

Decorator to register the handler. The handler receives:

  • text — transcribed user speech
  • turn_id — unique ID for this conversation turn
  • reply — object with:
    • send_token(token) to stream final answer tokens
    • send_status(content) to report progress while your agent is still working
    • done() to end the turn

StatusConfig / run_with_status_updates

For long-running agents, use run_with_status_updates to send periodic status heartbeats while your worker streams tokens (see genio.backends.hermes).

bridge.run() / await bridge.disconnect()

run() blocks and auto-reconnects. disconnect() stops the bridge.

CLI reference

Flag / env Description
--api-key / GENIO_API_KEY BYOA key
--avatar-id / GENIO_AVATAR_ID Avatar ID
--base-url / GENIO_BASE_URL API base (default https://genio.works)
--backend / GENIO_BRIDGE_BACKEND stub, hermes, or custom
--model / HERMES_GENIO_MODEL Hermes model
--agent-module / GENIO_AGENT_MODULE package.module:callable for custom backend

Project details


Download files

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

Source Distribution

genio_sdk-0.2.0.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

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

genio_sdk-0.2.0-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file genio_sdk-0.2.0.tar.gz.

File metadata

  • Download URL: genio_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for genio_sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 dc283d299e7a55066487d6f8f751b042cdd1b740ca1c7e54fe37f123cac2926d
MD5 1a58ccf3ab5cc7b798afc0c47a71cdc6
BLAKE2b-256 6f7ea0a1a5da33439d43a418c8c53f81664e3f6b1bf7beb39296990d6fcb2144

See more details on using hashes here.

File details

Details for the file genio_sdk-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: genio_sdk-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for genio_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 87be7f97f55866d9b491d9a884a0a3f82af83c96949ff2315d14f90d3c8f615e
MD5 0e8e35a8cd59a40bd185e2af3fead9a9
BLAKE2b-256 6c9ce3c4e608077c27d0699eb6e2aff807eae32daeeeaaca159aa688124e24ab

See more details on using hashes here.

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