Packages
The full nestjs-agent package set — core, the NestJS module, the model adapter, stores, the React frontend, governed SQL, the dashboard, and the ecosystem glue points.
@dudousxd/nestjs-agent is a monorepo of small, single-purpose packages. -core
defines the SPIs and the agentic loop — the mechanism. Everything else either implements one of
those SPIs (a model adapter, a store, a dashboard) or consumes the library from an app (the NestJS
module, the React frontend). Which tables, which tenant column, which roles, which model — that's
policy you supply by installing the right package and configuring it, never by forking the loop.
The map
| Package | Role |
|---|---|
-core | Framework-agnostic agent loop, tool registry, and the SPIs (ModelProvider, AgentStore, AgentGovernanceQueries, ActorResolver, RolesPolicy, TokenStreamSink, QuotaStore). |
(umbrella) | NestJS AgentModule + @AiTool + the /agent controllers; the /durable subpath for the durable runner. |
-ai-sdk | aiSdkModel(model) adapts any Vercel AI SDK v7 LanguageModel to ModelProvider — zero provider code. |
-react | useAgentChat + styling-agnostic chat components for a browser frontend. |
-data | createExecuteSqlTool — governed, read-only SQL as a prebuilt tool. |
-rag | Retrieval-Augmented Generation — chunking, ingestion, an embedding-backed Retriever, and in-memory + pgvector stores. |
-rag-media | Auto-ingest nestjs-media uploads into agent RAG — extract, chunk, embed, index, owner-scoped, delete-synced. |
-dashboard | Standalone AI-gateway governance console (bundled SPA + API), no Telescope required. |
-store-mikro-orm | AgentStore + AgentGovernanceQueries + AgentPricingStore on MikroORM. |
-store-drizzle | AgentStore + AgentGovernanceQueries + AgentPricingStore on Drizzle. |
-transport-redis | RedisTokenStreamSink — a TokenStreamSink over Redis for multi-replica deployments. |
-telescope | Telescope extension — an "Agent" tab reusing the governance read-model. |
-authz | Plugs @dudousxd/nestjs-authz into tool authorization as a RolesPolicy. |
-codegen | Emits api.agent.* into the ecosystem's unified typed client. |
-testing | In-memory store/sink/quota + a deterministic fake model for offline tests. |
How they layer
-react ──▸ (SSE /agent/chat) ──▸ umbrella (@dudousxd/nestjs-agent) ──▸ -core
-codegen ─▸ (REST /agent/*) ──┘ │
│ (SPIs)
-store-mikro-orm / -store-drizzle ─────────────────────────────┤ AgentStore + AgentGovernanceQueries + AgentPricingStore
-ai-sdk ──────────────────────────────────┤ ModelProvider
-authz ────────────────────────────────────┤ RolesPolicy
-transport-redis ────────────────────────────┤ TokenStreamSink
-data (createExecuteSqlTool) ───────────────────┤ a read-kind ToolSpec + ToolHandler
-rag ─────────────────────────────────────────────┤ Retriever + EmbeddingProvider (RAG tool / inject)
-rag-media (auto-ingest via diagnostics channel) ──┤ feeds -rag's VectorStore, no hard dep
-dashboard / -telescope ──────────────────────────────────────────────┘ consume AgentGovernanceQueries-core has no NestJS dependency and defines every contract; the umbrella package is the only one
that depends on NestJS DI. A store, the AI SDK adapter, and the authz adapter each implement exactly
one SPI. The dashboard and the Telescope extension are peers — both read the same
AgentGovernanceQueries read-model and the same aviary:agent:* diagnostics channel, so you can run
either, both, or neither.
Core
The loop, the tool registry, and every SPI.
NestJS (umbrella)
AgentModule, @AiTool, the /agent controllers, and /durable.
AI SDK adapter
aiSdkModel — zero provider code for any Vercel AI SDK v7 model.
React
useAgentChat and styling-agnostic chat components.
Data
Governed, read-only SQL as a prebuilt tool.
RAG media
Auto-ingest nestjs-media uploads into agent RAG.
Dashboard
The standalone AI-gateway governance console.
Store (MikroORM)
AgentStore + AgentGovernanceQueries + AgentPricingStore on MikroORM.
Store (Drizzle)
AgentStore + AgentGovernanceQueries + AgentPricingStore on Drizzle.
Transport (Redis)
RedisTokenStreamSink for multi-replica token streaming.
Telescope
An 'Agent' tab reusing the governance read-model.
Authz
Ability-aware RolesPolicy via @dudousxd/nestjs-authz.
Codegen
api.agent.* in the unified typed client.
Testing
In-memory store/sink/quota + a deterministic fake model.
Governed SQL
Give the model read-only SQL access without handing it the database — AST-validated single SELECTs, a fail-closed table allowlist, per-tenant rewriting, and a row cap, all before your runner touches the DB.
@dudousxd/nestjs-agent-core
The framework-agnostic agent loop, tool registry, and every SPI a provider, store, or dashboard implements against.