@happyvertical/smrt-agents 0.38.17 → 0.38.19

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/AGENTS.md CHANGED
@@ -85,11 +85,41 @@ Persisted `agent_config` snapshots env-derived values at sync time, so rotated e
85
85
 
86
86
  The TaskRunner calls `resolveLazyConfig()` immediately before constructing the agent, so live values always win over snapshotted ones. Re-exported from `@happyvertical/smrt-core` (`resolveLazyConfig`, `registerConfigResolver`, `getClassConfigResolvers`, …) for cases where agents isn't on the import path.
87
87
 
88
+ ## Learning Trait (issue #1886) — opt-in
89
+
90
+ Any agent can opt into a confidence-scored **recall-before / capture-after** loop backed by core's `LearningMemory` (over `_smrt_contexts` + `_smrt_embeddings`). **Off by default** — a non-opted agent behaves byte-for-byte as today; the lifecycle's learning branches are never entered.
91
+
92
+ ```typescript
93
+ @smrt()
94
+ class InvoiceAgent extends Agent {
95
+ static override learning = true; // or { minConfidence: 0.8, scope: 'invoices', ... }
96
+ protected config = {};
97
+
98
+ async run() {
99
+ // recall-before-run already populated `recalledMemories` (confidence >= floor)
100
+ const cached = this.recalledMemories.find((m) => m.key === this.docUrl);
101
+ const strategy = cached?.value ?? (await this.generateStrategy());
102
+
103
+ // stage the episode; the lifecycle reinforces it after run()
104
+ this.stageLearning({ scope: this.learningScope(), key: this.docUrl, value: strategy });
105
+
106
+ // a validated failure decays the memory without throwing
107
+ if (!ok) this.reportLearningOutcome({ success: false, error: 'no match' });
108
+ }
109
+ }
110
+ ```
111
+
112
+ - **`capture` semantics** (`LearningMemory`): success strengthens `confidence` toward 1.0 and increments `success_count`; failure decays toward `failureConfidence` (0.3) and increments `failure_count`. A single failure drops a confident memory below the reuse floor (0.7), so recall stops returning it. Refreshes `last_used_at`; honours `expires_at` and optional time-decay.
113
+ - **Memory isolation**: bound to `(agentType, agentInstanceId)` as `(owner_class, owner_id)`, so two tenants on the same agent class never share memory. `tenantId` is threaded into the optional semantic-search `where`.
114
+ - **Seams to override**: `learningScope()`, `recallForRun(memory)`, `captureForRun(memory, outcome)`, `getLearningSemanticSearch()`. Helpers for `run()`: `stageLearning(episode)`, `reportLearningOutcome(outcome)`, `getLearningMemory()`, and the `recalledMemories` field.
115
+ - **Config**: `static learning: boolean | AgentLearningConfig` — `{ enabled?, scope?, minConfidence?, successConfidence?, failureConfidence?, reinforcement?, decayHalfLifeMs? }`. `LearningMemory` and its types are re-exported from `@happyvertical/smrt-core`.
116
+
88
117
  ## Key Files
89
118
 
90
119
  | File | Purpose |
91
120
  |------|---------|
92
- | `src/agent.ts` | Base Agent class — lifecycle, dispatch, interests, config |
121
+ | `src/agent.ts` | Base Agent class — lifecycle, dispatch, interests, config, opt-in learning trait |
122
+ | `src/learning.ts` | `AgentLearningConfig` + `resolveAgentLearning()` declaration normalisation |
93
123
  | `src/schedule.ts` | AgentSchedule model — cron, execution tracking |
94
124
  | `src/tenant-agent.ts` | TenantAgent — junction table, hierarchical resolution |
95
125
  | `src/interests.ts` | Interest filter types and configuration |
package/dist/agent.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import { Logger } from '@happyvertical/logger';
2
- import { ConfigResolver, DispatchBus, DispatchMetadata, SmrtObject, SmrtObjectOptions } from '@happyvertical/smrt-core';
2
+ import { ConfigResolver, DispatchBus, DispatchMetadata, LearningEpisode, LearningMemory, LearningMemoryRecord, LearningOutcome, LearningSemanticSearch, SmrtObject, SmrtObjectOptions } from '@happyvertical/smrt-core';
3
3
  import { AgentAIOptions } from './ai-config.js';
4
4
  import { AgentWithInterestsOptions, InterestOptions, InterestResult } from './interests.js';
5
+ import { AgentLearningDeclaration } from './learning.js';
5
6
  import { AgentStatusType } from './types.js';
6
7
  import { AgentAdminRoute, AgentUISlots } from './ui.js';
7
8
  /**
@@ -187,6 +188,39 @@ export declare abstract class Agent extends SmrtObject {
187
188
  * ```
188
189
  */
189
190
  static configResolvers: Record<string, ConfigResolver>;
191
+ /**
192
+ * Opt-in learning trait declaration (#1886).
193
+ *
194
+ * **Off by default.** Set to `true` (or a config object) on a subclass to
195
+ * wire a confidence-scored recall-before / capture-after loop into the agent
196
+ * lifecycle, backed by {@link LearningMemory}. A non-opted agent behaves
197
+ * byte-for-byte as it does today — the learning branches are never entered.
198
+ *
199
+ * When enabled, the loop wraps `run()` itself (in {@link initialize}), so it
200
+ * fires whether the agent runs via {@link execute} or the background/scheduled
201
+ * path (which calls `run()` directly). Each run:
202
+ * 1. recalls confident memories for {@link learningScope} before `run()`,
203
+ * exposing them via {@link recalledMemories};
204
+ * 2. captures the run outcome after `run()` — a clean completion reinforces
205
+ * the staged memory (see {@link stageLearning}); a thrown error or an
206
+ * explicit {@link reportLearningOutcome} failure decays it.
207
+ *
208
+ * @example
209
+ * ```typescript
210
+ * @smrt()
211
+ * class InvoiceAgent extends Agent {
212
+ * static override learning = true; // reuse floor 0.7, success 0.9, fail 0.3
213
+ * // or: static override learning = { minConfidence: 0.8, scope: 'invoices' };
214
+ * protected config = {};
215
+ * async run() {
216
+ * const [cached] = this.recalledMemories;
217
+ * const strategy = cached?.value ?? (await this.generateStrategy());
218
+ * this.stageLearning({ scope: this.learningScope(), key: 'default', value: strategy });
219
+ * }
220
+ * }
221
+ * ```
222
+ */
223
+ static learning: AgentLearningDeclaration;
190
224
  /**
191
225
  * Current agent status
192
226
  */
@@ -217,6 +251,34 @@ export declare abstract class Agent extends SmrtObject {
217
251
  * Cached DispatchBus instance for inter-agent communication
218
252
  */
219
253
  private _dispatch;
254
+ /**
255
+ * Cached LearningMemory binding, once successfully built. Not cached when
256
+ * learning is disabled or the DB isn't ready yet, so an early call can't
257
+ * permanently stick the agent in a learning-disabled state.
258
+ */
259
+ private _learningMemory?;
260
+ /**
261
+ * Whether `run()` has been wrapped with the learning loop (idempotency guard).
262
+ */
263
+ private _runWrappedForLearning;
264
+ /**
265
+ * The episode the current run acted on, staged via {@link stageLearning} so
266
+ * the lifecycle can reinforce it after `run()`.
267
+ */
268
+ private _learningEpisode;
269
+ /**
270
+ * Explicit outcome for the current run, set via
271
+ * {@link reportLearningOutcome}. When unset, a clean `run()` is treated as a
272
+ * success and a thrown error as a failure.
273
+ */
274
+ private _learningOutcome;
275
+ /**
276
+ * Memories recalled before `run()` when the learning trait is enabled.
277
+ *
278
+ * Empty for non-opted agents. Populated by the lifecycle (see
279
+ * {@link recallForRun}); read from `run()` to reuse prior knowledge.
280
+ */
281
+ protected recalledMemories: LearningMemoryRecord[];
220
282
  /**
221
283
  * Creates a new Agent instance
222
284
  *
@@ -383,6 +445,68 @@ export declare abstract class Agent extends SmrtObject {
383
445
  * ```
384
446
  */
385
447
  processDispatches(): Promise<number>;
448
+ /**
449
+ * Base memory scope for this agent's learning.
450
+ *
451
+ * Defaults to the configured `scope` (if any) or `agent/<agentType>`.
452
+ * Override to shape how memories are filed (e.g. per task type). Recall and
453
+ * capture are additionally isolated by the agent instance id (owner), so
454
+ * memory never bleeds across tenants running the same agent class.
455
+ */
456
+ protected learningScope(): string;
457
+ /**
458
+ * Optional semantic-search arm for {@link LearningMemory}.
459
+ *
460
+ * Returns `undefined` by default (keyed-context recall only). Override to
461
+ * wire embedding search — e.g. return a bound `collection.semanticSearch`.
462
+ */
463
+ protected getLearningSemanticSearch(): LearningSemanticSearch | undefined;
464
+ /**
465
+ * Resolve the tenant id used for the learning scope and semantic filtering.
466
+ */
467
+ private resolveLearningTenantId;
468
+ /**
469
+ * Get this agent's {@link LearningMemory} binding, or `null` when learning is
470
+ * disabled or no database is configured.
471
+ *
472
+ * Cheap and side-effect-free when the trait is off (returns `null` after a
473
+ * single static-flag check), which keeps non-opted agents unchanged.
474
+ */
475
+ getLearningMemory(): LearningMemory | null;
476
+ /**
477
+ * Wrap `run()` with the recall-before / capture-after learning loop when the
478
+ * trait is enabled, so it fires **however run() is invoked** — via
479
+ * {@link execute} OR directly by the background/scheduled path
480
+ * (`ScheduleRunner` → `TaskRunner` calls the agent's configured method, which
481
+ * defaults to `run` and never goes through `execute()`). Both paths call
482
+ * {@link initialize}, so wrapping here covers them. Idempotent, and a no-op
483
+ * for non-opted agents (their `run()` is left untouched).
484
+ */
485
+ private wrapRunForLearning;
486
+ /**
487
+ * Recall relevant memories before `run()`.
488
+ *
489
+ * Default: a scope-wide, confidence-filtered recall of {@link learningScope}.
490
+ * Override to shape the recall (e.g. a keyed lookup or a semantic query).
491
+ */
492
+ protected recallForRun(memory: LearningMemory): Promise<LearningMemoryRecord[]>;
493
+ /**
494
+ * Capture the run outcome after `run()`.
495
+ *
496
+ * Default: reinforce the memory staged via {@link stageLearning}. A no-op
497
+ * when nothing was staged. Override for bespoke capture logic.
498
+ */
499
+ protected captureForRun(memory: LearningMemory, outcome: LearningOutcome): Promise<void>;
500
+ /**
501
+ * Stage the memory episode the current run acted on, so the lifecycle
502
+ * reinforces it after `run()` completes. Call from `run()`.
503
+ */
504
+ protected stageLearning(episode: LearningEpisode): void;
505
+ /**
506
+ * Report an explicit outcome for the current run (e.g. a validated failure
507
+ * that did not throw). Overrides the default success/throw inference.
508
+ */
509
+ protected reportLearningOutcome(outcome: LearningOutcome): void;
386
510
  /**
387
511
  * Initialize the agent
388
512
  * Sets status to 'initializing' and sets up signal handlers
@@ -1 +1 @@
1
- {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EAKrB,UAAU,EACV,KAAK,iBAAiB,EAEvB,MAAM,0BAA0B,CAAC;AAMlC,OAAO,EAAE,KAAK,cAAc,EAAyB,MAAM,gBAAgB,CAAC;AAM5E,OAAO,KAAK,EACV,yBAAyB,EAEzB,eAAe,EACf,cAAc,EAEf,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MA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G;YACW,mBAAmB;IA8IjC;;OAEG;IACH,OAAO,CAAC,WAAW;CA4BpB"}
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export { type AgentAIOptions, type AgentAISecretFallback, resolveAgentAIOptions,
5
5
  export { AgentConfig, AgentConfigCollection } from './config.js';
6
6
  export type { AgentWithInterestsOptions, AsyncQualifierFn, InterestFilter, InterestHandlerFn, InterestOptions, InterestResult, ObjectFilter, ObjectInterestConfig, QueryFn, } from './interests.js';
7
7
  export { mergeFilters, normalizeSort } from './interests.js';
8
+ export { type AgentLearningConfig, type AgentLearningDeclaration, type ResolvedAgentLearning, resolveAgentLearning, } from './learning.js';
8
9
  export { AgentSchedule, AgentScheduleCollection, type ScheduleStatus, } from './schedule.js';
9
10
  export type { SummaryArticleImage, SummaryArticleOptions, SummaryArticleResult, } from './summary-article.js';
10
11
  export { type ResolvedAgentAvailability, TenantAgent, TenantAgentCollection, type TenantAgentStatus, } from './tenant-agent.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AAKH,OAAO,wBAAwB,CAAC;AAIhC,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,GACzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MA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