Valta Docs
Python SDK
Installation
pip install valta-python-sdk
Requirements: Python 3.9+
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})
Note the SDK takes plain dicts for request bodies (mirroring the REST API directly), not Python-style keyword arguments — this keeps it a thin, predictable wrapper rather than a reinterpretation of the API.
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"})
valta.agents.freeze("ag_abc123")
valta.agents.unfreeze("ag_abc123")
run = valta.agents.run("ag_abc123", {"task": "Review today's 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"],
})
policy = valta.policies.get("ag_abc123")
policy = valta.policies.update("ag_abc123", {"dailyLimit": 500, "maxPerTransaction": 100})
valta.policies.delete("ag_abc123")
allowedDomains/blockedDomains are not yet enforced by the API and are intentionally omitted here — passing them today would silently do nothing.
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 works with test API keys — sandbox data is fully 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",
})
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}")
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 |
LangChain, CrewAI, OpenAI Agents SDK
The Python SDK doesn't yet include first-class framework wrappers (e.g. a pre-built LangChain tool class) — that's a real, separate piece of future work. In the meantime, the framework guides already give you a working integration built directly on the REST API: LangChain, CrewAI, OpenAI Agents SDK.