Skip to content

Add auto container tags feature#10

Open
ved015 wants to merge 1 commit into
mainfrom
feat/auto-container
Open

Add auto container tags feature#10
ved015 wants to merge 1 commit into
mainfrom
feat/auto-container

Conversation

@ved015
Copy link
Copy Markdown
Member

@ved015 ved015 commented May 15, 2026

Summary

  • Custom Memory Containers: Users can now organize memories into specific tags (e.g., code_preferences, personal, architecture) via a new --container flag in the save, search, and forget skills.

  • Dynamic Container Catalog: Available custom containers are now injected into the model's context, allowing the agent to proactively choose the right storage location.


The below image shows the save working with container tags the search working and in the userpomptsubmit hook container tags are visible

Screenshot 2026-05-15 at 12 20 26 PM Screenshot 2026-05-15 at 12 20 42 PM Screenshot 2026-05-15 at 12 26 58 PM

Copy link
Copy Markdown

@vorflux vorflux Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed for bugs.


Review with Vorflux

Comment thread src/hooks/recall.ts
additionalContextLength: additionalContext.length,
});
exitWithContext(additionalContext);
} else {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Container catalog is only injected when newFacts.length > 0. If recall returns zero new facts (all previously seen), the else branch emits empty context and the AI never learns about custom containers for that turn. Fix: inject the catalog independently of new facts.

Comment thread src/skills/save-memory.ts

const client = new SupermemoryClient();
const projectTag = getProjectTag(process.cwd());
const effectiveTag = containerTag || getProjectTag(process.cwd());
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No validation that containerTag matches a configured customContainers[].tag. A typo like --container wrk silently creates an orphaned space in Supermemory that wont appear in searches.

Comment thread src/services/capture.ts

const content = rawContent
.replace(/\[SUPERMEMORY CONTAINERS\][\s\S]*?\[END SUPERMEMORY CONTAINERS\]\s*/g, "")
.replace(/<supermemory-containers>[\s\S]*?<\/supermemory-containers>\s*/g, "")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This regex strips supermemory-containers XML tags but getContainerCatalog() only emits the [SUPERMEMORY CONTAINERS] bracket format. This XML variant doesnt exist anywhere in the codebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant