feat(core): Cache agent knowledge sandboxes with lazy file materialization#31866
Draft
bjorger wants to merge 23 commits into
Draft
feat(core): Cache agent knowledge sandboxes with lazy file materialization#31866bjorger wants to merge 23 commits into
bjorger wants to merge 23 commits into
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Performance ComparisonComparing current → latest master → 14-day baseline loads S-tier workflow @tier:S
docker-stats
Idle baseline · instance-ai
Idle baseline · agents
Idle baseline · memory
How to read this table
|
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Remove the knowledge-base module gate so file management and search_knowledge are always available while keeping node tools opt-in. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Grind results — pre-merge flake detection (N=50)
Spawn-per-iteration mode. Catches post-teardown async flakes that |
Stage the CSV runner at the Daytona bake root and harden sandbox knowledge-base coverage around streaming, materialization, command routing, and gate removal. Co-authored-by: Cursor <cursoragent@cursor.com>
Use unique knowledge sandbox names and rely on the configured image instead of baking a per-run image, avoiding stale failed sandbox reuse and Daytona build failures. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Key cached workspaces by the full knowledge corpus instead of selected files, materialize all files once while scoping search/read commands, and best-effort invalidate caches on upload, delete, and agent removal. Align Daytona sandbox naming with Instance AI via N8N_AGENTS_AI_SANDBOX_NAME_PREFIX.
Reuse per-agent knowledge sandboxes while materializing only the files required for each operation so scoped reads/searches avoid full-corpus churn. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep focused lazy-materialization coverage while removing redundant scenario tests from the agent knowledge sandbox suite. Co-authored-by: Cursor <cursoragent@cursor.com>
Remove unused compatibility wrappers and manifest metadata now that sandbox freshness is resolved per file. Co-authored-by: Cursor <cursoragent@cursor.com>
Wrap subarray results in Buffer.from() so chunk writes pass ESLint's no-unsafe-argument rule. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Serialize workspace invalidation behind active sandbox operations, use configured sandbox command timeouts, and narrow materialization types to remove placeholder metadata. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
How to test
To enable the Knowledgebase / Sandboxing add those variables to your .env
Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/AGENT-240/feature-agents-kb-sandbox-integration
Review / Merge checklist
Backport to Beta,Backport to Stable, orBackport to v1(if the PR is an urgent fix that needs to be backported)