diff --git a/.changeset/planagent-task-stream-forwarding.md b/.changeset/planagent-task-stream-forwarding.md deleted file mode 100644 index 98aa2846c..000000000 --- a/.changeset/planagent-task-stream-forwarding.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -"@voltagent/core": patch ---- - -feat: allow PlanAgent task tool to forward subagent stream events via supervisorConfig - -Example: - -```ts -const agent = new PlanAgent({ - name: "Supervisor", - systemPrompt: "Delegate when helpful.", - model: "openai/gpt-4o", - task: { - supervisorConfig: { - fullStreamEventForwarding: { - types: ["tool-call", "tool-result", "text-delta"], - }, - }, - }, -}); -``` diff --git a/.changeset/swift-windows-appear.md b/.changeset/swift-windows-appear.md deleted file mode 100644 index 0b9f31af8..000000000 --- a/.changeset/swift-windows-appear.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -"@voltagent/core": patch ---- - -feat: add retry/fallback hooks and middleware retry feedback - -### Model Retry and Fallback - -Configure ordered model candidates with per-model retry limits. - -```ts -import { Agent } from "@voltagent/core"; -import { anthropic } from "@ai-sdk/anthropic"; - -const agent = new Agent({ - name: "Support", - instructions: "Answer support questions with short, direct replies.", - model: [ - { id: "primary", model: "openai/gpt-4o-mini", maxRetries: 2 }, - { id: "fallback", model: anthropic("claude-3-5-sonnet"), maxRetries: 1 }, - ], -}); -``` - -- `maxRetries` is per model (total attempts = `maxRetries + 1`). -- If retries are exhausted, VoltAgent tries the next enabled model. - -### Middleware Retry Feedback - -Middleware can request a retry. The retry reason and metadata are added as a system -message for the next attempt. - -```ts -import { Agent, createOutputMiddleware } from "@voltagent/core"; - -const requireSignature = createOutputMiddleware({ - name: "RequireSignature", - handler: ({ output, abort }) => { - if (!output.includes("-- Support")) { - abort("Missing signature", { retry: true, metadata: { signature: "-- Support" } }); - } - return output; - }, -}); - -const agent = new Agent({ - name: "Support", - instructions: "Answer support questions with short, direct replies.", - model: "openai/gpt-4o-mini", - maxMiddlewareRetries: 1, - outputMiddlewares: [requireSignature], -}); -``` - -### Input Middleware Example - -Input middleware can rewrite user input before guardrails and hooks. - -```ts -import { Agent, createInputMiddleware } from "@voltagent/core"; - -const normalizeInput = createInputMiddleware({ - name: "NormalizeInput", - handler: ({ input }) => { - if (typeof input !== "string") return input; - return input.trim(); - }, -}); - -const agent = new Agent({ - name: "Support", - instructions: "Answer support questions with short, direct replies.", - model: "openai/gpt-4o-mini", - inputMiddlewares: [normalizeInput], -}); -``` - -### Retry and Fallback Hooks - -Track retries and fallbacks in hooks. `onRetry` runs for LLM and middleware retries. - -```ts -const agent = new Agent({ - name: "RetryHooks", - instructions: "Answer support questions with short, direct replies.", - model: "openai/gpt-4o-mini", - hooks: { - onRetry: async (args) => { - if (args.source === "llm") { - console.log(`LLM retry ${args.nextAttempt}/${args.maxRetries + 1} for ${args.modelName}`); - return; - } - console.log( - `Middleware retry ${args.retryCount + 1}/${args.maxRetries + 1} for ${args.middlewareId ?? "unknown"}` - ); - }, - onFallback: async ({ stage, fromModel, nextModel }) => { - console.log(`Fallback (${stage}) from ${fromModel} to ${nextModel ?? "next"}`); - }, - }, -}); -``` diff --git a/.changeset/tall-numbers-cheer.md b/.changeset/tall-numbers-cheer.md deleted file mode 100644 index 5d14c602e..000000000 --- a/.changeset/tall-numbers-cheer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@voltagent/internal": patch ---- - -fix(internal): improve safeStringify function to handle circular references more effectively diff --git a/examples/base/package.json b/examples/base/package.json index a0137bbe4..3843af77e 100644 --- a/examples/base/package.json +++ b/examples/base/package.json @@ -4,7 +4,7 @@ "dependencies": { "@ai-sdk/openai": "^3.0.0", "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/github-repo-analyzer/package.json b/examples/github-repo-analyzer/package.json index 03b2d369f..527390849 100644 --- a/examples/github-repo-analyzer/package.json +++ b/examples/github-repo-analyzer/package.json @@ -4,7 +4,7 @@ "dependencies": { "@ai-sdk/openai": "^3.0.0", "@octokit/rest": "^21.0.0", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/github-star-stories/package.json b/examples/github-star-stories/package.json index ecab68dcd..90281bebe 100644 --- a/examples/github-star-stories/package.json +++ b/examples/github-star-stories/package.json @@ -3,7 +3,7 @@ "version": "0.0.0", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", "@voltagent/serverless-hono": "^2.0.5", diff --git a/examples/next-js-chatbot-starter-template/package.json b/examples/next-js-chatbot-starter-template/package.json index c501c996f..169350d9f 100644 --- a/examples/next-js-chatbot-starter-template/package.json +++ b/examples/next-js-chatbot-starter-template/package.json @@ -16,7 +16,7 @@ "@radix-ui/react-tooltip": "^1.2.8", "@radix-ui/react-use-controllable-state": "^1.2.2", "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/server-hono": "^2.0.3", "@xyflow/react": "^12.9.2", diff --git a/examples/with-a2a-server/package.json b/examples/with-a2a-server/package.json index da64e6338..b8ee2546b 100644 --- a/examples/with-a2a-server/package.json +++ b/examples/with-a2a-server/package.json @@ -2,8 +2,8 @@ "name": "voltagent-example-with-a2a-server", "dependencies": { "@voltagent/a2a-server": "^2.0.2", - "@voltagent/core": "^2.1.2", - "@voltagent/internal": "^1.0.2", + "@voltagent/core": "^2.1.3", + "@voltagent/internal": "^1.0.3", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", "ai": "^6.0.0", diff --git a/examples/with-agent-tool/package.json b/examples/with-agent-tool/package.json index f6af1ed71..1fffe0109 100644 --- a/examples/with-agent-tool/package.json +++ b/examples/with-agent-tool/package.json @@ -4,7 +4,7 @@ "version": "1.0.0", "author": "", "dependencies": { - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "ai": "^6.0.0", "zod": "^3.25.76" }, diff --git a/examples/with-airtable/package.json b/examples/with-airtable/package.json index 191810cbd..4ad4e9007 100644 --- a/examples/with-airtable/package.json +++ b/examples/with-airtable/package.json @@ -3,8 +3,8 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", - "@voltagent/internal": "^1.0.2", + "@voltagent/core": "^2.1.3", + "@voltagent/internal": "^1.0.3", "@voltagent/logger": "^2.0.2", "@voltagent/sdk": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-amazon-bedrock/package.json b/examples/with-amazon-bedrock/package.json index a2862fc61..93dff9f2e 100644 --- a/examples/with-amazon-bedrock/package.json +++ b/examples/with-amazon-bedrock/package.json @@ -3,7 +3,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-anthropic/package.json b/examples/with-anthropic/package.json index 635623c00..7b2104b57 100644 --- a/examples/with-anthropic/package.json +++ b/examples/with-anthropic/package.json @@ -3,7 +3,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-auth/package.json b/examples/with-auth/package.json index 221eb9efa..9bf26e0de 100644 --- a/examples/with-auth/package.json +++ b/examples/with-auth/package.json @@ -4,7 +4,7 @@ "dependencies": { "@ai-sdk/openai": "^3.0.0", "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-cerbos/package.json b/examples/with-cerbos/package.json index 171158bdd..653491915 100644 --- a/examples/with-cerbos/package.json +++ b/examples/with-cerbos/package.json @@ -5,7 +5,7 @@ "@cerbos/grpc": "^0.23.0", "@modelcontextprotocol/sdk": "^1.12.1", "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/server-hono": "^2.0.3", "ai": "^6.0.0", "express": "^5.1.0", diff --git a/examples/with-chroma/package.json b/examples/with-chroma/package.json index 412a08f4d..70e9ed1cf 100644 --- a/examples/with-chroma/package.json +++ b/examples/with-chroma/package.json @@ -6,7 +6,7 @@ "@chroma-core/ollama": "^0.1.7", "@chroma-core/openai": "^0.1.7", "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-client-side-tools/package.json b/examples/with-client-side-tools/package.json index e72c049ac..84b765f57 100644 --- a/examples/with-client-side-tools/package.json +++ b/examples/with-client-side-tools/package.json @@ -4,7 +4,7 @@ "dependencies": { "@ai-sdk/react": "^3.0.0", "@libsql/client": "^0.15.0", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/server-hono": "^2.0.3", "@voltagent/vercel-ai": "^1.0.0", "@voltagent/vercel-ui": "^1.0.1", diff --git a/examples/with-cloudflare-workers/package.json b/examples/with-cloudflare-workers/package.json index 8251a6c60..3dea0fbbf 100644 --- a/examples/with-cloudflare-workers/package.json +++ b/examples/with-cloudflare-workers/package.json @@ -3,7 +3,7 @@ "description": "VoltAgent example for Cloudflare Workers deployment with in-memory storage", "version": "1.0.0", "dependencies": { - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/serverless-hono": "^2.0.5", "ai": "^6.0.0", "hono": "^4.7.7", diff --git a/examples/with-composio-mcp/package.json b/examples/with-composio-mcp/package.json index 91b632c23..f058015f4 100644 --- a/examples/with-composio-mcp/package.json +++ b/examples/with-composio-mcp/package.json @@ -4,7 +4,7 @@ "version": "0.1.0", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-custom-endpoints/package.json b/examples/with-custom-endpoints/package.json index bdf7b165f..0d6d86aa0 100644 --- a/examples/with-custom-endpoints/package.json +++ b/examples/with-custom-endpoints/package.json @@ -3,7 +3,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-dynamic-parameters/package.json b/examples/with-dynamic-parameters/package.json index 3a202408c..747ba2a52 100644 --- a/examples/with-dynamic-parameters/package.json +++ b/examples/with-dynamic-parameters/package.json @@ -3,7 +3,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-dynamic-prompts/package.json b/examples/with-dynamic-prompts/package.json index 4f1b27b27..491184418 100644 --- a/examples/with-dynamic-prompts/package.json +++ b/examples/with-dynamic-prompts/package.json @@ -3,7 +3,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-feedback/package.json b/examples/with-feedback/package.json index 5eef8616f..74c20fbed 100644 --- a/examples/with-feedback/package.json +++ b/examples/with-feedback/package.json @@ -3,7 +3,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", "ai": "^6.0.0" diff --git a/examples/with-google-ai/package.json b/examples/with-google-ai/package.json index 83754655d..2095ffc78 100644 --- a/examples/with-google-ai/package.json +++ b/examples/with-google-ai/package.json @@ -3,7 +3,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-google-drive-mcp/server/package.json b/examples/with-google-drive-mcp/server/package.json index 5c503f76a..3e71428c7 100644 --- a/examples/with-google-drive-mcp/server/package.json +++ b/examples/with-google-drive-mcp/server/package.json @@ -5,7 +5,7 @@ "@hono/node-server": "^1.14.0", "@libsql/client": "^0.15.0", "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-google-vertex-ai/package.json b/examples/with-google-vertex-ai/package.json index 4eedc134c..a668acba0 100644 --- a/examples/with-google-vertex-ai/package.json +++ b/examples/with-google-vertex-ai/package.json @@ -3,7 +3,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-groq-ai/package.json b/examples/with-groq-ai/package.json index 79466119d..a9a6def7d 100644 --- a/examples/with-groq-ai/package.json +++ b/examples/with-groq-ai/package.json @@ -3,7 +3,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-guardrails/package.json b/examples/with-guardrails/package.json index de711fe72..e9aed36bf 100644 --- a/examples/with-guardrails/package.json +++ b/examples/with-guardrails/package.json @@ -3,7 +3,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", "ai": "^6.0.0" diff --git a/examples/with-hooks/package.json b/examples/with-hooks/package.json index 79a717cac..4f17bd222 100644 --- a/examples/with-hooks/package.json +++ b/examples/with-hooks/package.json @@ -3,7 +3,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-hugging-face-mcp/package.json b/examples/with-hugging-face-mcp/package.json index 345bdef73..00c6de108 100644 --- a/examples/with-hugging-face-mcp/package.json +++ b/examples/with-hugging-face-mcp/package.json @@ -3,7 +3,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-langfuse/package.json b/examples/with-langfuse/package.json index dad2d6d83..20dc383cd 100644 --- a/examples/with-langfuse/package.json +++ b/examples/with-langfuse/package.json @@ -3,7 +3,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/langfuse-exporter": "^2.0.2", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", diff --git a/examples/with-mcp-elicitation/package.json b/examples/with-mcp-elicitation/package.json index 06b4c9af1..f45ede024 100644 --- a/examples/with-mcp-elicitation/package.json +++ b/examples/with-mcp-elicitation/package.json @@ -4,7 +4,7 @@ "version": "0.1.0", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/logger": "^2.0.2", "@voltagent/mcp-server": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-mcp-server/package.json b/examples/with-mcp-server/package.json index 1e656540b..ce5af512b 100644 --- a/examples/with-mcp-server/package.json +++ b/examples/with-mcp-server/package.json @@ -1,7 +1,7 @@ { "name": "voltagent-example-with-mcp-server", "dependencies": { - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/logger": "^2.0.2", "@voltagent/mcp-server": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-mcp/package.json b/examples/with-mcp/package.json index 483eda823..7941cf74a 100644 --- a/examples/with-mcp/package.json +++ b/examples/with-mcp/package.json @@ -4,7 +4,7 @@ "version": "0.1.0", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-memory-rest-api/package.json b/examples/with-memory-rest-api/package.json index 72f4b0e66..ddf7d41dc 100644 --- a/examples/with-memory-rest-api/package.json +++ b/examples/with-memory-rest-api/package.json @@ -4,7 +4,7 @@ "version": "1.0.0", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/logger": "^2.0.2", "@voltagent/postgres": "^2.0.2", "@voltagent/server-hono": "^2.0.3" diff --git a/examples/with-middleware/package.json b/examples/with-middleware/package.json index 4a9d0808a..a79f7a2df 100644 --- a/examples/with-middleware/package.json +++ b/examples/with-middleware/package.json @@ -4,7 +4,7 @@ "dependencies": { "@ai-sdk/openai": "^3.0.0", "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-nestjs/package.json b/examples/with-nestjs/package.json index 443689d6a..5e508fb33 100644 --- a/examples/with-nestjs/package.json +++ b/examples/with-nestjs/package.json @@ -6,7 +6,7 @@ "@nestjs/common": "^11.0.0", "@nestjs/core": "^11.0.0", "@nestjs/platform-express": "^11.0.0", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/server-core": "^2.1.2", "@voltagent/server-hono": "^2.0.3", "hono": "^4.7.7", diff --git a/examples/with-netlify-functions/package.json b/examples/with-netlify-functions/package.json index 6805df638..af56cdd6d 100644 --- a/examples/with-netlify-functions/package.json +++ b/examples/with-netlify-functions/package.json @@ -3,7 +3,7 @@ "description": "VoltAgent example deployed as a Netlify Function", "version": "1.0.0", "dependencies": { - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/serverless-hono": "^2.0.5", "ai": "^6.0.0", "hono": "^4.7.7", diff --git a/examples/with-nextjs-resumable-stream/package.json b/examples/with-nextjs-resumable-stream/package.json index 0e5142567..f0de02c34 100644 --- a/examples/with-nextjs-resumable-stream/package.json +++ b/examples/with-nextjs-resumable-stream/package.json @@ -17,8 +17,8 @@ "@radix-ui/react-use-controllable-state": "^1.2.2", "@tavily/core": "^0.6.3", "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", - "@voltagent/internal": "^1.0.2", + "@voltagent/core": "^2.1.3", + "@voltagent/internal": "^1.0.3", "@voltagent/libsql": "^2.0.2", "@voltagent/resumable-streams": "^2.0.1", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-nextjs/package.json b/examples/with-nextjs/package.json index fd9d402d8..5eefa1bd5 100644 --- a/examples/with-nextjs/package.json +++ b/examples/with-nextjs/package.json @@ -6,7 +6,7 @@ "@libsql/client": "^0.15.0", "@tailwindcss/postcss": "^4.1.4", "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-nuxt/package.json b/examples/with-nuxt/package.json index 2df874e23..26f2930f8 100644 --- a/examples/with-nuxt/package.json +++ b/examples/with-nuxt/package.json @@ -3,7 +3,7 @@ "dependencies": { "@nuxt/eslint": "^1.9.0", "@nuxt/ui": "^4.0.0", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/server-hono": "^2.0.3", "ai": "^6.0.0", diff --git a/examples/with-offline-evals/package.json b/examples/with-offline-evals/package.json index b8b9fd2c9..86a602b41 100644 --- a/examples/with-offline-evals/package.json +++ b/examples/with-offline-evals/package.json @@ -3,7 +3,7 @@ "version": "0.0.0", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/evals": "^2.0.2", "@voltagent/scorers": "^2.0.4", "@voltagent/sdk": "^2.0.2", diff --git a/examples/with-ollama/package.json b/examples/with-ollama/package.json index eb2021e75..9f5d7bbfc 100644 --- a/examples/with-ollama/package.json +++ b/examples/with-ollama/package.json @@ -2,7 +2,7 @@ "name": "voltagent-example-with-ollama", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", "ai": "^6.0.0", diff --git a/examples/with-peaka-mcp/package.json b/examples/with-peaka-mcp/package.json index 863f0a5a3..75a3b6872 100644 --- a/examples/with-peaka-mcp/package.json +++ b/examples/with-peaka-mcp/package.json @@ -3,7 +3,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-pinecone/package.json b/examples/with-pinecone/package.json index 2866cf8c5..4053d78f7 100644 --- a/examples/with-pinecone/package.json +++ b/examples/with-pinecone/package.json @@ -4,7 +4,7 @@ "dependencies": { "@pinecone-database/pinecone": "^6.1.1", "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-planagents/package.json b/examples/with-planagents/package.json index 1799d737b..e6d63565c 100644 --- a/examples/with-planagents/package.json +++ b/examples/with-planagents/package.json @@ -5,7 +5,7 @@ "dependencies": { "@tavily/core": "^0.6.3", "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-playwright/package.json b/examples/with-playwright/package.json index 13449ce55..e7e015796 100644 --- a/examples/with-playwright/package.json +++ b/examples/with-playwright/package.json @@ -7,7 +7,7 @@ "@playwright/browser-webkit": "1.51.1", "@playwright/test": "^1.51.1", "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-postgres/package.json b/examples/with-postgres/package.json index 87140134f..f6673f644 100644 --- a/examples/with-postgres/package.json +++ b/examples/with-postgres/package.json @@ -4,7 +4,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/logger": "^2.0.2", "@voltagent/postgres": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-qdrant/package.json b/examples/with-qdrant/package.json index 5e38490ec..9c19ff9b9 100644 --- a/examples/with-qdrant/package.json +++ b/examples/with-qdrant/package.json @@ -4,7 +4,7 @@ "dependencies": { "@qdrant/js-client-rest": "^1.15.0", "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-rag-chatbot/package.json b/examples/with-rag-chatbot/package.json index 21ac939c7..670194cf0 100644 --- a/examples/with-rag-chatbot/package.json +++ b/examples/with-rag-chatbot/package.json @@ -4,7 +4,7 @@ "version": "0.0.1", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-recipe-generator/package.json b/examples/with-recipe-generator/package.json index aa0c789b2..fc423d025 100644 --- a/examples/with-recipe-generator/package.json +++ b/examples/with-recipe-generator/package.json @@ -3,7 +3,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", "ai": "^6.0.0", diff --git a/examples/with-research-assistant/package.json b/examples/with-research-assistant/package.json index a96b0a624..9d39c488c 100644 --- a/examples/with-research-assistant/package.json +++ b/examples/with-research-assistant/package.json @@ -3,7 +3,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-resumable-streams/package.json b/examples/with-resumable-streams/package.json index 826ea6572..20f2b50ba 100644 --- a/examples/with-resumable-streams/package.json +++ b/examples/with-resumable-streams/package.json @@ -4,7 +4,7 @@ "version": "1.0.0", "author": "", "dependencies": { - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/logger": "^2.0.2", "@voltagent/resumable-streams": "^2.0.1", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-retries-fallback/package.json b/examples/with-retries-fallback/package.json index f67988610..d72ea1f85 100644 --- a/examples/with-retries-fallback/package.json +++ b/examples/with-retries-fallback/package.json @@ -4,7 +4,7 @@ "dependencies": { "@ai-sdk/openai": "^3.0.0", "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-retrieval/package.json b/examples/with-retrieval/package.json index a241c87c0..8c3cf9894 100644 --- a/examples/with-retrieval/package.json +++ b/examples/with-retrieval/package.json @@ -3,7 +3,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-slack/package.json b/examples/with-slack/package.json index 3d5c59437..527867133 100644 --- a/examples/with-slack/package.json +++ b/examples/with-slack/package.json @@ -3,7 +3,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/sdk": "^2.0.2", diff --git a/examples/with-subagents/package.json b/examples/with-subagents/package.json index f59b902f1..883d5a3ea 100644 --- a/examples/with-subagents/package.json +++ b/examples/with-subagents/package.json @@ -4,7 +4,7 @@ "dependencies": { "@ai-sdk/openai": "^3.0.0", "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-supabase/package.json b/examples/with-supabase/package.json index 542c75140..187ef5fa0 100644 --- a/examples/with-supabase/package.json +++ b/examples/with-supabase/package.json @@ -4,7 +4,7 @@ "dependencies": { "@supabase/supabase-js": "^2.49.4", "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", "@voltagent/supabase": "^2.0.2", diff --git a/examples/with-tavily-search/package.json b/examples/with-tavily-search/package.json index add6bf610..d08593283 100644 --- a/examples/with-tavily-search/package.json +++ b/examples/with-tavily-search/package.json @@ -3,7 +3,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-thinking-tool/package.json b/examples/with-thinking-tool/package.json index 2b560f7e5..723140479 100644 --- a/examples/with-thinking-tool/package.json +++ b/examples/with-thinking-tool/package.json @@ -3,7 +3,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-tools/package.json b/examples/with-tools/package.json index 57029ad91..3aed2c3a7 100644 --- a/examples/with-tools/package.json +++ b/examples/with-tools/package.json @@ -4,7 +4,7 @@ "dependencies": { "@ai-sdk/openai": "^3.0.0", "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-turso/package.json b/examples/with-turso/package.json index 6fb3c3f84..bdcae533f 100644 --- a/examples/with-turso/package.json +++ b/examples/with-turso/package.json @@ -4,7 +4,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-vector-search/package.json b/examples/with-vector-search/package.json index deed2e031..07a815639 100644 --- a/examples/with-vector-search/package.json +++ b/examples/with-vector-search/package.json @@ -4,7 +4,7 @@ "dependencies": { "@ai-sdk/openai": "^3.0.0", "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-vercel-ai/package.json b/examples/with-vercel-ai/package.json index c876db1fa..7a2d0ad3d 100644 --- a/examples/with-vercel-ai/package.json +++ b/examples/with-vercel-ai/package.json @@ -3,7 +3,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-viteval/package.json b/examples/with-viteval/package.json index c9e640136..59c9e6649 100644 --- a/examples/with-viteval/package.json +++ b/examples/with-viteval/package.json @@ -3,7 +3,7 @@ "author": "VoltAgent", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-voice-elevenlabs/package.json b/examples/with-voice-elevenlabs/package.json index 63f5b9b6a..de12b824c 100644 --- a/examples/with-voice-elevenlabs/package.json +++ b/examples/with-voice-elevenlabs/package.json @@ -3,7 +3,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-voice-openai/package.json b/examples/with-voice-openai/package.json index 6bef9ca4b..b3db4a9bc 100644 --- a/examples/with-voice-openai/package.json +++ b/examples/with-voice-openai/package.json @@ -3,7 +3,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-voice-xsai/package.json b/examples/with-voice-xsai/package.json index 6467b4c3b..7fd3e8dd8 100644 --- a/examples/with-voice-xsai/package.json +++ b/examples/with-voice-xsai/package.json @@ -3,7 +3,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-voltagent-actions/package.json b/examples/with-voltagent-actions/package.json index 21a74a33d..99b7fd731 100644 --- a/examples/with-voltagent-actions/package.json +++ b/examples/with-voltagent-actions/package.json @@ -3,7 +3,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/logger": "^2.0.2", "@voltagent/sdk": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-voltagent-exporter/package.json b/examples/with-voltagent-exporter/package.json index 4388cc343..c0b023bf5 100644 --- a/examples/with-voltagent-exporter/package.json +++ b/examples/with-voltagent-exporter/package.json @@ -3,7 +3,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-voltagent-managed-memory/package.json b/examples/with-voltagent-managed-memory/package.json index d97bdfc88..9bcbc5193 100644 --- a/examples/with-voltagent-managed-memory/package.json +++ b/examples/with-voltagent-managed-memory/package.json @@ -3,7 +3,7 @@ "author": "", "dependencies": { "@ai-sdk/openai": "^3.0.0", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", "@voltagent/voltagent-memory": "^1.0.2", diff --git a/examples/with-voltops-resumable-streams/package.json b/examples/with-voltops-resumable-streams/package.json index 68a1f0943..1ae0ed100 100644 --- a/examples/with-voltops-resumable-streams/package.json +++ b/examples/with-voltops-resumable-streams/package.json @@ -4,7 +4,7 @@ "version": "1.0.0", "author": "", "dependencies": { - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/logger": "^2.0.2", "@voltagent/resumable-streams": "^2.0.1", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-voltops-retrieval/package.json b/examples/with-voltops-retrieval/package.json index 7ea4190da..6c0b0fba8 100644 --- a/examples/with-voltops-retrieval/package.json +++ b/examples/with-voltops-retrieval/package.json @@ -3,7 +3,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-whatsapp/package.json b/examples/with-whatsapp/package.json index 4937d97b8..aecdc5153 100644 --- a/examples/with-whatsapp/package.json +++ b/examples/with-whatsapp/package.json @@ -4,7 +4,7 @@ "dependencies": { "@supabase/supabase-js": "^2.49.4", "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-workflow/package.json b/examples/with-workflow/package.json index 9d82e72fb..b0290a732 100644 --- a/examples/with-workflow/package.json +++ b/examples/with-workflow/package.json @@ -3,7 +3,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-working-memory/package.json b/examples/with-working-memory/package.json index 6a860e0f2..5d1da2c2d 100644 --- a/examples/with-working-memory/package.json +++ b/examples/with-working-memory/package.json @@ -3,7 +3,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-youtube-to-blog/package.json b/examples/with-youtube-to-blog/package.json index 2f1a675ac..c855e77e1 100644 --- a/examples/with-youtube-to-blog/package.json +++ b/examples/with-youtube-to-blog/package.json @@ -3,7 +3,7 @@ "author": "", "dependencies": { "@voltagent/cli": "^0.1.21", - "@voltagent/core": "^2.1.2", + "@voltagent/core": "^2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/examples/with-zapier-mcp/package.json b/examples/with-zapier-mcp/package.json index 844a78c69..88ca0cc23 100644 --- a/examples/with-zapier-mcp/package.json +++ b/examples/with-zapier-mcp/package.json @@ -4,7 +4,7 @@ "version": "1.0.0", "author": "", "dependencies": { - "@voltagent/core": "~2.1.2", + "@voltagent/core": "~2.1.3", "@voltagent/libsql": "^2.0.2", "@voltagent/logger": "^2.0.2", "@voltagent/server-hono": "^2.0.3", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 030c04540..e92392771 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,130 @@ # @voltagent/core +## 2.1.3 + +### Patch Changes + +- [#959](https://github.com/VoltAgent/voltagent/pull/959) [`99ba28c`](https://github.com/VoltAgent/voltagent/commit/99ba28c1a531ff6cabb08a5b3daea3db3dd69629) Thanks [@omeraplak](https://github.com/omeraplak)! - feat: allow PlanAgent task tool to forward subagent stream events via supervisorConfig + + Example: + + ```ts + const agent = new PlanAgent({ + name: "Supervisor", + systemPrompt: "Delegate when helpful.", + model: "openai/gpt-4o", + task: { + supervisorConfig: { + fullStreamEventForwarding: { + types: ["tool-call", "tool-result", "text-delta"], + }, + }, + }, + }); + ``` + +- [#963](https://github.com/VoltAgent/voltagent/pull/963) [`ee1ad19`](https://github.com/VoltAgent/voltagent/commit/ee1ad197622a221d6216dafeefc9dae002a88ccf) Thanks [@omeraplak](https://github.com/omeraplak)! - feat: add retry/fallback hooks and middleware retry feedback + + ### Model Retry and Fallback + + Configure ordered model candidates with per-model retry limits. + + ```ts + import { Agent } from "@voltagent/core"; + import { anthropic } from "@ai-sdk/anthropic"; + + const agent = new Agent({ + name: "Support", + instructions: "Answer support questions with short, direct replies.", + model: [ + { id: "primary", model: "openai/gpt-4o-mini", maxRetries: 2 }, + { id: "fallback", model: anthropic("claude-3-5-sonnet"), maxRetries: 1 }, + ], + }); + ``` + + - `maxRetries` is per model (total attempts = `maxRetries + 1`). + - If retries are exhausted, VoltAgent tries the next enabled model. + + ### Middleware Retry Feedback + + Middleware can request a retry. The retry reason and metadata are added as a system + message for the next attempt. + + ```ts + import { Agent, createOutputMiddleware } from "@voltagent/core"; + + const requireSignature = createOutputMiddleware({ + name: "RequireSignature", + handler: ({ output, abort }) => { + if (!output.includes("-- Support")) { + abort("Missing signature", { retry: true, metadata: { signature: "-- Support" } }); + } + return output; + }, + }); + + const agent = new Agent({ + name: "Support", + instructions: "Answer support questions with short, direct replies.", + model: "openai/gpt-4o-mini", + maxMiddlewareRetries: 1, + outputMiddlewares: [requireSignature], + }); + ``` + + ### Input Middleware Example + + Input middleware can rewrite user input before guardrails and hooks. + + ```ts + import { Agent, createInputMiddleware } from "@voltagent/core"; + + const normalizeInput = createInputMiddleware({ + name: "NormalizeInput", + handler: ({ input }) => { + if (typeof input !== "string") return input; + return input.trim(); + }, + }); + + const agent = new Agent({ + name: "Support", + instructions: "Answer support questions with short, direct replies.", + model: "openai/gpt-4o-mini", + inputMiddlewares: [normalizeInput], + }); + ``` + + ### Retry and Fallback Hooks + + Track retries and fallbacks in hooks. `onRetry` runs for LLM and middleware retries. + + ```ts + const agent = new Agent({ + name: "RetryHooks", + instructions: "Answer support questions with short, direct replies.", + model: "openai/gpt-4o-mini", + hooks: { + onRetry: async (args) => { + if (args.source === "llm") { + console.log(`LLM retry ${args.nextAttempt}/${args.maxRetries + 1} for ${args.modelName}`); + return; + } + console.log( + `Middleware retry ${args.retryCount + 1}/${args.maxRetries + 1} for ${args.middlewareId ?? "unknown"}` + ); + }, + onFallback: async ({ stage, fromModel, nextModel }) => { + console.log(`Fallback (${stage}) from ${fromModel} to ${nextModel ?? "next"}`); + }, + }, + }); + ``` + +- Updated dependencies [[`c39fedd`](https://github.com/VoltAgent/voltagent/commit/c39fedd794486d630f509b5c91aa30f8fe5dc596)]: + - @voltagent/internal@1.0.3 + ## 2.1.2 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index 91d68209a..416332b7e 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,7 +1,7 @@ { "name": "@voltagent/core", "description": "VoltAgent Core - AI agent framework for JavaScript", - "version": "2.1.2", + "version": "2.1.3", "dependencies": { "@ai-sdk/amazon-bedrock": "^3.0.0", "@ai-sdk/anthropic": "^3.0.0", @@ -36,7 +36,7 @@ "@opentelemetry/sdk-trace-base": "^2.0.0", "@opentelemetry/sdk-trace-node": "^2.0.0", "@opentelemetry/semantic-conventions": "^1.28.0", - "@voltagent/internal": "^1.0.2", + "@voltagent/internal": "^1.0.3", "fast-glob": "^3.3.3", "gray-matter": "^4.0.3", "micromatch": "^4.0.8", diff --git a/packages/internal/CHANGELOG.md b/packages/internal/CHANGELOG.md index 589a01a99..40043645c 100644 --- a/packages/internal/CHANGELOG.md +++ b/packages/internal/CHANGELOG.md @@ -1,5 +1,11 @@ # @voltagent/internal +## 1.0.3 + +### Patch Changes + +- [#961](https://github.com/VoltAgent/voltagent/pull/961) [`c39fedd`](https://github.com/VoltAgent/voltagent/commit/c39fedd794486d630f509b5c91aa30f8fe5dc596) Thanks [@rallu](https://github.com/rallu)! - fix(internal): improve safeStringify function to handle circular references more effectively + ## 1.0.2 ### Patch Changes diff --git a/packages/internal/package.json b/packages/internal/package.json index bc8149e3c..a8093f5d8 100644 --- a/packages/internal/package.json +++ b/packages/internal/package.json @@ -1,7 +1,7 @@ { "name": "@voltagent/internal", "description": "VoltAgent internal - an internal set of tools for the VoltAgent packages", - "version": "1.0.2", + "version": "1.0.3", "dependencies": { "type-fest": "^4.41.0" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 279985b09..365a36523 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -117,7 +117,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -154,7 +154,7 @@ importers: specifier: ^21.0.0 version: 21.1.1 '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -191,7 +191,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/logger': specifier: ^2.0.2 @@ -267,7 +267,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -388,10 +388,10 @@ importers: specifier: ^2.0.2 version: link:../../packages/a2a-server '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/internal': - specifier: ^1.0.2 + specifier: ^1.0.3 version: link:../../packages/internal '@voltagent/logger': specifier: ^2.0.2 @@ -477,7 +477,7 @@ importers: examples/with-agent-tool: dependencies: '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core ai: specifier: ^6.0.0 @@ -502,10 +502,10 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/internal': - specifier: ^1.0.2 + specifier: ^1.0.3 version: link:../../packages/internal '@voltagent/logger': specifier: ^2.0.2 @@ -539,7 +539,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -573,7 +573,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -716,7 +716,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -756,7 +756,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/server-hono': specifier: ^2.0.3 @@ -796,7 +796,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -836,7 +836,7 @@ importers: specifier: ^0.15.0 version: 0.15.10 '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/server-hono': specifier: ^2.0.3 @@ -882,7 +882,7 @@ importers: examples/with-cloudflare-workers: dependencies: '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/serverless-hono': specifier: ^2.0.5 @@ -916,7 +916,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -1012,7 +1012,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -1046,7 +1046,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -1080,7 +1080,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -1114,7 +1114,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/logger': specifier: ^2.0.2 @@ -1142,7 +1142,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -1225,7 +1225,7 @@ importers: specifier: ^0.1.21 version: link:../../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -1265,7 +1265,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -1299,7 +1299,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -1333,7 +1333,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/logger': specifier: ^2.0.2 @@ -1361,7 +1361,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -1395,7 +1395,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -1503,7 +1503,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/langfuse-exporter': specifier: ^2.0.2 @@ -1565,7 +1565,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -1599,7 +1599,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/logger': specifier: ^2.0.2 @@ -1630,7 +1630,7 @@ importers: examples/with-mcp-server: dependencies: '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/logger': specifier: ^2.0.2 @@ -1664,7 +1664,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/logger': specifier: ^2.0.2 @@ -1695,7 +1695,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -1735,7 +1735,7 @@ importers: specifier: ^11.0.0 version: 11.1.7(@nestjs/common@11.1.7)(@nestjs/core@11.1.7) '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/server-core': specifier: ^2.1.2 @@ -1781,7 +1781,7 @@ importers: examples/with-netlify-functions: dependencies: '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/serverless-hono': specifier: ^2.0.5 @@ -1821,7 +1821,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -1927,10 +1927,10 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/internal': - specifier: ^1.0.2 + specifier: ^1.0.3 version: link:../../packages/internal '@voltagent/libsql': specifier: ^2.0.2 @@ -2045,7 +2045,7 @@ importers: specifier: ^4.0.0 version: 4.0.1(embla-carousel@8.6.0)(typescript@5.9.3)(vite@7.2.7)(vue-router@4.5.1)(vue@3.5.22)(zod@3.25.76) '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -2079,7 +2079,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/evals': specifier: ^2.0.2 @@ -2113,7 +2113,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/logger': specifier: ^2.0.2 @@ -2147,7 +2147,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -2184,7 +2184,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -2224,7 +2224,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -2270,7 +2270,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -2316,7 +2316,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/logger': specifier: ^2.0.2 @@ -2353,7 +2353,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -2390,7 +2390,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -2424,7 +2424,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/logger': specifier: ^2.0.2 @@ -2455,7 +2455,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -2483,7 +2483,7 @@ importers: examples/with-resumable-streams: dependencies: '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/logger': specifier: ^2.0.2 @@ -2517,7 +2517,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -2551,7 +2551,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -2585,7 +2585,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -2625,7 +2625,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -2662,7 +2662,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/logger': specifier: ^2.0.2 @@ -2696,7 +2696,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -2730,7 +2730,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -2767,7 +2767,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -2801,7 +2801,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -2838,7 +2838,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -2872,7 +2872,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -2906,7 +2906,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -2958,7 +2958,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -2995,7 +2995,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -3038,7 +3038,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -3081,7 +3081,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/logger': specifier: ^2.0.2 @@ -3112,7 +3112,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -3146,7 +3146,7 @@ importers: specifier: ^3.0.0 version: 3.0.1(zod@3.25.76) '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/logger': specifier: ^2.0.2 @@ -3177,7 +3177,7 @@ importers: examples/with-voltops-resumable-streams: dependencies: '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/logger': specifier: ^2.0.2 @@ -3208,7 +3208,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -3245,7 +3245,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -3282,7 +3282,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -3316,7 +3316,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -3350,7 +3350,7 @@ importers: specifier: ^0.1.21 version: link:../../packages/cli '@voltagent/core': - specifier: ^2.1.2 + specifier: ^2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -3381,7 +3381,7 @@ importers: examples/with-zapier-mcp: dependencies: '@voltagent/core': - specifier: ~2.1.2 + specifier: ~2.1.3 version: link:../../packages/core '@voltagent/libsql': specifier: ^2.0.2 @@ -3686,7 +3686,7 @@ importers: specifier: ^1.28.0 version: 1.36.0 '@voltagent/internal': - specifier: ^1.0.2 + specifier: ^1.0.3 version: link:../internal '@voltagent/logger': specifier: 2.0.2