Gabriel Client

raw JSON →
4.1.7 verified Sat May 09 auth: no python

Client library for the Gabriel real-time AI orchestration framework. Current version 4.1.7, requires Python >=3.10. Active development with periodic releases.

pip install gabriel-client
error ModuleNotFoundError: No module named 'gabriel'
cause Trying to import from 'gabriel' instead of 'gabriel_client'.
fix
Use: from gabriel_client import ClientRunner
error AttributeError: module 'gabriel_client' has no attribute 'ClientRunner'
cause Old version of gabriel-client installed (v2.x) or incorrect import path.
fix
Upgrade to latest: pip install --upgrade gabriel-client, then import correctly.
error TypeError: websocket_engine() missing 1 required positional argument: 'token'
cause Token argument not provided (changed from optional to required in v4.x).
fix
Pass a token string to websocket_engine().
breaking Gabriel 3.0+ switched from TCP sockets to WebSockets/Protobuf. Legacy v2.x clients are incompatible.
fix Use gabriel-client v4.x with websocket_engine or grpc_engine. Do not use old socket-based code.
gotcha The token parameter is required but often omitted in examples; server may ignore it if not configured.
fix Always pass a token string. If server doesn't enforce it, any non-empty string works.
deprecated gRPC engine is deprecated in favor of WebSocket engine in newer Gabriel server versions.
fix Prefer websocket_engine unless you specifically need gRPC features and your server supports it.

Connects to a Gabriel server using WebSocket engine and runs a client.

import asyncio
from gabriel_client import ClientRunner
from gabriel_client.websocket_engine import websocket_engine

async def main():
    server_address = 'localhost'
    port = 9099
    token = os.environ.get('GABRIEL_TOKEN', 'test_token')
    engine_name = 'my_engine'
    source = lambda: b'hello'  # dummy source, replace with actual
    engine = websocket_engine(server_address, port, token, source)
    runner = ClientRunner(engine, engine_name)
    await runner.run()

if __name__ == '__main__':
    asyncio.run(main())