Dusha
Dusha (Rus: душа, [dʊˈʂa], "soul") is a lightweight python API that:
- stores messages, memories, affect state, anything you want
- injects those contexts at every LLM call (any provider is supported)
- has an extensible MCP and CLI to let you add any tools.
Because it's just a hackable python API, you can do literally anything. Including:
- hop between harnesses and get the same soul on the other side
- write your own emotion system
- call weather API and feed it to the model real-time (so they know it's raining outside)
- feed them your browser history
- let your companion play music on any device through built-in
relayplugin - integrate an external memory provider like Supermemory and add tools to Dusha MCP
Quickstart
uv tool install dusha # docker image available. See below
dusha companion add <name> --serve # Also you can use --proxy for proxy setup, or without flags for generating both
dusha serve <name>
Then on the same or another device, run:
$ dusha companion add <name> --proxy
Companion <name> isn't connected to a server yet.
? Connect to: (Use arrow keys)
The server on this machine (http://127.0.0.1:8765)
» Another server
? Server URL http://100.145.95.87:8765
? Server token, empty for none **********
Success!
Connected to http://100.145.95.87:8765.
Saved ~/.config/dusha/<name>/config.json.
Add a custom provider:
$ dusha provider <name>
? Providers for <name> (Use arrow keys)
» Add a provider
List providers
? Provider (Use arrow keys, type to filter)
» 302.AI (302ai)
Abacus (abacus)
abliteration.ai (abliteration-ai)
above.dev (above)
AgentRouter (agentrouter)
Agnes AI (agnes)
...
Success!
New provider 302ai added to <name> at http://127.0.0.1:8766/302ai.
Restart dusha proxy <name> and dusha serve <name> to use it.
$ dusha proxy <name>
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:8766 (Press CTRL+C to quit)
Now in your harness or app, point your endpoint at the URL dusha provider gave you: in this case, http://127.0.0.1:8766/302ai and you're good to go. Now every request routes through dusha proxy.
Optionally (highly recommended), add MCP.
Docker (and Podman)
Prefer a container? The image is ghcr.io/somme4096/dusha. We have compose at home:
mkdir dusha && cd dusha
curl -O https://raw.githubusercontent.com/Somme4096/dusha/main/deploy/compose.yaml
touch .env # Put EMBEDDING_API_KEY=... here if you use one.
docker compose up -d # podman and podman-compose also works.
Detail in Deployment.
How it works
user message → dusha proxy → injects context → routed to upstream model → reply → (harness, dusha).
Dusha adds context "after" each message so cache can hit.
How do messages, memory, affect, and identity work in stock dusha?
- Messages: Basic SQLite FTS5 plus optional embedding search. A plugin can do everything you can imagine if that's not enough.
- Evergreen: Long-term facts that you edit from the CLI and your companion edits through integration tools. No automatic extraction.
- Think of it as a
USER.mdbut with proper lifecycle management and duplication prevention.
- Think of it as a
- Affect: A deterministic emotion engine that uses values like
{"anger": 0.35}and shifts over time, including when the user goes unresponsive. Of course, you can make your own!- Message intent analysis can also be an external plugin. drop the system_one plugin or any other classifier plugin into the plugins directory, and its
decidelistener picks which emotion each user message should provoke.
- Message intent analysis can also be an external plugin. drop the system_one plugin or any other classifier plugin into the plugins directory, and its
- Identity:
identity.md, or custom name.
Plugin
Everything is a plugin in dusha! Identity, memory, evergreen, memo, affect, and proactive are built in that you can alter/disable.
See Plugin for list of built-in plugins and how to build your own plugin. If you like, you can also take a look at dusha-plugin-collections which contain dusha plugins I use daily.
See Also
- docs/configuration.md: JSON settings, identity and prompt files.
- docs/guide.md: service setup, auth and network, backup, and troubleshooting.
- docs/api.md: HTTP endpoints, the proxy, and MCP.
- docs/plugins.md: the built-in plugins, their commands and tools, and the Plugin API.
- dusha-plugin-collections: My daily-driving dusha plugins. Useful as reference implementation.
Versioning
With version 1.0.21, dusha entered 5:Stable/Production on PyPI. I will avoid breaking changes in minor and patch releases and deprecate features before removing them.
Note that dusha's version always ends in .21. Every release bumps only the numbers in front of it (0.0.21 → 0.1.21 → 1.0.21).
Why?
The weight of soul is said to be 21 grams. Dusha is a software with a soul, and I hope it stays that way forever.
Acknowledgement
Sincere gratitude to:
Metadata
Release files for dusha 1.5.21
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 |
|---|---|---|---|---|
| dusha-1.5.21.tar.gz | 118.8 kB | With provenance | Details for dusha-1.5.21.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dusha-1.5.21-py3-none-any.whl | Python 3 | none | any | Details for dusha-1.5.21-py3-none-any.whl |
Total release size: 226.5 kB
Release files / dusha-1.5.21.tar.gz
| Download URL | dusha-1.5.21.tar.gz |
|---|---|
| Size | 118.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
27e14ac16447c8355c8f3c22b8aec00b885caa3d336ec53d3608bfaf420084fb
|
|
BLAKE2b-256 checksum How to use checksums |
386bb8cce84da8d910472a07b3a32011b6391aa10e460dedcbb625df8d4922f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.
Transparency logRelease files / dusha-1.5.21-py3-none-any.whl
| Download URL | dusha-1.5.21-py3-none-any.whl |
|---|---|
| Size | 107.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
974ed29167d234f9f19c3c98b1a4a0ba8cffbe36fab239c4e51f5568f11b5c52
|
|
BLAKE2b-256 checksum How to use checksums |
6fce2ffd57b40ee9416a0b18a98f156293bfe3f9916d00a9a9f0d6b6a131b6a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.
Transparency logSecurity for dusha 1.5.21
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for dusha-1.5.21.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.
Transparency logA 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.