valta-python-sdk
Official Python SDK for Valta, AI agent financial infrastructure.
Give your AI agents their own wallets, spending policies, kill switches, and audit logs.
pip install valta-python-sdk
Quick Start
from valta import ValtaClient
valta = ValtaClient("sk_valta_live_your_api_key")
agent = valta.agents.create({
"name": "Portfolio Watcher",
"description": "Tracks portfolio activity",
"wallet": {
"initialBalance": 0,
"dailyLimit": 500,
},
})
valta.policies.create({
"agentId": agent["id"],
"dailyLimit": 500,
"monthlyLimit": 5000,
"maxPerTransaction": 100,
"requireApprovalAbove": 250,
})
wallet = valta.wallets.get(agent["id"])
print(wallet["balance"])
valta.agents.freeze(agent["id"])
logs = valta.audit.list({"agentId": agent["id"], "limit": 50})
Get an API Key
- Go to valta.co/dashboard
- Navigate to API Keys
- Create a new key
You can also log in from Python and let the client store the returned key.
from valta import ValtaClient
valta = ValtaClient()
session = valta.auth.login("you@example.com", "your-password")
print(session["token"])
Agents
agents = valta.agents.list({"page": 1, "limit": 20, "status": "active"})
agent = valta.agents.get("ag_abc123")
agent = valta.agents.create({
"name": "Treasury Monitor",
"description": "Monitors spend and liquidity",
})
agent = valta.agents.update("ag_abc123", {
"name": "Treasury Monitor",
"description": "Updated instructions",
})
valta.agents.freeze("ag_abc123")
valta.agents.unfreeze("ag_abc123")
run = valta.agents.run("ag_abc123", {
"task": "Review today spending",
"context": "USDC treasury account",
})
run = valta.agents.getRun("ag_abc123", "run_abc123")
runs = valta.agents.listRuns("ag_abc123", {"limit": 10, "status": "completed"})
valta.agents.delete("ag_abc123")
Wallets
wallet = valta.wallets.get("ag_abc123")
balance = valta.wallets.getBalance("ag_abc123")
deposit = valta.wallets.getDepositAddress("ag_abc123")
transactions = valta.wallets.listTransactions("ag_abc123", {
"limit": 20,
"type": "transfer",
})
transfer = valta.wallets.transfer({
"fromAgentId": "ag_abc123",
"toAgentId": "ag_def456",
"amount": 100,
"description": "Fund allocation",
})
Policies
policy = valta.policies.create({
"agentId": "ag_abc123",
"dailyLimit": 200,
"monthlyLimit": 2000,
"maxPerTransaction": 50,
"requireApprovalAbove": 100,
"blockedCategories": ["gambling"],
"allowedDomains": ["valta.co"],
"blockedDomains": ["example.com"],
})
policy = valta.policies.get("ag_abc123")
policy = valta.policies.update("ag_abc123", {
"dailyLimit": 500,
"maxPerTransaction": 100,
})
valta.policies.delete("ag_abc123")
Audit Trail
logs = valta.audit.list({
"agentId": "ag_abc123",
"from": "2026-01-01",
"to": "2026-01-31",
"page": 1,
"limit": 50,
})
entry = valta.audit.get("log_abc123")
all_entries = valta.audit.export({"agentId": "ag_abc123"})
verification = valta.audit.verify("ag_abc123")
print(verification["intact"])
API Keys
keys = valta.keys.list()
created = valta.keys.create({"name": "production"})
print(created["fullKey"])
valta.keys.revoke("key_abc123")
Sandbox
Sandbox mode is available with test API keys. Sandbox data is isolated from live data.
valta = ValtaClient("sk_valta_test_your_api_key")
deposit = valta.sandbox.deposit({
"amount": 1000,
"agent": "ag_abc123",
"idempotencyKey": "deposit-1",
})
result = valta.spend({
"agent": "ag_abc123",
"amount": 50,
"merchant": "Test API",
"category": "tools",
"purpose": "Sandbox purchase",
})
valta.sandbox.reset()
Configuration
valta = ValtaClient({
"apiKey": "sk_valta_live_your_api_key",
"baseUrl": "https://www.valta.co/api/v1",
})
The SDK sends Content-Type: application/json, X-Valta-SDK: 2.3.0, and x-api-key headers on authenticated requests.
Error Handling
from valta import AuthError, RateLimitError, TierError, ValtaClient
valta = ValtaClient("sk_valta_live_your_api_key")
try:
valta.agents.create({"name": "Agent"})
except TierError as err:
print(f"Upgrade required: {err.requiredTier}")
print(f"Upgrade at: {err.upgradeUrl}")
except AuthError:
print("Invalid API key")
except RateLimitError:
print("Slow down, rate limit hit")
| Error | Status | When |
|---|---|---|
AuthError |
401 | Invalid or missing API key |
TierError |
403 | Feature requires a higher tier |
RateLimitError |
429 | Too many requests |
NotFoundError |
404 | Agent or resource not found |
ValtaError |
5xx | Server error |
License
MIT, built by Valta
Metadata
Release files for valta-python-sdk 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 |
|---|---|---|---|---|
| valta_python_sdk-0.1.0.tar.gz | 12.1 kB | Without provenance | Details for valta_python_sdk-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| valta_python_sdk-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for valta_python_sdk-0.1.0-py3-none-any.whl |
Total release size: 23.2 kB
Release files / valta_python_sdk-0.1.0.tar.gz
| Download URL | valta_python_sdk-0.1.0.tar.gz |
|---|---|
| Size | 12.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
be989409ba7581e747ebeb0a9f3b0e444431780cb94d8e7ecf6b7ab284f60d5e
|
|
BLAKE2b-256 checksum How to use checksums |
134864bb41bde65333746ca48183ba7c889571974f80082e9b489df623aee6f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / valta_python_sdk-0.1.0-py3-none-any.whl
| Download URL | valta_python_sdk-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6a20e1b510d5694b45e146eee0f18e87e3d8d3b577b4e41923f40eccfbe956b4
|
|
BLAKE2b-256 checksum How to use checksums |
fdbedc19b215428fc9f646fcc01e0b1cc94dbabbe59f891a793109a3d032bec3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Security for valta-python-sdk 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.