goal/index.ts

harness-sdk · strands-ts/src/vended-plugins/goal/index.ts · typescript · Apache-2.0
ai, tag:embed-classified

Exports GoalLoop plugin for iterative refinement in Strands Agents, enabling goal‑driven behavior.

// Source: https://github.com/strands-agents/harness-sdk | License: Apache-2.0
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * Goal plugin for Strands Agents — iterative refinement against a validator,
 * inspired by Claude Code's `/goal` command.
 *
 * @example
 * ```ts
 * import { Agent } from '@strands-agents/sdk'
 * import { GoalLoop } from '@strands-agents/sdk/vended-plugins/goal'
 *
 * const concise = new GoalLoop({
 *   goal: 'At most 3 sentences, accessible to a 10-year-old.',
 *   maxAttempts: 3,
 * })
 * const agent = new Agent({ model, plugins: [concise] })
 * await agent.invoke('Explain how rainbows form.')
 * ```
 */

export { GoalLoop } from './plugin.js'
export type {
  GoalLoopOptions,
  JudgeConfig,
  Validator,
  ValidationOutcome,
  GoalAttempt,
 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key