@mastra/core
Version:
37 lines • 1.4 kB
TypeScript
import type { InputProcessorOrWorkflow } from '../../processors/index.js';
import { SignalProvider } from '../../signals/signal-provider.js';
/**
* Bundles the {@link GoalStateProcessor} behind a single agent registration so
* the agent's current objective is projected onto the state-signal lane.
*
* The objective is held in the thread-scoped `threadState` domain (under
* `type: 'goal'`) and is set via {@link Agent.setObjective}; this provider only
* projects it onto the model context. The Agent auto-registers this provider
* when configured with `goal`, so configuring `goal` alone is enough.
*
* Goals require a memory-backed thread (`threadId` + `resourceId`) and a Mastra
* `storage` instance. Without memory the objective methods no-op.
*
* @example
* ```ts
* import { Agent } from '@mastra/core/agent';
*
* // `goal` auto-registers the GoalSignalProvider — no need to add it to
* // `signals` yourself.
* const agent = new Agent({
* name: 'worker',
* instructions: '...',
* model,
* memory,
* goal: { judge: judgeModel },
* });
* ```
*
* @experimental Agent signals are experimental and may change in a future release.
*/
export declare class GoalSignalProvider extends SignalProvider<'goal-signals'> {
#private;
readonly id = "goal-signals";
getInputProcessors(): InputProcessorOrWorkflow[];
}
//# sourceMappingURL=signal-provider.d.ts.map