Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

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 1.0.0; apipi install can install that binary and, if you pick MicroVM, Firecracker plus a guest image.

apipi serve is the API. It stores data in SQLite at .apipi/apipi.db and binds 0.0.0.0:8000. Pi runs in apipi worker, a separate process. For local development, apipi dev starts both. 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. Worker isolation defaults to none (Pi as a child process). For production, set APIPI_RUN_MODE=microvm on the workers. Several API processes share Postgres.

From PyPI

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

apipi dev runs apipi migrate, then starts apipi serve and apipi worker as two child processes. 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 dev

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 runs the API and the workers as separate processes, and the workers use microvm isolation:

apipi serve
APIPI_RUN_MODE=microvm apipi worker

More setup is on Install.

License

MIT. See LICENSE. Contributions: CONTRIBUTING.md.

Metadata

Release files for geki-apipi 0.14.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.14.0
File Size Uploaded Provenance Actions
geki_apipi-0.14.0.tar.gz 1.0 MB With provenance Details for geki_apipi-0.14.0.tar.gz

Built distribution (wheel)

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

Total release size: 1.5 MB

Release files / geki_apipi-0.14.0.tar.gz

Download URL geki_apipi-0.14.0.tar.gz
Size 1.0 MB
Tags Source
SHA-256 checksum
How to use checksums
663c9177e82cc4f6b1c2924b2a669ce1e5c00e98e7b7209afb3a9e85cac47588
BLAKE2b-256 checksum
How to use checksums
8a816f804e54614c5617fe9524896ad0b93facac728a722d579743f8567922dc
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 Oct 3, 2026.

Transparency log

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

Download URL geki_apipi-0.14.0-py3-none-any.whl
Size 448.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e9b3f590b66adfcf8cc6160c1c92313d313c816f846df753f4a2ac23eb2320a9
BLAKE2b-256 checksum
How to use checksums
5faed3da2144e201b1c02d5368a56c328f13e690585b07ec536cbd647ccb667a
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 Oct 3, 2026.

Transparency log

Security for geki-apipi 0.14.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for geki_apipi-0.14.0.tar.gz

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 Oct 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

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