This release is a pre-release and may not be stable for production use.
openmates
Your agentic operating system for everyday tasks, learning & work. With user interests & privacy first.
Python SDK for OpenMates: run app skills, create encrypted chats, inspect usage, and automate everyday OpenMates tasks from Python.
Install
pip install openmates
Install the latest prerelease from the dev channel:
pip install --pre --upgrade openmates
Quick Start
Try eligible requests without an account or API key while the shared free
allowance is available. If OPENMATES_API_KEY is configured, the same constructor
automatically uses your account.
Run your first request:
from openmates import OpenMates
om = OpenMates()
result = om.apps.web.search({
"requests": [{"query": "OpenMates SDK examples"}],
})
print(result)
SDK methods authenticate lazily. You do not need to call connect().
New SDK devices may need approval in Settings > Developers > Devices before they can access encrypted account data.
Try without an account
Without an explicit or environment API key, app skills and chats.send() use the
shared free allowance:
from openmates import OpenMates, OpenMatesSignupRequiredError
om = OpenMates()
try:
response = om.chats.send("Explain how a rainbow forms.")
print(response.content)
except OpenMatesSignupRequiredError as error:
print(error) # Free allowance used or unavailable; create an account to continue.
print(om.anonymous.status())
No identity setup is needed. Free usage is limited by public IP and a shared
daily, weekly, and monthly service allowance; people on the same network may
share the IP limit. Status is informational: each operation's actual allowance
is checked by the server.
Anonymous chats send plaintext for processing without saving an account transcript.
For follow-up turns, pass a history list with role, content, and optional integer
created_at fields. Account storage, Projects, Teams, memories, connected accounts,
focus modes, goals, and model overrides require authenticated APIs. Anonymous AI
requests use chats.send(); apps.ai.ask() directs callers there.
For account access, create a key in Settings > Developers > API Keys with the
scopes and credit limit your script needs, then set OPENMATES_API_KEY.
Authentication failures and credit exhaustion never switch to the free allowance.
For advanced free-only use, anonymous=True ignores an environment key; combining
it with an explicit key raises OpenMatesConfigError.
Experimental image decisions
apps.ai.decide supports Jev 1.14 judgments over inline PNG/JPEG images:
import base64
import uuid
from pathlib import Path
from openmates import OpenMates
om = OpenMates()
ref = str(uuid.uuid4())
result = om.apps.ai.decide({
"state": {"board": ref},
"questions": {
"clear": {"type": "noul", "instructions": "Is the path to the exit clear?"}
},
"assets": {
ref: {
"type": "image", "format": "png",
"data_base64": base64.b64encode(Path("board.png").read_bytes()).decode("ascii")
}
}
})
print(result["data"]["answers"])
Each image needs a canonical lowercase UUID key referenced in a string value in
state, instructions, or criteria. OpenMates validates up to four still images,
1 MiB decoded per image and 4 MiB total, with both dimensions 280–1568 pixels.
State/questions remain limited to 16 KiB; the complete JSON body is limited to
6 MiB. Use jpg or jpeg for JPEG bytes.
This prototype feature uses direct TypeSafe only, without OpenRouter fallback.
Image tokens use the same applicable free allowance or account credits. Callers
need no provider key or image header. This path does not fetch remote images or
create stored uploads; the separate account upload flow still needs signup.
Handle OpenMatesSignupRequiredError and provider failures as for text requests.
See REST image decisions.
Common Examples
Send a private chat message
By default, chats.send() creates a non-persistent chat. It does not save the
transcript to your OpenMates account.
response = om.chats.send("Summarize this release note draft.")
print(response.content)
Save the chat explicitly when you want it in your account history:
response = om.chats.send(
"Draft a checklist for launching our beta.",
save_to_account=True,
)
List and load encrypted chats
latest_chats = om.chats.list(limit=10)
chat = om.chats.load(latest_chats[0]["id"])
print(chat["chat"].get("title"))
Pass limit=0 only when you intentionally want all account chats.
Search the web
search = om.apps.web.search({
"requests": [
{"query": "privacy-first AI assistants", "count": 5},
],
})
Read a web page
page = om.apps.web.read({
"url": "https://openmates.org/docs/user-guide/developers/sdk",
})
Search OpenMates docs
docs = om.docs.search("API keys")
Check billing and usage
overview = om.billing.overview()
invoices = om.billing.invoices()
Work with memories
memory_types = om.memories.types()
saved_memories = om.memories.list(app_id="web")
Create reminders
reminder = om.reminders.create({
"title": "Review OpenMates SDK usage",
"due_at": "2026-07-10T09:00:00Z",
})
SDK Areas
| Namespace | Purpose |
|---|---|
om.apps.* |
Generated app-skill methods such as web.search, web.read, images.generate, pdf.search, and more. |
om.chats.* |
Encrypted chat list/load/send/export/share/delete helpers. |
om.docs.* |
Search OpenMates documentation. |
om.billing.* |
Usage overview, invoices, and billing metadata. |
om.account.* |
Account info, interests, storage, export helpers. |
om.memories.* |
List, create, update, and delete encrypted memory entries when your API key has memory scopes. |
om.reminders.* |
Create, list, and manage reminders. |
om.connected_accounts.* |
Import connected-account data with explicit user approval flows. |
om.embeds.* |
Inspect and share embed data when available to the API key. |
om.settings.* |
Update supported account settings such as language, theme, model defaults, and chat auto-delete. |
Generated app-skill methods follow the app and skill names from OpenMates. For
example, the web search skill is om.apps.web.search(...) and PDF search is
om.apps.pdf.search(...).
API Keys and Scopes
API keys are bearer credentials. Treat them like passwords.
- Store keys in environment variables or a secret manager.
- Do not commit keys to source control.
- Use the narrowest scopes and credit limits your script needs.
- New SDK devices may require approval before they can access encrypted account data.
Common scopes include:
| Scope | Allows |
|---|---|
chat:create_incognito |
Non-persistent SDK chats. |
chat:create_saved |
Saved account chats. |
chat:read_existing |
Listing and loading existing encrypted chats. |
chat:append_existing |
Adding messages to existing saved chats. |
chat:share |
Creating share links. |
memory:read |
Reading memory entries selected by the SDK caller. |
App-skill scopes can allow all apps, a specific app, or a specific skill such as
web:search.
Error Handling
from openmates import OpenMates, OpenMatesApiError, OpenMatesConfigError
try:
om = OpenMates()
print(om.billing.overview())
except OpenMatesConfigError as error:
print(f"Configuration error: {error}")
except OpenMatesApiError as error:
print(f"API error {error.status_code}: {error.data}")
The SDK raises:
OpenMatesConfigErrorfor missing API keys or local key-unwrapping problems.OpenMatesSignupRequiredError(anOpenMatesApiErrorsubclass) when the free allowance is exhausted or unavailable; exposessignup_required,code, andreason.OpenMatesApiErrorfor API responses such as expired keys, unapproved devices, missing scopes, or exceeded credit limits.
Export a calendar event
from pathlib import Path
from openmates import build_calendar_event_file
# Use the decrypted content of a finished calendar_event embed.
calendar_file = build_calendar_event_file(embed_id, content)
if calendar_file is not None:
Path("event.ics").write_bytes(calendar_file.encode("utf-8"))
The local serializer exports only the primary event. It validates dates and timezones and preserves an unknown end time without inventing a duration. Context events are for display only. No calendar account or network call is required.
Versioning
OpenMates shows the short product line, for example v0.29, in the web app.
Python package artifacts use exact release-line versions:
0.29.0aNis an alpha prerelease from thedevbranch.0.29.0is a stable release frommain.
Install stable releases with pip install openmates. Install prereleases with
pip install --pre openmates.
More Documentation
Metadata
Release files for openmates 0.29.0a1
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 |
|---|---|---|---|---|
| openmates-0.29.0a1.tar.gz | 199.5 kB | With provenance | Details for openmates-0.29.0a1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| openmates-0.29.0a1-py3-none-any.whl | Python 3 | none | any | Details for openmates-0.29.0a1-py3-none-any.whl |
Total release size: 346.9 kB
Release files / openmates-0.29.0a1.tar.gz
| Download URL | openmates-0.29.0a1.tar.gz |
|---|---|
| Size | 199.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
84cfafff6cb663707300dc8bfc01b615d7256b2c1d61e831b83c84961fd6e2c1
|
|
BLAKE2b-256 checksum How to use checksums |
2ae7a1a91a933add576d9cd8b267f0e28178256acf17a0b1489932314c4c79f7
|
| 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 Oct 28, 2026.
Transparency logRelease files / openmates-0.29.0a1-py3-none-any.whl
| Download URL | openmates-0.29.0a1-py3-none-any.whl |
|---|---|
| Size | 147.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
54ebae24c71e5ea30be5717e92961df941c8e4da767cdf8cad60d623c861c22e
|
|
BLAKE2b-256 checksum How to use checksums |
a0026be79d10ee5dc7eb86df648c2970b48923926b0ffaf780a7689da04a8997
|
| 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 Oct 28, 2026.
Transparency logSecurity for openmates 0.29.0a1
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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for openmates-0.29.0a1.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 Oct 28, 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.