Skip to content

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)

slicewhat
prismaPostgres client + per-slice .prisma assembly (#prisma)
rediscache + BullMQ broker + pub/sub + locks
storageobject store (S3 / R2 / Hetzner OS) behind IStorageGateway
vectorvector store behind IVectorGateway (may dissolve into Postgres via LightRAG/pgvector)

setup — framework / exposure (L0)

slicewhat
coreconfig, decorators, interceptors, BaseError, health, rate-limit
mcpMCP server: @Tool/@Resource registry + SSE/HTTP/stdio transports (auth injected)

system — shared services (L1)

slicesub-slices / purpose
usagemeter · aggregate · reportBillingEvent ledger
settinglimit · quota · enforcement · preference
notificationemail · inApp · webhook · template
llmgateway · toolAnalysis · embeddings (Claude)
filestore / sign / metadata / ownership over infra/storage (absorbed runtime artifacts)

user — identity / tenancy (L2)

The tenant is the team.

slicewhat
userperson account, profile
teamtenant/org; owns agents, subscription, keys
userTeammembership + role on a specific team
roleRBAC (owner/admin/member)
apiKeyprogrammatic keys, scoped to a team
authown JWT (issuer = Core), refresh, password/verify; mints runtime session tokens
inviteteam invitations

admin — ops / audit (L3)

slicewhat
adminadmin operations over tenant data (reads via Prisma)
auditaudit log (runtime sessions + privileged actions)
featureFlagflags

runtime — execution pipeline (L4)

→ deep dive: Runtime model · Worker

slicewhat
tasksAgentTask queue on BullMQ (producer / worker / scheduled)
worker*runtime-session manager: sessions · k8s · browser · idle · profiles
eventsSSE/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

slicesub-slices / purpose
agentdefinition: systemPrompt, tools, memoryConfig, runtimeProfile, status
memorylong-term agent memory over a vector store
knowledgethin gateway to the LightRAG service
chatthread · message · snapshot · attachment · insight · summary
appconnector · account · oauth · cookie · catalog (external integrations)
channelchannel · telegram · slack · widget
orchestratorthe brain: handler (intake/routing) · mode (runtime-mode selection)

billing — top sink (L6)

slicewhat
subscriptionteam's active plan
product · pricecatalog + prices (monthly / annual / usage)
paymentMethodstored cards / instruments
invoice · paymentinvoices (PDF) + transactions
webhookpayment-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.