langchain-valta
Hard spending limits for LangChain agents. Enforces budget policies before any paid operation fires.
Install
pip install langchain-valta
Quickstart
from langchain_valta import ValtaBudgetTool
from langchain_openai import ChatOpenAI
from langchain.agents import initialize_agent, AgentType
guard = ValtaBudgetTool(
api_key="vk_live_...", # from valta.co/dashboard/api-keys
agent_id="my-agent",
)
agent = initialize_agent(
tools=[guard, ...your_other_tools],
llm=ChatOpenAI(model="gpt-4o"),
agent=AgentType.OPENAI_FUNCTIONS,
agent_kwargs={
"system_message": (
"Before any paid operation, call check_spend with the estimated cost. "
"Only proceed if the result is 'approved'."
)
},
)
How it works
The agent calls check_spend before any paid operation. Valta evaluates the request against the user's policy and returns approved or denied: <reason> before the charge fires.
| Response | Meaning |
|---|---|
approved |
Spend is within policy — proceed |
denied: daily_limit_exceeded |
Would exceed daily budget |
denied: insufficient_balance |
Wallet balance too low |
denied: requires human approval |
Above approval threshold — check dashboard |
Policy management
Set limits at valta.co/dashboard/policies. Changes take effect immediately — no redeploy needed.
Links
Metadata
Release files for langchain-valta 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 |
|---|---|---|---|---|
| langchain_valta-0.1.1.tar.gz | 4.5 kB | Without provenance | Details for langchain_valta-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langchain_valta-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for langchain_valta-0.1.1-py3-none-any.whl |
Total release size: 9.4 kB
Release files / langchain_valta-0.1.1.tar.gz
| Download URL | langchain_valta-0.1.1.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4c15b23a1a07c3fba1cdf58a787de5ae8a3abf63b125020af99bf674b00d3ab3
|
|
BLAKE2b-256 checksum How to use checksums |
0ee1b8d083d9e154621c1b63e03e9c7bcabc1c98b9c5aaa6d214b36e93b249b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / langchain_valta-0.1.1-py3-none-any.whl
| Download URL | langchain_valta-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8f1178ce65e7108c6f7d05b0132dfe3c8b00ad1d4adf47202a59fd899734de09
|
|
BLAKE2b-256 checksum How to use checksums |
38ca0aef0aaa66c58c52d65370ce8a24f128bc188cf6c2efd4f2b895f0b600b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Security for langchain-valta 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.