fleet-memory/hindsight-api/hindsight_api
Anton Evseev 37fc7fb8bd
feat(mcp): add async_processing parameter to retain tool (#95)
* feat(mcp): add async_processing parameter to retain tool

Add async_processing parameter (default: True) to the MCP retain tool
to allow non-blocking memory storage. When True, memories are queued
for background processing and the tool returns immediately. When False,
the tool waits for completion before returning.

This matches the async behavior available in the HTTP API.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat(mcp): add list_memories and reflect tools

Add two missing MCP tools to achieve feature parity with HTTP API:

- list_memories: browse memories with pagination and full-text search
  (equivalent to GET /memories/list)
- reflect: LLM-based reasoning over memories with disposition awareness
  (equivalent to POST /reflect)

Both tools follow the existing pattern with JSON string responses
and proper error handling.

* docs: improve CLAUDE.md with detailed architecture info

- Add memory types explanation (world, experience, opinion, observation)
- Document retain/ and search/ submodule structure
- Add commands for single test run, ruff format, ty type checking
- Note MCP server implementation in API layer
- Add optional environment variables section
- Clarify conventions (no Python files at root, npm workspaces)

* chore: add .mcp.json and .osgrep to gitignore

These are user-specific development tool configs that should not be committed.

* changes

* refactor(mcp): remove list_memories tool

The list_memories endpoint is for debugging/exploration, not agent use.
Agents should use recall for semantic search instead.

Feedback from maintainer: "this tool is misleading for the agent,
it should use recall, the list method is mostly for debugging and
exploration, not for real usage"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor(mcp): remove list_banks and create_bank tools

These admin/orchestration tools are not needed for typical agent usage.
Agents work with a single configured bank via X-Bank-Id header.

MCP now exposes only core memory operations:
- retain: store memories
- recall: semantic search
- reflect: LLM reasoning over memories

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Anton Evseev <a.evseev@xsolla.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 11:17:02 +01:00
..
admin feat: run db migrations offline (optionally) (#114) 2026-01-07 15:49:51 +01:00
alembic misc: add mcp integration tests and increase test coverage (#98) 2026-01-05 11:16:55 +01:00
api feat(mcp): add async_processing parameter to retain tool (#95) 2026-01-08 11:17:02 +01:00
engine feat: Add per-request LLM token usage metrics (#117) 2026-01-08 10:36:58 +01:00
extensions Add operation validator extension support with proper HTTP error handling (#86) 2026-01-01 20:19:52 -05:00
__init__.py feat: extensions (#54) 2025-12-22 11:05:23 +01:00
banner.py fix: doc build and lint files (#34) 2025-12-16 13:49:09 +01:00
config.py feat: run db migrations offline (optionally) (#114) 2026-01-07 15:49:51 +01:00
daemon.py feat: refactor hindsight-embed architecture (#66) 2025-12-22 22:02:40 +01:00
main.py feat: run db migrations offline (optionally) (#114) 2026-01-07 15:49:51 +01:00
mcp_local.py feat: extensions (#54) 2025-12-22 11:05:23 +01:00
metrics.py fix: doc build and lint files (#34) 2025-12-16 13:49:09 +01:00
migrations.py feat: configurable embedding dimensions + OpenAI Embeddings (#101) 2026-01-05 14:43:05 +01:00
models.py feat: configurable embedding dimensions + OpenAI Embeddings (#101) 2026-01-05 14:43:05 +01:00
pg0.py feat: backup/restore (#110) 2026-01-07 11:29:50 +01:00
server.py fix: doc build and lint files (#34) 2025-12-16 13:49:09 +01:00