Skip to main content

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. Unknown JSON keys return invalid_request. Known OpenAI fields we have not implemented return not_implemented. See OpenAI compatibility.

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

You need Python 3.13 and a model host URL. Live turns also need the Pi CLI (pi --mode rpc) on PATH. The gateway pins Pi 0.85.1; apipi install can install that binary and, if you pick MicroVM, Firecracker plus a guest image.

A single process stores data in SQLite at .apipi/apipi.db and binds 0.0.0.0:8000. OPENAI_BASE_URL on the gateway is the model host that Pi calls. Clients send Authorization: Bearer; that value is the model key unless you set OPENAI_API_KEY_OVERWRITE. Isolation defaults to none (Pi as a child process). For production, set APIPI_RUN_MODE=microvm. Several processes share Postgres.

From PyPI

pip install geki-apipi
apipi install
export OPENAI_BASE_URL=http://your-model-host/v1
apipi migrate
apipi serve

uv add geki-apipi works in a project. The import package and CLI are apipi. S3-compatible artifact storage is pip install "geki-apipi[s3]".

From a git checkout

git clone https://github.com/GEKI-AI/apipi.git
cd apipi
uv sync
uv run apipi install
export OPENAI_BASE_URL=http://your-model-host/v1
uv run apipi migrate
uv run apipi serve

Prefix every apipi command with uv run in a checkout.

Client

In a second shell, point a client at http://localhost:8000/v1. agent.model must exist on the model host. Install the openai package yourself if you want the official client:

export OPENAI_API_KEY=dev-token
export OPENAI_BASE_URL=http://localhost:8000/v1
uv run --with openai python examples/sessions/openai_sdk.py

A full script is examples/sessions/openai_sdk.py. The stream stays open across idle, so that script stops after the first turn outcome. The same flow is on Using the API.

Production isolation:

APIPI_RUN_MODE=microvm apipi serve

More setup is on Install.

License

MIT. See LICENSE. Contributions: CONTRIBUTING.md.

Release files for geki-apipi 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for geki-apipi 0.6.0
File Size Uploaded
geki_apipi-0.6.0.tar.gz 539.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for geki-apipi 0.6.0
File Interpreter ABI Platform
geki_apipi-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 767.6 kB

Release files / geki_apipi-0.6.0.tar.gz

Download URL geki_apipi-0.6.0.tar.gz
Size 539.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3169a636d94b38edd0e0da211705f0a2d70aac5ed0ca2a5e6567013340cf3b52
BLAKE2b-256 checksum
How to use checksums
f2df0351952613101b306fc5cda700aba7922b43d97956644aec61dde4d7f452
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 27, 2026.

Transparency log

Release files / geki_apipi-0.6.0-py3-none-any.whl

Download URL geki_apipi-0.6.0-py3-none-any.whl
Size 228.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
75c25f497e988ff2225dfda2980bf35d84d08e92049ad38dbe5fd6d1715448b0
BLAKE2b-256 checksum
How to use checksums
fb322ad47f3b94697c6602cbfc345e71f9b5aca0bf1196d39feff39aa83f1688
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 27, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page