once-agent-sdk
Execution safety for consequential AI agent tool calls.
Once helps applications avoid blindly repeating real-world side effects after ambiguous outcomes such as timeouts, crashes, lost responses, queue redelivery, or agent retries.
Examples include refunds, payments, payouts, bookings, orders, provisioning, deployments, API mutations, and other operations that change external state.
Install
pip install once-agent-sdk
Quick start
from once_agent import Once
once = Once()
order_id = "order_123"
operation_id = Once.id("refund", order_id)
result = once.execute(
operation_id=operation_id,
provider="my-provider",
action={
"type": "refund",
"order_id": order_id,
},
)
Set your Once API key in the environment:
ONCE_API_KEY=your_api_key
Do not commit API keys to source control.
Why stable operation identity matters
If an external action succeeds but its response is lost, retrying the action without knowing the prior outcome can duplicate the real-world side effect.
Once.id(...) generates a deterministic operation ID, so retries of the same logical operation can retain the same identity.
a = Once.id("refund", "order_123")
b = Once.id("refund", "order_123")
assert a == b
Claim boundary
Once does not claim universal exactly-once execution.
Execution safety depends on stable operation identity, durable Once state, the provider integration, and sufficiently authoritative provider truth. When an outcome cannot be established safely, Once can preserve uncertainty instead of blindly repeating the external action.
Links
- Website: https://onceexec.com/
- GitHub: https://github.com/stringsofthemind-oss/once
- Agent guide: https://onceexec.com/agent.md
- MCP package: https://www.npmjs.com/package/@once-agent/mcp
Metadata
Release files for once-agent-sdk 0.1.1
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 |
|---|---|---|---|---|
| once_agent_sdk-0.1.1.tar.gz | 17.1 kB | Without provenance | Details for once_agent_sdk-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| once_agent_sdk-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for once_agent_sdk-0.1.1-py3-none-any.whl |
Total release size: 29.3 kB
Release files / once_agent_sdk-0.1.1.tar.gz
| Download URL | once_agent_sdk-0.1.1.tar.gz |
|---|---|
| Size | 17.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8fb2b092f0560c6926b9e2a5b9bb212b7f4bcc5712f9417150b3778f7f5d7b80
|
|
BLAKE2b-256 checksum How to use checksums |
b1341c8054e84a0ca38506ec56a140f3cd09b3e8a410591cc2ff4ec1c193a018
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Release files / once_agent_sdk-0.1.1-py3-none-any.whl
| Download URL | once_agent_sdk-0.1.1-py3-none-any.whl |
|---|---|
| Size | 12.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5328a55b6da4cee3579d9dc22832c9622e0d97162eb74980fc2f2deb18eeef06
|
|
BLAKE2b-256 checksum How to use checksums |
39bedad5c2f7067e753227393a10c9c30194c4e6c3cff667e6af24e8e5c55bac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Security for once-agent-sdk 0.1.1
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.