Observed since 20 Oct, 21:39 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Universal SDK for interacting with AI Agent CLIs (Gemini, Copilot, etc.)
Note: This project is currently in Technical Preview.
The agent-cli-sdk provides a universal, programmable interface for interacting with AI Agent CLIs like GitHub Copilot and Google Gemini.
By leveraging your local CLI tools as the "runtime engine," this SDK allows you to build sophisticated agentic applications while reusing existing authentication, session persistence, and local context without managing complex API keys or HTTP clients manually.
UniversalAgent and switch between drivers (CopilotDriver, GeminiDriver, MockDriver) seamlessly.pip install agent-cli-sdk
Ensure you have the corresponding CLI installed:
brew install gemini-cli shoud be loginbrew install copilot-cli shoud be loginOne logic, any engine. Here is how you run a simple chat with Gemini:
import asyncio
from agent_sdk.core.agent import UniversalAgent
from agent_sdk.drivers.gemini_driver import GeminiDriver
async def main():
# 1. Choose your engine
driver = GeminiDriver()
# 2. Initialize the Universal Agent
agent = UniversalAgent(driver)
# 3. Stream responses
print("User: Explain quantum computing.")
async for event in agent.stream("Explain quantum computing."):
if event.type.name == "CONTENT":
print(event.payload, end="", flush=True)
if __name__ == "__main__":
asyncio.run(main())
We provide a Guided Launcher to explore all SDK capabilities across different drivers.
python3 examples/demo_launcher.py
The launcher will:
gemini or copilot is installed).The SDK follows a modular "Driver-Controller" pattern:
UniversalAgent: The high-level controller. Manages message history, tool registration, and the ReAct execution loop.AgentDriver: The abstraction layer.
CopilotDriver: Implements JSON-RPC 2.0 over Stdio (LSP framing). Supports server-side requests (the CLI asking the SDK to run a tool).GeminiDriver: Implements the CLI wrapper pattern with -o stream-json support.JsonRpcClient: A robust, async-first JSON-RPC client designed for high-concurrency CLI communication.We maintain a high-quality codebase with extensive test coverage.
# Run all tests with coverage report
pytest --cov=src/agent_sdk tests/ --ignore=tests/e2e --cov-report=term-missing --timeout=5
E2E tests require authenticated local CLIs:
# Run Gemini E2E
pytest tests/e2e/test_gemini_e2e.py
Distributed under the MIT License. See LICENSE for more information.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.2.0 | 3 Feb 2026 | 9 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 21:39 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:cbe72912e6bf8b55998a7c1b28923d61f01fc96b63b82033407c79072f6f3716