langchain-stackresolve
v0.1.0
Published
StackResolve tools for LangChain.js: resolve a task to the right tool, get the current way to build something, audit a domain for agent-readiness, and research a company.
Downloads
50
Maintainers
Readme
langchain-stackresolve
StackResolve tools for LangChain.js. Give an agent the ability to pick the right software for a task, get today's way to build something, compare products on facts, and research a company from its domain.
npm install langchain-stackresolve @langchain/coreSet STACKRESOLVE_API_KEY (get one at stackresolve.dev; there
is a free tier). Public endpoints work without a key.
Use
import { createAgent } from 'langchain'
import { agentReadyTools } from 'langchain-stackresolve'
const agent = createAgent({
model: 'anthropic:claude-sonnet-5',
tools: agentReadyTools(),
})
const res = await agent.invoke({
messages: [{ role: 'user', content: 'What should I use to scrape a JS-heavy site?' }],
})Tools
| Tool | What it answers |
| --- | --- |
| stackresolve_resolve | Which tool should I use for this task, and why |
| stackresolve_how_to | What is the current, cited way to build this |
| stackresolve_find_tools | Which products fit this task |
| stackresolve_compare_products | X vs Y, field by field |
| stackresolve_audit | Can an agent integrate this domain without a human |
| stackresolve_get_company | What is this company |
| stackresolve_get_pricing | What does it cost right now |
| stackresolve_find_competitors | Who are the real alternatives |
| stackresolve_research_company | Anything else, researched live with sources |
Bundles
Nine tools is a lot to put in front of one model. Pick the half you need.
import { stackResolveTools, agentReadyTools, companyDataTools } from 'langchain-stackresolve'
agentReadyTools() // resolve, how_to, find_tools, compare, audit
companyDataTools() // get_company, get_pricing, find_competitors, research_company
stackResolveTools() // all nine, sharing one clientIndividual factories are exported too (createResolveTool, createAuditTool, and so on)
when you want to name or filter tools yourself.
Options
Every factory takes the SDK options.
agentReadyTools({
apiKey: process.env.STACKRESOLVE_API_KEY, // default: that env var
baseUrl: 'https://api.stackresolve.dev', // default
fetch: myFetch, // default: global fetch
client: existingStackResolveClient, // reuse a client you already built
})Errors
Tools return API and network errors as readable text instead of throwing, so a missing key or a rate limit becomes something the agent can react to rather than an exception that ends the run. Schema validation still rejects, because a malformed call should never reach the API.
License
MIT
