mowa
Load your Mowa agents at runtime. Edit the prompt in Mowa, ship it without a deploy.
Install
pip install mowa
pip install "mowa[httpx]"
No required deps. Uses httpx if it's installed, else the standard library.
Use
from openai import OpenAI
from mowa import Mowa
mowa = Mowa()
openai = OpenAI()
agent = mowa.get_agent(
"support",
fallback={"system_prompt": "You are a helpful support agent.", "model": "gpt-4o-mini"},
)
reply = openai.chat.completions.create(
model=agent.model,
messages=[
{"role": "system", "content": agent.system_prompt},
{"role": "user", "content": "Where is my order?"},
],
temperature=agent.settings.get("temperature"),
)
Mowa() reads MOWA_API_KEY and MOWA_BASE_URL from the environment. You can also pass api_key, base_url, cache_ttl (default 60s) and timeout (default 2s).
Versions
mowa.get_agent("support")
mowa.get_agent("support", version="draft")
mowa.get_agent("support", version=3)
Caching and fallback
- First call fetches the agent and keeps it in memory.
- For the next
cache_ttlseconds you get the cached copy. No network. - After that you still get the cached copy right away, and it refreshes in the background.
- If the first fetch fails and you passed a
fallback, you get the fallback. It never raises. - With no fallback, it raises
MowaError.
agent.source tells you where it came from: network, cache, stale or fallback.
Warm the cache at startup with mowa.prefetch(["support", "billing"]). Reset it with mowa.clear_cache().
Traces
span.set_attributes(agent.trace_attributes())
Gives {"mowa.agent": "support", "mowa.version": "v3"}, so traces link back to the version that ran.
Raw HTTP
curl https://mowa.dev/api/v1/agents/support/live -H "x-api-key: $MOWA_API_KEY"
Add ?version=draft or ?version=v3. Send If-None-Match with the ETag to get a 304 when nothing changed.
Metadata
Release files for mowa 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 |
|---|---|---|---|---|
| mowa-0.1.0.tar.gz | 7.7 kB | Without provenance | Details for mowa-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mowa-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for mowa-0.1.0-py3-none-any.whl |
Total release size: 13.5 kB
Release files / mowa-0.1.0.tar.gz
| Download URL | mowa-0.1.0.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f6a8b9cec6d49ca02cea7c6222d46786c64701f1b5881d2acdc8ed30056b079a
|
|
BLAKE2b-256 checksum How to use checksums |
7d45b9636fb2e833c4b7febda67451c593292008689358834e77ee915c24fdb3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Release files / mowa-0.1.0-py3-none-any.whl
| Download URL | mowa-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
acc7f30f7f92c50daf9b2b86938ba820d659b3f65b94a5931d5813ef7c574ca3
|
|
BLAKE2b-256 checksum How to use checksums |
5c41b5080f2d7653ec3250e103e40027b2ab9c35ecb66fd6b3ffb400912a8606
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Security for mowa 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.