Framework Integrations
Use Arch Tools with LangChain, CrewAI, AutoGen, and any Python or TypeScript project. One API key, 63 tools, ready in 30 seconds.
Installation
# Install the Python SDK + framework deps
pip install httpx
# For LangChain integration
pip install httpx langchain-core
# For CrewAI integration
pip install httpx crewai crewai-tools
# For AutoGen integration
pip install httpx pyautogen
# TypeScript / Node.js client
curl -O https://archtools.dev/integrations/arch-tools-client.ts
# Or use the npm package (smaller API): npm install @deesmo/arch-tools-sdk
# Download integration files directly
curl -O https://archtools.dev/integrations/arch_tools.py
curl -O https://archtools.dev/integrations/langchain.py
curl -O https://archtools.dev/integrations/crewai.py
curl -O https://archtools.dev/integrations/autogen.py
curl -O https://archtools.dev/integrations/arch-tools-client.ts
Python SDK
The Python SDK is a single-file client with zero required dependencies (uses stdlib urllib). Install httpx for connection pooling and async support.
Basic Usage
from arch_tools import ArchToolsClient
# Initialize with API key (or set ARCHTOOLS_API_KEY env var)
client = ArchToolsClient(api_key="arch_...")
# Call any tool by name
result = client.call_tool("summarize",
text="Your long article text here...",
style="bullets"
)
print(result)
# Use convenience methods
result = client.web_scrape(url="https://example.com")
result = client.ai_generate(prompt="Explain x402 protocol")
result = client.sentiment(text="This product is amazing!")
result = client.search_web(query="latest AI news")
result = client.image_generate(prompt="A futuristic city at sunset")
result = client.screenshot(url="https://archtools.dev")
Async Client
import asyncio
from arch_tools import ArchToolsAsyncClient
async def main():
async with ArchToolsAsyncClient(api_key="arch_...") as client:
# All methods are async
result = await client.call_tool("ai-generate",
prompt="Explain quantum computing",
model="claude"
)
print(result)
# Run multiple tools concurrently
results = await asyncio.gather(
client.summarize(text="Article 1..."),
client.summarize(text="Article 2..."),
client.search_web(query="x402 protocol"),
)
asyncio.run(main())
🦜 LangChain Integration
Drop Arch Tools into any LangChain agent with pre-built BaseTool wrappers. Each tool has proper Pydantic schemas for structured input.
Quick Start — Toolkit
from langchain_openai import ChatOpenAI
from langchain.agents import create_tool_calling_agent, AgentExecutor
from langchain_core.prompts import ChatPromptTemplate
# Import the Arch Tools toolkit
from langchain import ArchToolsToolkit
# Create toolkit — gives you 11 curated tools
toolkit = ArchToolsToolkit(api_key="arch_...")
tools = toolkit.get_tools()
# Set up agent
llm = ChatOpenAI(model="gpt-4o")
prompt = ChatPromptTemplate.from_messages([
("system", "You have access to Arch Tools for web, AI, crypto, and more."),
("human", "{input}"),
("placeholder", "{agent_scratchpad}"),
])
agent = create_tool_calling_agent(llm, tools, prompt)
executor = AgentExecutor(agent=agent, tools=tools, verbose=True)
# Run it
result = executor.invoke({
"input": "Scrape archtools.dev and summarize what the product does"
})
Individual Tools
from langchain import (
ArchToolsWebScrape,
ArchToolsWebSearch,
ArchToolsSummarize,
ArchToolsAiGenerate,
ArchToolsSentiment,
ArchToolsScreenshot,
ArchToolsCryptoPrice,
ArchToolsImageGenerate,
ArchToolsResearch,
ArchToolsFactCheck,
ArchToolsGeneric, # calls any of 63 tools by name
)
# Each tool works standalone
scraper = ArchToolsWebScrape(api_key="arch_...")
result = scraper.invoke({"url": "https://example.com"})
# Or use the generic tool for any of the 63 tools
generic = ArchToolsGeneric(api_key="arch_...")
result = generic.invoke({
"tool_name": "ocr-extract",
"params": '{"image_url": "https://example.com/receipt.png"}'
})
💡 Tip: The ArchToolsGeneric tool lets LangChain agents access all 63 tools dynamically — great for autonomous agents that need to pick the right tool.
🚀 CrewAI Integration
Give your CrewAI agents access to web scraping, AI generation, crypto data, research, and more.
from crewai import Agent, Task, Crew
from crewai import get_arch_tools
# Get all Arch Tools as CrewAI tools
tools = get_arch_tools(api_key="arch_...")
# Create a researcher agent with Arch Tools
researcher = Agent(
role="Senior Research Analyst",
goal="Find and analyze information using Arch Tools",
backstory="Expert researcher with access to 63 AI-powered tools",
tools=tools,
verbose=True,
)
# Create a task
task = Task(
description="Research the x402 protocol for HTTP-native payments. "
"Scrape key sources and write a comprehensive summary.",
expected_output="A detailed report with key findings and sources",
agent=researcher,
)
# Run the crew
crew = Crew(agents=[researcher], tasks=[task], verbose=True)
result = crew.kickoff()
print(result)
Available CrewAI Tools
- ArchWebScrapeTool — Scrape any web page
- ArchWebSearchTool — AI-powered web search
- ArchSummarizeTool — Summarize text
- ArchAiGenerateTool — Generate text with Claude/GPT-4/Grok/Gemini
- ArchSentimentTool — Sentiment analysis
- ArchScreenshotTool — Screenshot web pages
- ArchCryptoPriceTool — Crypto prices
- ArchResearchTool — Generate research reports
- ArchImageGenerateTool — Generate images with DALL-E
- ArchFactCheckTool — Verify claims with evidence
- ArchGenericTool — Call any of 63 tools by name
🤖 AutoGen Integration
Register Arch Tools as callable functions with AutoGen (AG2) agents. One function call registers all tools.
import autogen
from autogen import register_arch_tools
config_list = [{"model": "gpt-4o", "api_key": "sk-..."}]
# Create AutoGen agents
assistant = autogen.AssistantAgent(
"assistant",
llm_config={"config_list": config_list}
)
user = autogen.UserProxyAgent(
"user",
human_input_mode="NEVER",
code_execution_config=False
)
# Register ALL Arch Tools in one line
register_arch_tools(user, assistant, api_key="arch_...")
# Start chatting — the assistant can now use any Arch Tool
user.initiate_chat(
assistant,
message="Search the web for the latest x402 protocol news and summarize it"
)
Register Specific Tools Only
# Only register specific tools
register_arch_tools(user, assistant,
api_key="arch_...",
tools=["arch_web_search", "arch_summarize", "arch_crypto_price"]
)
📦 TypeScript Client
Zero-dependency TypeScript client. Uses native fetch — works everywhere.
import { ArchTools } from './arch-tools-client';
const arch = new ArchTools({ apiKey: 'arch_...' });
// Call any tool
const result = await arch.callTool('summarize', {
text: 'Your article text...',
style: 'bullets'
});
// Typed convenience methods
const summary = await arch.summarize({ text: '...', style: 'tldr' });
const page = await arch.webScrape({ url: 'https://example.com' });
const search = await arch.webSearch({ query: 'AI agents' });
const btc = await arch.cryptoPrice({ symbol: 'bitcoin' });
const img = await arch.imageGenerate({ prompt: 'A cat in space' });
const report = await arch.research({ topic: 'x402 payments' });
Node.js / Bun Example
// Works in Node.js 18+, Bun, Deno
import { ArchTools } from './arch-tools-client';
const arch = new ArchTools({
apiKey: process.env.ARCHTOOLS_API_KEY,
timeoutMs: 60000,
maxRetries: 3,
});
// List all available tools
const { tools } = await arch.listTools();
console.log(`Available: ${tools.length} tools`);
// Use any tool dynamically
for (const tool of ['crypto-price', 'crypto-fear-greed']) {
const r = await arch.callTool(tool, { symbol: 'bitcoin' });
console.log(tool, r);
}
💰 x402 Payment Handling
All integrations handle x402 payment errors gracefully. When a tool requires payment (no API key / insufficient credits), a 402 Payment Required response is returned with payment details.
from arch_tools import ArchToolsClient, ArchToolsPaymentRequiredError
client = ArchToolsClient() # no API key — will trigger x402
try:
result = client.call_tool("summarize", text="Hello")
except ArchToolsPaymentRequiredError as e:
print(f"Payment needed! Details: {e.payment_details}")
# payment_details contains:
# scheme: "exact"
# price: "$0.01"
# network: "eip155:8453" (Base)
# payTo: "0x..."
Error Handling
from arch_tools import (
ArchToolsClient,
ArchToolsError,
ArchToolsRateLimitError,
ArchToolsAuthError,
ArchToolsPaymentRequiredError,
)
client = ArchToolsClient(api_key="arch_...")
try:
result = client.call_tool("summarize", text="Hello")
except ArchToolsRateLimitError as e:
print(f"Rate limited. Retry after: {e.retry_after}s")
except ArchToolsAuthError:
print("Invalid API key")
except ArchToolsPaymentRequiredError as e:
print(f"x402 payment required: {e.payment_details}")
except ArchToolsError as e:
print(f"API error ({e.status_code}): {e}")
All 63 Tools
Every tool is accessible via client.call_tool("tool-name", **params). Here's the full list:
validate-data
generate-hash
qr-code
convert-format
transform-text
extract-metadata
web-scrape
extract-page
search-web
rss-parse
ip-lookup
whois-lookup
email-verify
phone-validate
currency-convert
timezone-convert
generate-uuid
diff-text
readability-score
language-detect
sentiment-analysis
summarize
extract-entities
regex-generate
pii-detect
web-search
ai-generate
ocr-extract
browser-task
extract-pdf
screenshot-capture
html-to-markdown
url-shorten
webhook-send
jsonpath-query
image-generate
barcode-generate
workflow-agent
crypto-price
crypto-ohlcv
crypto-market-cap
crypto-fear-greed
crypto-sentiment
crypto-news
token-lookup
ai-oracle
session-create
session-message
text-to-speech
transcribe-audio
email-send
design-create
domain-check
news-search
research-report
fact-check
video-generate
image-remove-bg
email-find
semantic-search
Full API documentation for each tool: archtools.dev/docs