@nestjs-agentic/core
v1.0.0
Published
NestJS-native primitives for building production AI agents.
Maintainers
Readme
Overview
@nestjs-agentic/core provides the foundational building blocks for nestjs-agentic:
- Decorator Suite:
@Agent(),@ToolSet(),@Tool(),@Param(),@Context(),@UsePolicies() - Policy Engine: 3-state evaluation (
allow,deny,require_approval) - Built-in Agent Runtime:
AgentExecutorruns the governed model-to-tool loop with argument validation, execution budgets, cancellation, and streaming, driven by a provider-neutralModelAdapter - FrugalGPT Model Cascading: Native cost optimization (Chen et al., Stanford University, NeurIPS 2023) cascading cheap/fast models to frontier reasoning models with confidence threshold gating ($\tau$) to cut API costs by 50–85%
- HITL Lifecycle (Experimental):
ApprovalServiceand in-memory/customApprovalStoreprotect one process-local pending invocation; approval is not a durable workflow pause and does not resume the original model turn. - Session Management:
SessionStore(InMemorySessionStore,RedisSessionStore),runSessionStoreContract, and context pre-binding - Mock Runtime:
MockRuntimeAdapterandMockModelAdapterfor LLM-free unit testing, including multi-round tool-calling scenarios
Installation
npm install @nestjs-agentic/core(Note: We recommend installing the main meta-package nestjs-agentic instead).
Documentation & Usage
For full documentation and code examples, see the nestjs-agentic GitHub Repository.
License
MIT © irzix
