Open
Conversation
added 20 commits
March 5, 2026 22:18
added 8 commits
March 8, 2026 18:38
There was a problem hiding this comment.
Pull request overview
This PR introduces a Python SDK for the Pilot Protocol, built as a ctypes/FFI wrapper over a CGO-compiled shared library (libpilot.so). This allows Python callers to use the full Go driver without reimplementing the protocol.
Changes:
- New Python SDK (
sdk/python/,sdk/cgo/): PackagepilotprotocolwithDriver,Conn,Listener, andPilotError; CGO bindings insdk/cgo/bindings.go; CLI entry-point wrappers; build/publish scripts. - Integration tests (
tests/integration/): Docker-based integration test suite testing the CLI (21 tests) and Python SDK (34 tests) against a liveagent-alphaagent. - Documentation & website updates: New Python SDK doc page link added to all sidebar navs, landing page tabs for Shell/Python/ClawHub installation, updated
README.md,CONTRIBUTING.md, and registry persistence improvements.
Reviewed changes
Copilot reviewed 70 out of 83 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
sdk/cgo/bindings.go |
CGO C-shared library exposing Go driver to Python via uint64 handles |
sdk/python/pilotprotocol/__init__.py |
Public API exports |
sdk/python/pilotprotocol/cli.py |
Entry-point wrappers for bundled Go binaries |
sdk/python/pyproject.toml |
Package metadata and build config |
sdk/python/scripts/generate-coverage-badge.sh |
Coverage badge generator (has hardcoded local path bug) |
tests/integration/Dockerfile |
Multi-stage Docker build for integration tests (references nonexistent Go 1.25) |
tests/integration/Makefile |
Test runner (missing exit 1 on Docker failure) |
tests/integration/test_cli.sh |
CLI integration tests |
pkg/registry/dashboard.go |
Snapshot endpoint with spoofable localhost check |
pkg/registry/server.go |
Dashboard stat persistence; TriggerSnapshot with misleading error return |
web/index.html |
Landing page with incorrect Python SDK code examples |
sdk/python/README.md |
Duplicate Development section and inconsistent test counts |
web/docs/*.html |
Sidebar nav updates to add Python SDK link |
examples/python_sdk/ |
Python example scripts |
examples/go/ |
New Go example programs |
.github/workflows/tests.yml |
CI workflow for unit + integration tests |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Python SDK for Pilot Protocol
Overview
Python client library that wraps the Go driver via ctypes/FFI, providing full access to the Pilot Protocol network with zero protocol reimplementation.
Architecture
Single Source of Truth: Go
pkg/drivercompiled to C-shared library (libpilot.so/.dylib/.dll) called from Python via ctypes.Core Features
Network Operations
Python API
Driver (Main Client)
Connection (Stream I/O)
Listener (Server)
CLI Tools (Entry Points)
All available after
pip install:pilotctl- Main CLI (info, peers, dial, etc)pilot-daemon- Background network daemonpilot-gateway- HTTP/WebSocket gatewayBundled Components
Each wheel includes:
pilotprotocolpackage)libpilot.so)Platform Support
Auto-Discovery
SDK finds
libpilotlibrary from:~/.pilot/bin/(pip install location)site-packages/pilotprotocol/bin/)PILOT_LIB_PATHenvironment variable<project>/bin/)State Management
~/.pilot/config.json~/.pilot/identity.key~/.pilot/logs//tmp/pilot.sock(Unix) or named pipe (Windows)Installation
Auto-configures on first run.
Quick Example
Testing
Package Structure
Key Design Decisions