@nestjs-adk/core 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -0
- package/dist/index.cjs +1452 -0
- package/dist/index.d.ts +49 -0
- package/dist/index.mjs +1394 -0
- package/dist/lib/abstracts/adk-agent.d.ts +17 -0
- package/dist/lib/abstracts/adk-engine.d.ts +6 -0
- package/dist/lib/abstracts/adk-skill.d.ts +3 -0
- package/dist/lib/abstracts/adk-tool.d.ts +6 -0
- package/dist/lib/abstracts/adk-workflow.d.ts +6 -0
- package/dist/lib/abstracts/artifact-store.d.ts +10 -0
- package/dist/lib/abstracts/embedder.d.ts +13 -0
- package/dist/lib/abstracts/memory-store.d.ts +13 -0
- package/dist/lib/abstracts/session-store.d.ts +8 -0
- package/dist/lib/constants.d.ts +8 -0
- package/dist/lib/decorators/agent.decorator.d.ts +2 -0
- package/dist/lib/decorators/skill.decorator.d.ts +6 -0
- package/dist/lib/decorators/tool.decorator.d.ts +6 -0
- package/dist/lib/decorators/workflow-agent.decorator.d.ts +2 -0
- package/dist/lib/embeddings/similarity.d.ts +3 -0
- package/dist/lib/errors/adk.error.d.ts +4 -0
- package/dist/lib/errors/boot.errors.d.ts +43 -0
- package/dist/lib/errors/index.d.ts +3 -0
- package/dist/lib/errors/runtime.errors.d.ts +51 -0
- package/dist/lib/models/context-policy.d.ts +16 -0
- package/dist/lib/models/model-specs.d.ts +48 -0
- package/dist/lib/module/adk-options.d.ts +24 -0
- package/dist/lib/module/adk.module.d.ts +8 -0
- package/dist/lib/prompts/adk-prompt.d.ts +8 -0
- package/dist/lib/prompts/prompt-files.d.ts +11 -0
- package/dist/lib/registry/agent-definition.d.ts +44 -0
- package/dist/lib/registry/agent-ref.d.ts +26 -0
- package/dist/lib/registry/agent-registry.d.ts +28 -0
- package/dist/lib/runner/agent-runner.d.ts +44 -0
- package/dist/lib/runner/instruction-builder.d.ts +7 -0
- package/dist/lib/runner/run-logger.d.ts +13 -0
- package/dist/lib/runner/state-bag.d.ts +9 -0
- package/dist/lib/sessions/agent-sessions.d.ts +15 -0
- package/dist/lib/stores/in-memory-artifact-store.d.ts +12 -0
- package/dist/lib/stores/in-memory-session-store.d.ts +11 -0
- package/dist/lib/testing/scripted-engine.d.ts +27 -0
- package/dist/lib/testing/scripted-model.d.ts +8 -0
- package/dist/lib/types/events.d.ts +113 -0
- package/dist/lib/types/options.d.ts +44 -0
- package/dist/lib/types/resolved-agent.d.ts +22 -0
- package/dist/lib/types/tool-context.d.ts +15 -0
- package/dist/lib/types/toolset.d.ts +10 -0
- package/package.json +35 -0
package/README.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# @nestjs-adk/core
|
|
2
|
+
|
|
3
|
+
**NestJS-native** AI agent framework: decorators (`@Agent`, `@Tool`, `@Skill`, `@WorkflowAgent`), DI and abstract contracts over pluggable engines. The agent instance is the execution handle — inject the class and call `ask()` / `stream()` / `approve()` / `reject()`.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
@Agent({
|
|
7
|
+
name: "support_agent",
|
|
8
|
+
description: "Customer support.",
|
|
9
|
+
model: "gemini-2.5-flash",
|
|
10
|
+
prompt: "You are the store's support agent.",
|
|
11
|
+
tools: [LookupOrderTool],
|
|
12
|
+
})
|
|
13
|
+
export class SupportAgent extends AdkAgent {}
|
|
14
|
+
|
|
15
|
+
// anywhere in your app — plain Nest DI
|
|
16
|
+
constructor(private readonly support: SupportAgent) {}
|
|
17
|
+
const { text } = await this.support.ask({ sessionId, message: "where is my order?" });
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Includes: fail-fast boot validation, prompts (literal, `.md` files or `AdkPrompt` builder classes), model specs (`OpenAiLike`, `ModelRouter` with failover), sessions with pluggable `SessionStore`, automatic artifact offload, native compaction, HITL approvals, structured output validation, leveled run logs with token usage, and an `Embedder` contract.
|
|
21
|
+
|
|
22
|
+
Pair it with an engine — [`@nestjs-adk/google`](https://www.npmjs.com/package/@nestjs-adk/google) — and, for tests, [`@nestjs-adk/testing`](https://www.npmjs.com/package/@nestjs-adk/testing).
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm i @nestjs-adk/core @nestjs-adk/google
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Full documentation: [github.com/gabrieljsilva/nestjs-adk](https://github.com/gabrieljsilva/nestjs-adk)
|