Metadata-Version: 2.4
Name: pi-py-server
Version: 0.83.0
Summary: Python port of @earendil-works/pi-server — Experimental agent server (Unix socket + JSONL)
Project-URL: Homepage, https://github.com/encyc/pi-py
Project-URL: Repository, https://github.com/encyc/pi-py
Project-URL: Issues, https://github.com/encyc/pi-py/issues
Author: Justin Gao
License: MIT
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.11
Requires-Dist: pi-py-coding-agent<0.84,>=0.83.0
Description-Content-Type: text/markdown

# pi-server

Python port of [@earendil-works/pi-server](https://github.com/earendil-works/pi) — Agent server (Unix socket + JSONL).

## Install

```bash
pip install pi-server
```

## Quick Start

```python
import asyncio
from pi_server import serve, send_request

# Start server in background
asyncio.create_task(serve())

# Client: list instances
response = await send_request({"type": "list"})
print(response["instances"])
```

## Commands

- `spawn` — create new agent instance
- `list` — list all instances
- `status` — get instance status
- `stop` — stop an instance
- `rpc` — forward command to agent
- `rpc_stream` — open bidirectional event stream

## Links

- [GitHub](https://github.com/encyc/pi-py) | [Issues](https://github.com/encyc/pi-py/issues)
- [PORTING.md](./PORTING.md) — deviations from upstream
