Skip to main content

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_key raised ImportError — 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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langchain_jarvisclaw-0.1.1.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langchain_jarvisclaw-0.1.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file langchain_jarvisclaw-0.1.1.tar.gz.

File metadata

  • Download URL: langchain_jarvisclaw-0.1.1.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for langchain_jarvisclaw-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a5af5165b3576e54eb23b02786d25e179a5742d339f4154f069badd64f393aba
MD5 729be915dc2669ffae8b9e170c7e47d7
BLAKE2b-256 e3cbdca8517f593c7b7ceec70c9e7150d59b896189b9b3430978c3816031dc83

See more details on using hashes here.

File details

Details for the file langchain_jarvisclaw-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_jarvisclaw-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bcb04ba21cbbf79e864a1a5c638d7a715244865f00f001030491325a86e48500
MD5 bbf1be87908e92bc39db712cf5ea8fcd
BLAKE2b-256 5affd2b196105622d275c37ef96b04468ad7e2bf468d09c12b2770699a611926

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page