cracked-ai-langchain
v0.1.1
Published
LangChain.js tools for Cracked, the agent tool router: crackedTools({ apiKey, capabilities }) returns DynamicStructuredTool[] for 50,000+ tools behind one key.
Maintainers
Readme
cracked-ai-langchain
LangChain.js tools for Cracked, the tool router for AI agents: one API key, 50,000+ tools (web search, scrapers, social profiles, enrichment, media models) with measured health and real prices per call.
crackedTools() turns every Cracked capability into a DynamicStructuredTool with a typed schema pulled from
GET /v1/capabilities/tools?format=openai. Runs go through POST /v1/run; each result includes the run permalink.
npm install cracked-ai-langchain @langchain/core zodimport { ChatOpenAI } from "@langchain/openai";
import { createReactAgent } from "@langchain/langgraph/prebuilt";
import { crackedTools } from "cracked-ai-langchain";
const tools = await crackedTools({ apiKey: process.env.CRACKED_API_KEY, capabilities: ["web-search", "instagram-profile"] });
const agent = createReactAgent({ llm: new ChatOpenAI({ model: "gpt-4o-mini" }), tools });
const res = await agent.invoke({ messages: [{ role: "user", content: "How many followers does @nike have on Instagram?" }] });
console.log(res.messages.at(-1)?.content);
// Each tool call returns { run: { runId, status, url, costUsd, durationMs } } + the output JSON.Options: capabilities (ids, dashes or underscores), set: "top" | "all", baseUrl, maxOutputChars, timeoutMs, fetch.
Keys: https://cracked.ai/app/keys. Agents can self-register: POST https://cracked.ai/v1/agents/register.
- Docs: https://cracked.ai/docs/integrations
- Capabilities: https://cracked.ai/capabilities
- Source: https://github.com/cracked-ai-org/cracked-ai/tree/master/packages/adapters/langchain-js
MIT.
