VAP LangChain Tools
Execution control for LangChain agents calling paid APIs.
LangChain tools for VAP - the execution control layer. Enforce cost limits and deterministic retries when your chains generate video, music, and images.
Installation
pip install vap-langchain
Quick Start
from langchain.agents import initialize_agent, AgentType
from langchain_openai import ChatOpenAI
from vap_langchain import VapProductionTool
# Initialize tools
vap_tool = VapProductionTool(api_key="vap_your_api_key")
# Create agent
llm = ChatOpenAI(model="gpt-4")
agent = initialize_agent(
tools=[vap_tool],
llm=llm,
agent=AgentType.OPENAI_FUNCTIONS,
)
# Run
result = agent.run("Create an energetic startup launch video with upbeat music")
print(result)
Available Tools
| Tool | Description | Cost |
|---|---|---|
VapProductionTool |
Full production (video + music + thumbnail) | $5.90 |
VapVideoTool |
Single video | $1.96 |
VapMusicTool |
Single music track | $0.68 |
VapImageTool |
Single image | $0.18 |
Recommended: VapProductionTool
For most use cases, use VapProductionTool. It creates everything in one call:
from vap_langchain import VapProductionTool
tool = VapProductionTool(api_key="vap_...")
# Agent will automatically use this for any media request
result = tool.run("Cozy coffee shop morning scene with gentle acoustic vibes")
# Returns: Video URL, Music URL, Thumbnail URL
With LangGraph
from langgraph.graph import StateGraph
from vap_langchain import VapProductionTool
vap = VapProductionTool(api_key="vap_...")
def produce_media(state):
result = vap.run(state["prompt"])
return {"media": result}
# Add to your graph
graph.add_node("producer", produce_media)
Budget Safety
VAP uses a prepaid model - your agent can't overspend. The tool will return an error if balance is insufficient, preventing runaway costs.
Links
Metadata
Release files for vap-langchain 0.2.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 | |
|---|---|---|---|---|
| vap_langchain-0.2.1.tar.gz | 5.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vap_langchain-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.7 kB
Release files / vap_langchain-0.2.1.tar.gz
| Download URL | vap_langchain-0.2.1.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0456a4827a111d0d6bb9e6790b0613a1f4abd9b81594b43ba2a18daad2c0226d
|
|
BLAKE2b-256 checksum How to use checksums |
3611925d0a26d4ab40ddf9d85a885516f617a13d20a4eaab47e7672d88da4b9d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / vap_langchain-0.2.1-py3-none-any.whl
| Download URL | vap_langchain-0.2.1-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d0011a6979419cf2b8217ab392a2f2b3e4a3102cf355812592036b0f1a281af7
|
|
BLAKE2b-256 checksum How to use checksums |
6adeceeae3922e83d700dc8f98bedf6869b1bcd91c4328dff5bdd840dc82b9c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for vap-langchain 0.2.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.