Metadata-Version: 2.4
Name: strands-stash-memory-manager
Version: 0.1.0
Summary: Stash memory manager for Strands Agents
Author: Stash
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/strands-agents/stash/tree/main/integrations/strands-memory-store
Project-URL: Documentation, https://github.com/strands-agents/stash/blob/main/docs/user/integrations/strands.md
Project-URL: Repository, https://github.com/strands-agents/stash
Project-URL: Issues, https://github.com/strands-agents/stash/issues
Keywords: strands,agents,memory,stash
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Typing :: Typed
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: mcp<3.0.0,>=1.23.0
Requires-Dist: strands-agents<2.0.0,>=1.55.1
Requires-Dist: typing-extensions<5.0.0,>=4.13.2
Provides-Extra: test
Requires-Dist: mypy<2.0,>=1.15; extra == "test"
Requires-Dist: pytest<10,>=9; extra == "test"
Dynamic: license-file

# Stash Strands memory manager for Python

`StrandsStash` gives a Strands agent a Stash mount. It is a `MemoryManager`
that builds the Stash memory store, puts the session context of the mount in
the system prompt, and turns off the search on each turn. `init_agent` runs
inside `Agent(...)`, so a mount that does not serve fails there.

```python
from stash_strands import StrandsStash
from strands import Agent

agent = Agent(
    memory_manager=StrandsStash(
        config_path="stash.toml",
        session_id="session-123",
        mount_name="team-memory",
    ),
)
```

- By default, the agent gets the tools of `stash mcp`. `agent.cleanup()` stops
  that client. Pass `mcp=False` to give the agent a shell instead, such as the
  vended Strands `shell`.
- Pass `exclude_tool_blocks=True` to write back the words of each turn only.
  `flush()` writes the turns that Strands has not sent yet.
- `Agent(...)` blocks its thread while the manager runs. In an event loop, use
  `await asyncio.to_thread(lambda: Agent(...))`.

The [user guide](https://github.com/strands-agents/stash/blob/main/docs/user/integrations/strands.md)
has the config, the install, and each option. The
[integration README](https://github.com/strands-agents/stash/blob/main/integrations/strands-memory-store/README.md)
says how the manager works, and how to run the tests.
