aikit
The shared library behind three AI-backend services — see the AI Infrastructure Suite overview.
Shared platform layer for a suite of AI-backend systems (LLM eval platform, inference gateway, agent-memory service). Publishes clean, SOLID interfaces and reusable infrastructure so each downstream service depends on contracts, not implementations.
Modules
| Module | Contract | Concrete implementation |
|---|---|---|
model_client |
ModelClient |
OllamaClient, HostedClient (OpenAI-compatible) — complete / stream (text + terminal Usage) / health / aclose |
embeddings |
EmbeddingService |
SentenceTransformerEmbeddingService — local batched embeddings + cosine |
db |
async SQLAlchemy Base |
make_engine / make_sessionmaker / session_scope |
jobqueue |
JobQueue |
ArqJobQueue (Redis/arq) |
observability |
MetricsSink, logging |
PrometheusMetricsSink, structlog JSON |
config |
BaseServiceSettings |
env-driven |
Status
v0.1.0 validated end-to-end by eval-platform's live Docker smoke test:
a real Postgres migration + advisory-lock-guarded prompt versioning +
CAS-guarded run finalization, a real Redis-backed arq worker actually
dispatching jobs, and a real Ollama model producing a scored, completed run
through the API. That process caught and fixed real bugs — not just code
review findings:
sentence-transformersversion drift breakingEmbeddingService's structural match (dimtyped wider thanintin a newer release).ArqJobQueuenever dispatched a single job — arq names a job function bycoroutine.__qualname__, not__name__, so every registration collided under the same closure qualname regardless of task name.- CI installed only
devextras, so it silently only ever type-checked and tested the core Protocol stubs, never the concrete implementations.
v0.2.0 (breaking: stream() now yields str | Usage, terminal Usage
carries tokens_in/tokens_out/finish_reason — additive to complete(),
eval-platform stays pinned at v0.1.0 and is unaffected since it never
calls stream()). Adds HostedClient (OpenAI-compatible: OpenAI, Groq,
Together, Fireworks, OpenRouter, ...) for inference-gateway. Both closed
gaps eval-platform's status page called out:
OllamaClient.stream()is now live-validated against a real running Ollama server, including a production-sized model (llama3.1:8b, not just the small model used for eval-platform's fast smoke run) — text deltas followed by exactly one terminalUsage, asserted live and pinned down as a regression test replaying the real captured response.HostedClientis new and mock-tested against the OpenAI-compatible wire format (including thestream_options.include_usageSSE shape); it has not been live-validated against a real hosted provider (needs a real API key) — that'sinference-gateway's job before it goes live there.
Still open: JudgeScorer (in eval-platform) has no live-model test.
Install
Published on PyPI as aikit-platform (the import name is still aikit -
only the distribution name differs, because the name aikit itself is
already taken by an unrelated package). Core is light; heavy deps are
extras:
pip install "aikit-platform[eval]" # or [gateway], [memory]
pip install "aikit-platform[embeddings,db,queue,observability,http]" # à la carte
import aikit # same import either way
Pin an exact tag from GitHub instead, if you want the git history alongside the code (this is what eval-platform/gateway/agent-memory all do):
pip install "aikit-platform[gateway] @ git+https://github.com/Aaryan123456679/aikit@v0.2.0"
Develop
make install && make all
Release
Tag-driven: git tag vX.Y.Z && git push origin vX.Y.Z → CI builds and
publishes to PyPI via trusted publishing (OIDC, no secrets in the repo).
Metadata
Release files for aikit-platform 0.3.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 | Provenance | |
|---|---|---|---|---|
| aikit_platform-0.3.0.tar.gz | 12.9 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aikit_platform-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.4 kB
Release files / aikit_platform-0.3.0.tar.gz
| Download URL | aikit_platform-0.3.0.tar.gz |
|---|---|
| Size | 12.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a3fcb83c7ed2b3ecc2c5a90c95e9db9b78df7a14f4aba9640b65833b5a0e2a14
|
|
BLAKE2b-256 checksum How to use checksums |
e6898e08f3c0e982b8885783d81d08f73660c5dab8e149c57d763ef7e4433a33
|
| 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 7, 2026.
Transparency logRelease files / aikit_platform-0.3.0-py3-none-any.whl
| Download URL | aikit_platform-0.3.0-py3-none-any.whl |
|---|---|
| Size | 14.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ed87679c5e43a0f330c9223ec9a57bdb0d81fdf26a03b010e925dfb34da4233f
|
|
BLAKE2b-256 checksum How to use checksums |
00b744927ea9f54a06743658abaa44f5bec428dd7b07bf6f9bad3a66f564cd39
|
| 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 7, 2026.
Transparency logSecurity for aikit-platform 0.3.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.
Attestation for aikit_platform-0.3.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 Sep 7, 2026.
Transparency logA 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.