@graphai/llm_agents
v0.2.6
Published
LLM agents for GraphAI.
Downloads
698
Readme
@graphai/llm_agents for GraphAI
LLM agents for GraphAI.
Install
yarn add @graphai/llm_agents
| Agent | APIKEY | Stream | Tools | Web | History | |----------------|----------------------|--------|-------|-------|---------| | anthropicAgent | ANTHROPIC_API_KEY | Y | N | Y(*1) | Y | | geminiAgent | GOOGLE_GENAI_API_KEY | Y | Y | Y | Y | | groqAgent | GROQ_API_KEY | Y | Y | Y(*1) | Y | | openAIAgent | OPENAI_API_KEY | Y | Y | Y(*1) | Y | | replicateAgent | REPLICATE_API_TOKEN | N | N | N | N |
(*1) dangerouslyAllowBrowser
Usage
import { GraphAI } from "graphai";
import {
anthropicAgent,
geminiAgent,
groqAgent,
openAIAgent,
openAIImageAgent,
replicateAgent,
slashGPTAgent
} from "@graphai/llm_agents";
const agents = {
anthropicAgent,
geminiAgent,
groqAgent,
openAIAgent,
openAIImageAgent,
replicateAgent,
slashGPTAgent
};
const graph = new GraphAI(graph_data, agents);
const result = await graph.run();
Agents description
- anthropicAgent - Anthropic Agent
- geminiAgent - Gemini Agent
- groqAgent - Groq Agent
- openAIAgent - OpenAI Agent
- openAIImageAgent - OpenAI Image Agent
- replicateAgent - Replicate Agent
- slashGPTAgent - Slash GPT Agent
Input/Output/Params Schema & samples
Input/Params example
- openAIAgent
{
"inputs": {
"prompt": "this is response result"
},
"params": {}
}
- slashGPTAgent
{
"inputs": {},
"params": {
"query": "Come up with ten business ideas for AI startup"
}
}
Environment Variables
- anthropicAgent
- ANTHROPIC_API_KEY
- geminiAgent
- GOOGLE_GENAI_API_KEY
- groqAgent
- GROQ_API_KEY
- openAIAgent
- OPENAI_API_KEY
- openAIImageAgent
- OPENAI_API_KEY
- replicateAgent
- REPLICATE_API_TOKEN