Conversation
🦋 Changeset detectedLatest commit: 63ac075 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📝 WalkthroughWalkthroughAdds VoltAgent-level default memory support: a shared Changes
Sequence Diagram(s)sequenceDiagram
participant App as Application
participant VA as VoltAgent
participant Reg as AgentRegistry
participant Agent as Agent
participant MM as MemoryManager
App->>VA: new VoltAgent({ memory?, agentMemory?, workflowMemory? })
VA->>Reg: setGlobalMemory(memory)
VA->>Reg: setGlobalAgentMemory(agentMemory)
VA->>Reg: setGlobalWorkflowMemory(workflowMemory)
App->>VA: registerAgent(agent)
VA->>VA: applyDefaultMemoryToAgent(agent)
VA->>Agent: __setDefaultMemory(defaultAgentMemory)
Agent->>Reg: getGlobalAgentMemory()
Reg-->>Agent: globalAgentMemory or globalMemory or undefined
Agent->>MM: new MemoryManager(resolvedMemory)
sequenceDiagram
participant App as Application
participant VA as VoltAgent
participant Workflow as Workflow
participant Reg as AgentRegistry
App->>VA: registerWorkflow(workflow)
VA->>VA: applyDefaultMemoryToWorkflow(workflow)
VA->>Workflow: __setDefaultMemory(defaultWorkflowMemory)
Workflow->>Reg: getGlobalWorkflowMemory()
Reg-->>Workflow: globalWorkflowMemory or globalMemory or undefined
Note over Workflow: executionMemory = workflow.memory || default chain
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Comment |
This comment has been minimized.
This comment has been minimized.
Deploying voltagent with
|
| Latest commit: |
63ac075
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d353bf6f.voltagent.pages.dev |
| Branch Preview URL: | https://feat-add-default-memory.voltagent.pages.dev |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@packages/core/src/agent/agent.spec.ts`:
- Around line 1182-1188: Add a beforeEach to the "Global Memory Defaults" suite
that mirrors the existing afterEach reset so the suite is order-independent:
call AgentRegistry.getInstance() and invoke setGlobalAgentMemory(undefined),
setGlobalWorkflowMemory(undefined), and setGlobalMemory(undefined) in beforeEach
(matching the afterEach) to ensure any prior tests' global defaults are cleared
before each test runs.
PR Checklist
Please check if your PR fulfills the following requirements:
Bugs / Features
What is the current behavior?
What is the new behavior?
fixes (issue)
Notes for reviewers
Summary by cubic
Adds VoltAgent-level default memory so agents and workflows can inherit shared Memory without configuring it on each instance. This makes setup simpler while preserving per-agent/workflow overrides.
Written for commit 63ac075. Summary will update on new commits.
Summary by CodeRabbit
New Features
Documentation
Tests
✏️ Tip: You can customize this high-level summary in your review settings.