The Problem
Agents that rely on multiple LLMs and specialized models typically need a separate server for each task (embedding, OCR, safety, etc.). Managing those servers, scaling them, and keeping a consistent API is costly and error‑prone, especially in production clusters.
What This Does
SIE (Superlinked Inference Engine) provides a single self‑hosted inference service that exposes an OpenAI‑compatible API for all common agent tasks. The repository bundles the full production stack:
- Core server code lives in
packages/sie_server/andpackages/sie_gateway/. - Model catalog definitions are under
packages/sie_server/models/. - Language‑specific SDKs (TypeScript) are in
packages/sie_ts_sdk/. - Example agents, Dockerfiles, and Helm charts are in
examples/anddeploy/helm/.
The server can load any of the 100+ pre‑configured models on demand, evict them with LRU, and autoscale via KEDA. Integration adapters for LangChain, LlamaIndex, Haystack, DSPy, and others live in integrations/.
How It Is Wired
Entry points
examples/agent-action-monitor/mock-prod/app.py:run– starts a mock production server (143 functions reachable).examples/contract-review-agent/contract_review_agent/cli.py:main– CLI for the contract‑review agent (399 functions reachable).examples/sie-hugging-face-mteb-semantic-search/backend/app/main.py:dispatch– HTTP entry for the semantic‑search service (17 functions reachable).
Internal call flow (representative)
run → extract → _extract_single → PILImage.open # filesystem read (image)
run → _make_config → from_env → _env_int # env var handling
main → evaluate_run → read_text → hashlib.sha256 # crypto hash of markdown
api_search → search → _vqa_answer → httpx.post # outbound network call
The most widely used functions are Item (called from 213 places) and extract (82 places). The hub module packages/sie_ts_sdk/src/client.ts is imported by 15 other modules, giving it a high blast radius.
External effects
- Filesystem – 221 functions read/write files (e.g., loading model weights, reading
config.yaml). - Network – 150 functions make outbound calls (e.g.,
httpx.postto external model APIs). - Crypto – 24 functions generate hashes (used for cache keys, integrity checks).
- Database – 21 functions interact with a DB (examples use SQLite in
wine-recommender). - Model inference – 3 functions call a model via the server’s inference API.
No circular import cycles were detected, which simplifies refactoring.
How To Use It
# 1. Clone the repo
git clone https://github.com/moses-y/sie
cd sie
# 2. Install the Python workspace (requires uv)
uv python install 3.12
uv lock --check
uv sync --frozen --all-packages
# 3. Run the server locally (CPU)
pip install "sie-server[local]"
sie-server serve # listens on 0.0.0.0:8080
# 4. Or launch the Docker image (GPU example)
docker run --gpus all -p 8080:8080 \
-v sie-hf-cache:/app/.cache/huggingface \
ghcr.io/superlinked/sie-server:latest
Configuration files (examples/contract-review-agent/config.yaml, examples/agent-action-monitor/.env.example) define model selections, API keys, and KEDA autoscaling parameters. The Helm chart in deploy/helm/sie-cluster/ can be applied to a Kubernetes cluster after setting values-*.yaml for the target cloud provider.
Real‑World Use
A fintech firm can replace four separate model services (embedding, OCR, safety, and agent loop) with a single SIE deployment. Their existing LangChain pipelines import sie_ts_sdk and call /v1/chat/completions; the SIE gateway routes the request to the appropriate model, caches results, and scales pods automatically via KEDA, reducing operational overhead and latency.
Code Health & Issues
Measured findings (static analysis)
- High – Add CI workflow – 842 source files, no
.github/workflowspresent. - High – Build gate for
packages/sie_config/Dockerfile– no automated image build. - High – Remove committed DB dump –
examples/wine-recommender/wine_flavor.dbleaks data. - Medium – Enable Dependabot/Renovate – 26 manifest files, no update bot.
- Medium – Pin Docker base image –
examples/agent-action-monitor/Dockerfileuses mutablepython:3.12-slim. - Medium – Add pre‑commit secret scan – no secret‑gate configured.
- Medium – Move large binaries to LFS –
dutton_test.png(30 MB) and other >5 MB blobs. - Medium – Add timeout to outbound requests – network calls lack
timeout=. - Low – Add repo convention files – missing
.editorconfig, formatter config.
Additional hygiene
- Tests exist (437 files) but are never run automatically.
- License (
Apache 2.0) and lockfiles (Cargo.lock,pnpm-lock.yaml) are present. - No obvious secret files were found, but the committed SQLite DB is a data‑leak risk.
The Bottom Line
SIE delivers a unified, production‑ready inference stack with solid Kubernetes tooling and language SDKs, making it a pragmatic choice for teams consolidating model serving. The codebase is large and contains several high‑impact hotspots (oversized SDK files, deep nesting) and lacks CI/CD automation, which must be addressed before adopting it in a regulated production environment. Use it if you need a single endpoint for diverse agent tasks and are prepared to add the missing CI, security gates, and binary management.