Gabriel Protocol
raw JSON → 4.1 verified Sat May 09 auth: no python
Gabriel Protocol is the official Python package for the Gabriel real-time AI orchestration framework, providing client and server tools for building composable cognitive assistant pipelines using WebSocket communication and Protocol Buffers. Current version is 4.1, supporting Python >=3.10. Releases are tagged on GitHub at cmusatyalab/gabriel.
pip install gabriel-protocol Common errors
error ModuleNotFoundError: No module named 'gabriel' ↓
cause Package renamed to gabriel_protocol in v3.0.
fix
pip install gabriel-protocol and import gabriel_protocol instead of gabriel.
error TypeError: object NoneType can't be used in 'await' expression ↓
cause ClientRunner expects an async function, but a coroutine object was passed.
fix
Wrap your client logic in an async def function and pass it to runner.run(), not the coroutine itself.
Warnings
breaking Version 3.0 renamed the package from 'gabriel' to 'gabriel_protocol'. Old imports break. ↓
fix Change 'import gabriel' to 'import gabriel_protocol' and update all submodule imports accordingly.
deprecated The legacy v2 protocol (pre-3.0) is deprecated and may be removed in future versions. ↓
fix Upgrade to use the new WebSocket/Protobuf-based protocol. Refer to migration guide.
gotcha The package requires the server to be running before creating a client; otherwise, connection errors occur. ↓
fix Start the Gabriel server before launching any client scripts.
Imports
- ClientRunner wrong
from gabriel import ClientRunnercorrectfrom gabriel_protocol import ClientRunner - ServerWrapper wrong
from gabriel import ServerWrappercorrectfrom gabriel_protocol.server import ServerWrapper
Quickstart
import asyncio
from gabriel_protocol import ClientRunner
from gabriel_protocol.server import ServerWrapper
def main():
# Example client runner
token = os.environ.get('GABRIEL_TOKEN', '')
async def client_task(websocket):
await websocket.send('Hello')
response = await websocket.recv()
print('Received:', response)
runner = ClientRunner('ws://localhost:9099', token=token)
asyncio.run(runner.run(client_task))
if __name__ == '__main__':
main()