ApiPi
Documentation: geki-ai.github.io/apipi
ApiPi is an open-source agent platform. Pi runs the agent loop. You host the gateway, keep control of the agents, and point them at your own LLM endpoints. Clients use an HTTP API compatible with the OpenAI Agents API.
Production sessions run in Firecracker microVMs: each guest has its own kernel. The gateway stays on the host. Pi and the session files share the guest.
GEKI also runs a managed ApiPi on European infrastructure.
Quickstart
Python 3.13 and uv. Postgres for the
store. The Pi CLI (pi --mode rpc) on PATH for live turns.
pip install geki-apipi
# or: uv add geki-apipi
# S3 artifacts: pip install "geki-apipi[s3]"
npm i -g --ignore-scripts @earendil-works/pi-coding-agent@0.85.1
docker compose up -d postgres
export DATABASE_URL=postgresql+asyncpg://apipi:apipi@localhost:5432/apipi
export OPENAI_BASE_URL=http://your-model-host/v1
apipi migrate
apipi serve
From a checkout, uv sync then prefix commands with uv run. That
binds 0.0.0.0:8000. The default isolation is none (Pi as a child
process). OPENAI_BASE_URL on the gateway is the model host, not
this API. The client bearer is the model key unless you set
OPENAI_API_KEY_OVERWRITE. For Firecracker:
APIPI_RUN_MODE=microvm apipi serve
In a second shell, point a client at http://localhost:8000/v1.
agent.model must exist on the model host. The openai package is not
an ApiPi dependency:
export OPENAI_API_KEY=dev-token
export OPENAI_BASE_URL=http://localhost:8000/v1
uv run --with openai python examples/openai_sdk.py
A full script is examples/openai_sdk.py. The stream stays open across idle, so that script stops after the first turn outcome.
License
MIT. See LICENSE. Contributions: CONTRIBUTING.md.
Release files for geki-apipi 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| geki_apipi-0.1.0.tar.gz | 260.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| geki_apipi-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 342.2 kB
Release files / geki_apipi-0.1.0.tar.gz
| Download URL | geki_apipi-0.1.0.tar.gz |
|---|---|
| Size | 260.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6bca198fa62d173bebb9d4863245727441f50f604710f1fcc9adf919011e855a
|
|
BLAKE2b-256 checksum How to use checksums |
1648699940a932ae34e71a5ce413d25f473610e2bc3e84c769d9727ed437ba94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.
Transparency logRelease files / geki_apipi-0.1.0-py3-none-any.whl
| Download URL | geki_apipi-0.1.0-py3-none-any.whl |
|---|---|
| Size | 82.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bb112bd21b965c7542adeff24dc69ce4d41531929ff3c02021b4303a9f483d74
|
|
BLAKE2b-256 checksum How to use checksums |
9b3ea79c7ddad900775ce7c1900471e928320ad2e0a2915cbb07589bc8f0ecca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.
Transparency log