Skip to main content

Cracked for LangChain

Give any LangChain agent 50,000+ tools through one API key.

Publishing to PyPI soon. Until then install from the repo path:

pip install ./sdk/python ./sdk/integrations/langchain langchain-core
# later: pip install cracked-ai-langchain

Set CRACKED_API_KEY (get one at https://cracked.ai/app/keys, or let the agent register itself with Cracked.register_agent()).

Two ways to use it

1. Generic toolkit (the agent discovers, inspects and runs on its own):

from langchain.agents import create_agent          # or your usual agent constructor
from cracked_ai_langchain import cracked_toolkit

agent = create_agent(model="openai:gpt-4.1", tools=cracked_toolkit())
agent.invoke({"messages": [("user", "What is the weather in Austin right now?")]})

Tools: cracked_discover, cracked_inspect, cracked_run (CrackedTool), cracked_run_capability.

2. Pre-resolved tools (one StructuredTool per endpoint, schema taken from inspect, so the model fills the provider's real fields):

from cracked_ai_langchain import cracked_tools

tools = cracked_tools("instagram profile followers", limit=3)
for t in tools:
    print(t.name, t.args)     # e.g. apify_apify_instagram-profile-scraper {'usernames': ...}
agent = create_agent(model="openai:gpt-4.1", tools=tools)

CrackedTool alone is a multi-argument BaseTool (provider, endpoint, input) you can add to an existing tool list.

All tools return a status line (runId, status, httpStatus, costUsd) followed by the JSON output, truncated to max_output_chars (default 20,000). API errors come back as JSON {"error", "status", "message"} strings so the agent can recover (402 = top up, 503 BLOCKED = provider needs your key, pick another).

Example

python example.py runs cracked_toolkit() and a cracked_tools("weather") tool directly (no LLM needed) so you can verify wiring before adding a model.

Metadata

Release files for cracked-ai-langchain 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cracked-ai-langchain 0.1.0
File Size Uploaded
cracked_ai_langchain-0.1.0.tar.gz 4.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cracked-ai-langchain 0.1.0
File Interpreter ABI Platform
cracked_ai_langchain-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.2 kB

Release files / cracked_ai_langchain-0.1.0.tar.gz

Download URL cracked_ai_langchain-0.1.0.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8aa95c92cd65a6e94d708592e06bc6cf17170e444597aa9e7534739b440db55c
BLAKE2b-256 checksum
How to use checksums
50423558edda51c36100a02c81d4682399980558b474ae3c77f53a5e9d0b9dca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / cracked_ai_langchain-0.1.0-py3-none-any.whl

Download URL cracked_ai_langchain-0.1.0-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
350756741a69cab7b70e0e3fb220532b79a93fdec47dc56c0805983a4efae168
BLAKE2b-256 checksum
How to use checksums
e2043bec00691a98c91ccd93677b52c03cd1cf4102ea8354c5bce118fe97acfa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release 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