strands-harny
Harny gives every customer of your app their own AI agent, one that knows that customer and acts for them. This package brings the part that knows each customer to Strands agents: long-term memory that keeps up when facts change.
Install
pip install strands-harny
Python 3.10+. Needs strands-agents>=1.66.0.
Start without a key
You do not need an account first. From the project folder:
pip install harny
harny init --name "<business>" --about "<what the app does>" --customers "<who its customers are>"
That creates the app and saves HARNY_API_KEY to .env without printing it. Never print, log or commit the key. (Raw API route: POST https://api.harny.ai/v1/auth/provision with {"app_name": "<business>"}; the key is shown once.)
Usage
from strands import Agent
from strands.memory import MemoryManager
from strands_harny import HarnyMemoryStore
store = HarnyMemoryStore(user="nadia") # reads HARNY_API_KEY; "nadia" is YOUR id for the person
agent = Agent(memory_manager=MemoryManager(stores=[store]))
agent("What is the Acme pilot budget?")
user is your own id for the person. The API reads only that person's memory, so one app key can serve every user safely.
Options
| Argument | Default | Meaning |
|---|---|---|
user |
required | Your id for the person |
api_key |
HARNY_API_KEY |
App key (fsa_) |
base_url |
https://api.harny.ai |
Harny API address |
level |
medium |
How much evidence to recall (low, medium, high, extra-high) |
name, description, max_search_results, writable, extraction |
see Strands | The standard MemoryStoreConfig fields |
Behaviour an agent should know
- Save what the person says. Set
extraction=Trueand later runs recall it; only the person's own messages are sent, never the model's replies or system text. It is off by default. - A saved fact has a stable id (hash of the person and the words), so saying the same words twice is one fact and costs nothing the second time.
- A memory problem never fails the run. If recall is refused, the agent answers without memory and one warning with the error code is logged (never content, never keys).
Tests
pip install -e ".[dev]"
pytest
The tests make no network call and no paid call.
Apache-2.0. https://harny.ai
Metadata
Release files for strands-harny 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| strands_harny-0.1.0.tar.gz | 10.7 kB | Without provenance | Details for strands_harny-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| strands_harny-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for strands_harny-0.1.0-py3-none-any.whl |
Total release size: 20.3 kB
Release files / strands_harny-0.1.0.tar.gz
| Download URL | strands_harny-0.1.0.tar.gz |
|---|---|
| Size | 10.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
870d2b93e34575ad676545625fb3874509df241077aec2aff24dc81b9ee59fb8
|
|
BLAKE2b-256 checksum How to use checksums |
76a85890640cf53abce25605ce810d4437453ce9ef81d3587c9afc2bc9e91e40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|
Release files / strands_harny-0.1.0-py3-none-any.whl
| Download URL | strands_harny-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4f375a19b00fb50650f929b0b28cad17ad93711770688dd591e584befb1702fa
|
|
BLAKE2b-256 checksum How to use checksums |
2d9bb4988fc1db7c64d6e5332580868d77fa854327b3eabf08649da5ec098d98
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|
Security for strands-harny 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.