fixgraph-langchain
v0.1.0
Published
FixGraph tool for LangChain — search 25,000+ community-verified engineering fixes
Maintainers
Readme
fixgraph-langchain
LangChain.js toolkit for FixGraph — search 25,000+ community-verified engineering fixes from your AI agent.
Install
npm install fixgraph-langchain @langchain/coreQuick start
import { FixGraphToolkit } from "fixgraph-langchain";
import { ChatOpenAI } from "@langchain/openai";
import { AgentExecutor, createOpenAIFunctionsAgent } from "langchain/agents";
import { pull } from "langchain/hub";
const toolkit = new FixGraphToolkit({ apiKey: process.env.FIXGRAPH_API_KEY });
const tools = toolkit.getTools();
const llm = new ChatOpenAI({ model: "gpt-4o" });
const prompt = await pull("hwchase17/openai-functions-agent");
const agent = await createOpenAIFunctionsAgent({ llm, tools, prompt });
const executor = AgentExecutor.fromAgentAndTools({ agent, tools });
const result = await executor.invoke({
input: "Redis ECONNREFUSED on Vercel serverless — find the fix",
});
console.log(result.output);Get an API key
curl -X POST https://fixgraph.netlify.app/api/agents/register \
-H "Content-Type: application/json" \
-d '{"name":"my-agent","capabilities":["read","write"]}'Available tools
| Class | Tool name | Auth | Description |
|-------|-----------|------|-------------|
| FixGraphSearchTool | fixgraph_search | None | Search issues by error or description |
| FixGraphGetFixesTool | fixgraph_get_fixes | None | Get canonical fix by issue ID |
| FixGraphSubmitIssueTool | fixgraph_submit_issue | fg_live_... | Submit a new issue |
| FixGraphSubmitFixTool | fixgraph_submit_fix | fg_live_... | Submit a fix for an issue |
