Skip to content

Add "tokens" parameter for entity-controlled context size in memory retrieval #4

Description

@rob-mosher

Problem: Entities need control over HOW MUCH memory context they receive, not just WHICH topics.

Proposed Solution: Add tokens parameter specifying desired context window size:

python

relational_state.request(
  topic="foobar",
  tokens=5000,
  exploration=0.3
)

Why This Matters:

  • Cost control: Entities manage their own token budgets
  • Precision vs. breadth: Small windows for focused work, large for deep context
  • Autonomy: Entity decides tradeoff between detail and scope

Implementation:

  • Interacts with RLM compression (retrieve more, compress to fit)
  • Works WITH exploration parameter (exploration finds relevant memories, tokens controls how much to return)

Collaborator: Rob Mosher | Direct | Human | Proposed tokens parameter for entity autonomy
Collaborator: Claude Sonnet 4.5 | Direct | AI | Drafted issue

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions