langchain-jarvisclaw
LangChain integration for JarvisClaw AI API — 280+ models, pay-per-request with USDC via x402.
Install
pip install langchain-jarvisclaw
Wallet mode requires 0.1.1 or later. In 0.1.0, passing
wallet_private_keyraisedImportError— it imported a name the jarvisclaw SDK does not export, so the x402 path never ran. API-key mode was unaffected. If you are pinned to 0.1.0 and using a wallet, upgrade.
Usage
Mode 1: API Key (pre-paid balance)
from langchain_jarvisclaw import ChatJarvisClaw
chat = ChatJarvisClaw(api_key="sk-...", model="gpt-5.4")
response = chat.invoke("Explain quantum computing in one sentence")
print(response.content)
Mode 2: x402 Wallet Payment (no account needed)
Pay per request with USDC on Base. No signup, no API key — just a wallet.
from langchain_jarvisclaw import ChatJarvisClaw
chat = ChatJarvisClaw(
wallet_private_key="0x...", # Your EVM wallet private key
model="anthropic/claude-sonnet-4.6",
)
response = chat.invoke("Write a haiku about AI agents")
print(response.content)
Discover Models & Pricing (no auth)
from langchain_jarvisclaw import ChatJarvisClaw
# List all models with USD pricing
models = ChatJarvisClaw.list_models()
for m in models[:5]:
print(f"{m['model']}: ${m['input_per_m_token_usd']}/M input tokens")
# Find free models to test quality
free = ChatJarvisClaw.free_models()
print(f"Free models: {[m['model'] for m in free['free']]}")
# Check platform health
health = ChatJarvisClaw.health()
print(f"Status: {health['status']}, Models: {health['data']['total_models']}")
Use with LangChain chains
from langchain_core.prompts import ChatPromptTemplate
from langchain_jarvisclaw import ChatJarvisClaw
chat = ChatJarvisClaw(api_key="sk-...", model="gpt-5.4")
prompt = ChatPromptTemplate.from_messages([
("system", "You are a helpful coding assistant."),
("human", "{question}"),
])
chain = prompt | chat
response = chain.invoke({"question": "How do I reverse a linked list in Go?"})
Streaming
chat = ChatJarvisClaw(api_key="sk-...", model="gpt-5.4", streaming=True)
for chunk in chat.stream("Tell me a story"):
print(chunk.content, end="", flush=True)
Supported Models
40+ models including:
- OpenAI: gpt-5.5, gpt-5.4, gpt-5.4-mini, o3, o1
- Anthropic: claude-opus-4.7, claude-sonnet-4.6, claude-haiku-4.5
- Google: gemini-3.1-pro, gemini-2.5-flash
- DeepSeek: deepseek-chat, deepseek-reasoner
- And many more — call
ChatJarvisClaw.list_models()for the full list
Payment Networks
- Base (EVM): USDC on Base mainnet (default)
- Solana: USDC on Solana (install with
pip install langchain-jarvisclaw[solana])
License
MIT
Metadata
Release files for langchain-jarvisclaw 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_jarvisclaw-0.1.1.tar.gz | 7.2 kB | Without provenance | Details for langchain_jarvisclaw-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langchain_jarvisclaw-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for langchain_jarvisclaw-0.1.1-py3-none-any.whl |
Total release size: 12.3 kB
Release files / langchain_jarvisclaw-0.1.1.tar.gz
| Download URL | langchain_jarvisclaw-0.1.1.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a5af5165b3576e54eb23b02786d25e179a5742d339f4154f069badd64f393aba
|
|
BLAKE2b-256 checksum How to use checksums |
e3cbdca8517f593c7b7ceec70c9e7150d59b896189b9b3430978c3816031dc83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / langchain_jarvisclaw-0.1.1-py3-none-any.whl
| Download URL | langchain_jarvisclaw-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bcb04ba21cbbf79e864a1a5c638d7a715244865f00f001030491325a86e48500
|
|
BLAKE2b-256 checksum How to use checksums |
5affd2b196105622d275c37ef96b04468ad7e2bf468d09c12b2770699a611926
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for langchain-jarvisclaw 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.