You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Prompt memory budget indicators — show agents how full their context injection is #689
Hermes renders memory with a usage indicator: MEMORY (your personal notes) [67% — 1,474/2,200 chars]. This gives the agent a clear signal about how much budget remains, encouraging curation over accumulation.
Problem
Agents using BM notes in their prompts have no visibility into how much context they're consuming. This leads to:
Memory files growing unbounded until they cause problems
No pressure to curate — agents append but rarely prune
Surprise context window issues when notes get too large
Proposal
When BM notes are loaded into agent context (via MCP tools or context file injection), include a budget indicator:
Type: Feature Request — Enhancement to existing MCP tools Priority: Medium Component: MCP tools (build_context, search_notes, read_note, recent_activity) Complexity: Medium
No duplicates found. The related issue #686 (Progressive loading) is complementary as mentioned in the issue body.
Triage Notes
This is a well-scoped idea that addresses a real problem: agents have no visibility into how much context budget their BM notes are consuming, which leads to unbounded growth and surprise context window issues.
Codebase observations:
build_context already returns a footer with metadata: *N primary, M related | depth=D | project: P*
_format_context_markdown() in build_context.py is the natural place to add a char/token indicator for output_format="text"
The JSON response path (graph.model_dump()) could include a char_count or token_estimate field in the metadata
search_notes and read_note have similar response shaping points
Recommended approach (Option 2 from the issue — returned in tool responses):
Adding budget indicators directly to tool responses is the lowest-friction path. No new config required, no new tool required — just augment the existing footer/metadata in build_context, search_notes, read_note, and recent_activity text output with a char count and optional token estimate.
A configurable context_budget (Option 1) could be a follow-on: if set in config, the indicator becomes 3,200/8,000 chars (40%) — creating the explicit pressure to curate described in the issue.
For agent workflows, a context budget indicator would be most useful if it also identified:
what was loaded;
from which project;
at which detail level;
whether content was truncated;
whether the result came from search or exact read;
whether the budget applies to one tool response or the whole injected context.
A raw percentage alone may be misleading if several tools or memory surfaces contribute to the same prompt.
This feedback was prepared collaboratively by Semyon Poklad and the AI agent Lad. It is based on a small multi-agent family-research MVP and is offered as a user-side observation, not a claim about Basic Memory's internal architecture. The final text was reviewed and manually approved by Semyon before posting.
Activity
claude commentedon Mar 21, 2026
Claude finished @bm-clawd's task in 1m 18s —— View job
Issue Triage
Analysis
Type: Feature Request — Enhancement to existing MCP tools
Priority: Medium
Component: MCP tools (
build_context,search_notes,read_note,recent_activity)Complexity: Medium
No duplicates found. The related issue #686 (Progressive loading) is complementary as mentioned in the issue body.
Triage Notes
This is a well-scoped idea that addresses a real problem: agents have no visibility into how much context budget their BM notes are consuming, which leads to unbounded growth and surprise context window issues.
Codebase observations:
build_contextalready returns a footer with metadata:*N primary, M related | depth=D | project: P*_format_context_markdown()inbuild_context.pyis the natural place to add a char/token indicator foroutput_format="text"graph.model_dump()) could include achar_countortoken_estimatefield in the metadatasearch_notesandread_notehave similar response shaping pointsRecommended approach (Option 2 from the issue — returned in tool responses):
Adding budget indicators directly to tool responses is the lowest-friction path. No new config required, no new tool required — just augment the existing footer/metadata in
build_context,search_notes,read_note, andrecent_activitytext output with a char count and optional token estimate.Example for
build_contexttext output:A configurable
context_budget(Option 1) could be a follow-on: if set in config, the indicator becomes3,200/8,000 chars (40%)— creating the explicit pressure to curate described in the issue.Labels applied:
enhancementTeaShaman-cyber commentedon Aug 2, 2026
For agent workflows, a context budget indicator would be most useful if it also identified:
A raw percentage alone may be misleading if several tools or memory surfaces contribute to the same prompt.
This feedback was prepared collaboratively by Semyon Poklad and the AI agent Lad. It is based on a small multi-agent family-research MVP and is offered as a user-side observation, not a claim about Basic Memory's internal architecture. The final text was reviewed and manually approved by Semyon before posting.
phernandez commentedon Aug 11, 2026
this is a job for the harness. declining