Skip to content

[pi-extension] Turn Storage & Multi-Agent Support #35

Description

@codenamekt

Overview

Improve turn storage and support multi-agent memory sharing.

Issues to Address

  • Turns stored unbounded — add TTL per session (configurable, default 30 days) + background session pruning job
  • Turns not associated with project — allow project_id on append_turn for scoped recall
  • No turn summarization — add hexus_summarize-turns tool to condense old turns into a single memory entry
  • Agent identity is single-namespace — support hexus_recall with agent_identity: ["pi", "hermes"] for cross-agent memory search

API Changes Needed

# append_turn additions
POST /api/append-turn
{
  "session_id": "...",\n  "role": "assistant",\n  "content": "...",\n  "agent_identity": "pi",        # existing
  "project_id": "project-x",    # NEW
  "ttl_days": 30                 # NEW, optional override\n}

# recall additions
POST /api/recall
{
  "query": "...",\n  "top_k": 5,
  "agent_identity": ["pi", "hermes"],  # NEW: can be list for cross-agent
  "project_id": "project-x"             # NEW: scope to project
}

Acceptance Criteria

  • Turns auto-expire after TTL (30 days default)
  • Pruning job endpoint: POST /api/prune-sessions
  • hexus_summarize-turns tool condenses session turns into a memory entry
  • agent_identity accepts array, returns memories from all specified agents
  • project_id scopes recall and storage to a project

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpi-extensionIssues related to the pi-extension integration

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions