Slice breakdown
This page is the map — a reference: every group, every sub-slice, one line each. The rules that decide why a slice sits where it sits are in Layered slices; pages that go deep on a subsystem are linked from its group.
infra — adapters (L0)
| slice | what |
|---|---|
prisma | Postgres client + per-slice .prisma assembly (#prisma) |
redis | cache + BullMQ broker + pub/sub + locks |
storage | object store (S3 / R2 / Hetzner OS) behind IStorageGateway |
vector | vector store behind IVectorGateway (may dissolve into Postgres via LightRAG/pgvector) |
setup — framework / exposure (L0)
| slice | what |
|---|---|
core | config, decorators, interceptors, BaseError, health, rate-limit |
mcp | MCP server: @Tool/@Resource registry + SSE/HTTP/stdio transports (auth injected) |
system — shared services (L1)
| slice | sub-slices / purpose |
|---|---|
usage | meter · aggregate · report — BillingEvent ledger |
setting | limit · quota · enforcement · preference |
notification | email · inApp · webhook · template |
llm | gateway · toolAnalysis · embeddings (Claude) |
file | store / sign / metadata / ownership over infra/storage (absorbed runtime artifacts) |
user — identity / tenancy (L2)
The tenant is the team.
| slice | what |
|---|---|
user | person account, profile |
team | tenant/org; owns agents, subscription, keys |
userTeam | membership + role on a specific team |
role | RBAC (owner/admin/member) |
apiKey | programmatic keys, scoped to a team |
auth | own JWT (issuer = Core), refresh, password/verify; mints runtime session tokens |
invite | team invitations |
admin — ops / audit (L3)
| slice | what |
|---|---|
admin | admin operations over tenant data (reads via Prisma) |
audit | audit log (runtime sessions + privileged actions) |
featureFlag | flags |
runtime — execution pipeline (L4)
→ deep dive: Runtime model · Worker
| slice | what |
|---|---|
tasks | AgentTask queue on BullMQ (producer / worker / scheduled) |
worker* | runtime-session manager: sessions · k8s · browser · idle · profiles |
events | SSE/WS stream of logs+events via Redis pub/sub |
* rename pending — avoid the clash with the worker app (the worker image).
agent — domain + brain (L5)
→ deep dives: Agent · Chat · Knowledge
| slice | sub-slices / purpose |
|---|---|
agent | definition: systemPrompt, tools, memoryConfig, runtimeProfile, status |
memory | long-term agent memory over a vector store |
knowledge | thin gateway to the LightRAG service |
chat | thread · message · snapshot · attachment · insight · summary |
app | connector · account · oauth · cookie · catalog (external integrations) |
channel | channel · telegram · slack · widget |
orchestrator | the brain: handler (intake/routing) · mode (runtime-mode selection) |
billing — top sink (L6)
| slice | what |
|---|---|
subscription | team's active plan |
product · price | catalog + prices (monthly / annual / usage) |
paymentMethod | stored cards / instruments |
invoice · payment | invoices (PDF) + transactions |
webhook | payment-provider event intake |
See also
- Layered slices — the rules: dependency direction, placement mental models.
- DB schema — the models each slice owns.
- Runtime model — how the runtime + agent slices cooperate per turn.