Architecture
One public API, https://api.ngamia.com, fronts private engines that
each own one job. The engines live in the
Ngamia-Agent monorepo and talk
only over HTTP contracts. No two services share a database.
internet
│ HTTPS 443
┌──────▼──────┐
│ edge proxy │ TLS; /internal/* and KIDA's caller API blocked
└──┬───────┬──┘
/v1/*, /openapi.yaml │ │ /identity/.well-known/*
┌───────▼───┐ ┌▼───────┐
│ PLATFORM │─►│ KIDA │──► Camel Accounts (OIDC)
│ public API│ │identity│
└─┬──────┬──┘ └────────┘
assertions │ │ admin token + per-workspace keys
(Ed25519) │ │
┌────▼───┐ └──────────────┐
│ NAK │──search────────►┌▼───────┐ ┌────────┐ ┌──────┐
│ agent │ │ UBONGO │──►│ parser │ │ClamAV│
│runtime │◄──definitions── │knowledge └────────┘ └──────┘
└┬──┬──┬─┘ (platform /internal/v1) └───┬────┘
model │ │ └───────────────┐ │
gateway ◄──┘ │ assertions │ assertions ▼
▼ ▼ MongoDB Atlas
┌──────┐ ┌────────────┐
│ TE │ │ KUMBUKUMBU │
│tools │ │ memory │
└──────┘ └────────────┘
PostgreSQL: one database each for KIDA, PLATFORM, NAK and TE| Folder | Service | Owns | Public |
|---|---|---|---|
PLATFORM/ | ngamia-platform | Workspaces, members, invites, agent definitions, API keys, encrypted workspace secrets, audit, rate limits | /v1/* |
KIDA/ | kida-server | People and workspace identity, memberships, short-lived access tokens | /identity/.well-known/* only |
NAK/ | ngamia-runtime | Running agents: model and tool loop, limits, citations, run log and events | no |
UBONGO/ | ubongo, ubongo-parser | Knowledge ingestion (scan, parse, embed) and cited hybrid search | no |
TOOLS ENGINE (TE)/ | te-server | Business tools: catalog, policy-checked invocation, idempotency, audit | no (optional) |
KUMBUKUMBU/ | kumbukumbu | Per-end-user memory with encryption, export and deletion | no (optional) |
KATIBA/ | library | Deterministic policy decisions used by TE | — |
Design rules
- One front door. Every public request passes the platform’s authentication, authorization, rate limit and audit. Engines trust only signed service credentials, never client input.
- The workspace ID scopes everything. The same UUID is the KIDA tenant, the UBONGO tenant, the NAK run tenant and the TE and KUMBUKUMBU tenant.
- Service calls are signed and single-use. The platform and NAK authenticate to each other with Ed25519 assertions that live at most 60 seconds and are accepted once.
- Least privilege. NAK receives only a workspace’s read-only knowledge key and its model key, per run.
- Fail closed, report plainly. Unknown agents, tenants or subjects are
refused. Engine errors become
unavailablewith arequest_id.
Continue with Identity and tenancy, Life of a run and Security.