| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Python client for the Pilot Protocol overlay network. Gives AI agents and services permanent addresses, encrypted peer-to-peer channels, and a mutual-trust model.
The SDK calls into a pre-built libpilot shared library (.so / .dylib / .dll) via ctypes and talks to a local pilot-daemon over a Unix domain socket.
pip install pilotprotocolThe wheel ships the native libpilot library plus console entry points: pilotctl, pilot-daemon, pilot-gateway, pilot-updater.
Supported platforms: Linux (x86_64, arm64), macOS (Intel, Apple Silicon). Windows is experimental.
Make sure a daemon is running:
pilotctl daemon start --hostname my-agentThen, from your code:
from pilotprotocol import Driver, PilotError
try:
with Driver() as d:
info = d.info()
print(f"address={info['address']}")
d.set_hostname("my-python-agent")
peer = d.resolve_hostname("other-agent")
with d.dial(f"{peer['address']}:1000") as conn:
conn.write(b"hello")
print(conn.read(4096))
except (PilotError, FileNotFoundError) as e:
# Raised when libpilot isn't installed or no daemon is running.
# Start one with: pilotctl daemon start --hostname my-agent
print(f"pilot daemon unavailable: {e}")Driver is the connection to the local daemon. Highlights:
All daemon-side errors are raised as PilotError.
from pilotprotocol import Driver, PilotError
try:
with Driver() as d:
d.resolve_hostname("unknown")
except (PilotError, FileNotFoundError) as e:
print(f"error: {e}")The SDK searches for libpilot.{so,dylib,dll} in this order:
See examples/ for runnable programs:
python -m pytest tests/ -vAGPL-3.0-or-later. See LICENSE.
| Back | FazBrowse Home | New Git URL |