FunctionTool instances for LlamaIndex agents. Works with OpenAIAgent, ReActAgent, and custom query engines.
npm install agent402-llamaindex
import { agent402Tools } from "agent402-llamaindex";
import { OpenAIAgent } from "llamaindex";
const { tools } = await agent402Tools();
const agent = new OpenAIAgent({ tools });
const response = await agent.chat({
message: "Hash 'hello world' with SHA-256",
});
console.log(response.toString());
| Option | Type | Description |
|---|---|---|
categories |
string[] |
Filter tools by category. |
slugs |
string[] |
Load only specific tools by slug. |
baseUrl |
string |
Point to a self-hosted Agent402 instance. |
agentKey |
string |
Private key for wallet-only (paid) tools. |
// Filter tools by category.
agent402Tools({ categories: ["finance"] })
// Load only specific tools by slug.
agent402Tools({ slugs: ["stock-quote", "stock-history"] })
// Point to a self-hosted Agent402 instance.
agent402Tools({ baseUrl: "https://my-agent402.example.com" })
// Private key for wallet-only (paid) tools.
agent402Tools({ agentKey: process.env.AGENT_KEY })