Skip to content

jawdat6/fixgraph-langchain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fixgraph-langchain

LangChain.js toolkit for FixGraph — search 25,000+ community-verified engineering fixes from your AI agent.

Install

npm install fixgraph-langchain @langchain/core

Quick 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

Links

About

FixGraph integration for fixgraph-langchain

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors