Documentation Index
Fetch the complete documentation index at: https://docs.xhipai.com/llms.txt
Use this file to discover all available pages before exploring further.
Send messages and read channels in Slack workspaces.
import { Agent, SlackToolkit } from "@agentium/core";
const slack = new SlackToolkit({
botToken: process.env.SLACK_BOT_TOKEN,
});
const agent = new Agent({
name: "slack-bot",
instructions: "You help teams communicate via Slack.",
toolkits: [slack],
});
await agent.run("Send 'Deploy complete' to #engineering and read the last 5 messages from #alerts");
Send messages and manage channels in Discord servers.
import { Agent, DiscordToolkit } from "@agentium/core";
const discord = new DiscordToolkit({
botToken: process.env.DISCORD_BOT_TOKEN,
});
const agent = new Agent({
name: "discord-bot",
instructions: "You manage community engagement on Discord.",
toolkits: [discord],
});
await agent.run("List all channels and send a welcome message to #general");
Send messages and media through Telegram bots.
import { Agent, TelegramToolkit } from "@agentium/core";
const telegram = new TelegramToolkit({
botToken: process.env.TELEGRAM_BOT_TOKEN,
});
const agent = new Agent({
name: "telegram-bot",
instructions: "You send updates and photos via Telegram.",
toolkits: [telegram],
});
await agent.run("Send 'Server healthy' to chat 123456 and send the status screenshot photo from /tmp/status.png");
Search, read, and create pages in Notion workspaces.
import { Agent, NotionToolkit } from "@agentium/core";
const notion = new NotionToolkit({
apiKey: process.env.NOTION_API_KEY,
});
const agent = new Agent({
name: "notion-assistant",
instructions: "You organize knowledge in Notion.",
toolkits: [notion],
});
await agent.run("Search for pages about 'Q4 roadmap', read the first result, and create a summary page in the Planning database");
Search and create issues in Jira projects.
import { Agent, JiraToolkit } from "@agentium/core";
const jira = new JiraToolkit({
host: "https://myteam.atlassian.net",
email: process.env.JIRA_EMAIL,
apiToken: process.env.JIRA_API_TOKEN,
});
const agent = new Agent({
name: "jira-assistant",
instructions: "You manage project issues in Jira.",
toolkits: [jira],
});
await agent.run("Search for open bugs in the CORE project and create a new issue titled 'Fix login timeout' with high priority");
Interact with GitHub repositories, issues, and file contents.
import { Agent, GitHubToolkit } from "@agentium/core";
const github = new GitHubToolkit({
token: process.env.GITHUB_TOKEN,
});
const agent = new Agent({
name: "github-assistant",
instructions: "You help manage GitHub repositories.",
toolkits: [github],
});
await agent.run("List my repos, read the README.md from agentium/core, and create an issue titled 'Add retry logic' in that repo");
Query charges and customer data from Stripe.
import { Agent, StripeToolkit } from "@agentium/core";
const stripe = new StripeToolkit({
apiKey: process.env.STRIPE_SECRET_KEY,
});
const agent = new Agent({
name: "billing-assistant",
instructions: "You help with billing inquiries using Stripe data.",
toolkits: [stripe],
});
await agent.run("List the last 10 charges and get details for customer cus_abc123");
Upload, download, and list objects in Amazon S3 buckets.
import { Agent, S3Toolkit } from "@agentium/core";
const s3 = new S3Toolkit({
region: "us-east-1",
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
bucket: "my-data-bucket",
});
const agent = new Agent({
name: "storage-assistant",
instructions: "You manage files in S3.",
toolkits: [s3],
});
await agent.run("List all files in the reports/ prefix, then download the latest CSV");
Run queries and inspect schemas on SQLite or PostgreSQL databases.
import { Agent, SqlToolkit } from "@agentium/core";
const sqlLite = new SqlToolkit({
type: "sqlite",
database: "./data/app.db",
});
const sqlPostgres = new SqlToolkit({
type: "postgres",
connectionString: process.env.DATABASE_URL,
});
const agent = new Agent({
name: "data-analyst",
instructions: "You answer questions by querying the database.",
toolkits: [sqlPostgres],
});
await agent.run("Show me the schema for the users table, then find the top 10 users by order count");
Get, set, delete, and list keys in a Redis store.
import { Agent, RedisToolkit } from "@agentium/core";
const redis = new RedisToolkit({
url: process.env.REDIS_URL,
});
const agent = new Agent({
name: "cache-manager",
instructions: "You manage cached data in Redis.",
toolkits: [redis],
});
await agent.run("List all keys matching 'session:*', get the value of 'session:user42', and delete expired keys");
Read, write, and list files within a sandboxed directory.
import { Agent, FilesystemToolkit } from "@agentium/core";
const fs = new FilesystemToolkit({
basePath: "./workspace",
});
const agent = new Agent({
name: "file-manager",
instructions: "You organize and manage local files.",
toolkits: [fs],
});
await agent.run("List all .json files, read config.json, and write a backup to config.backup.json");
Execute shell commands with configurable timeouts and allowlists.
import { Agent, ShellToolkit } from "@agentium/core";
const shell = new ShellToolkit({
timeout: 30000,
allowedCommands: ["ls", "cat", "grep", "wc", "echo"],
});
const agent = new Agent({
name: "devops-assistant",
instructions: "You run safe shell commands to inspect the system.",
toolkits: [shell],
});
await agent.run("Count the number of lines in all TypeScript files under src/");
Check status, view diffs, and browse commit history of a Git repository.
import { Agent, GitToolkit } from "@agentium/core";
const git = new GitToolkit({
repoPath: "/home/user/project",
});
const agent = new Agent({
name: "code-reviewer",
instructions: "You review recent changes in the repository.",
toolkits: [git],
});
await agent.run("Show the current git status, the diff of staged files, and the last 5 commit messages");
Search the web using Tavily for real-time information.
import { Agent, WebSearchToolkit } from "@agentium/core";
const search = new WebSearchToolkit({
provider: "tavily",
apiKey: process.env.TAVILY_API_KEY,
});
const agent = new Agent({
name: "researcher",
instructions: "You find up-to-date information from the web.",
toolkits: [search],
});
await agent.run("Search for the latest Node.js LTS release and summarize the changelog");
Search the web and browse news without any API keys.
import { Agent, DuckDuckGoToolkit } from "@agentium/core";
const ddg = new DuckDuckGoToolkit();
const agent = new Agent({
name: "news-assistant",
instructions: "You find news and web results using DuckDuckGo.",
toolkits: [ddg],
});
await agent.run("Search for recent AI startup funding news and summarize the top 3 results");
Extract text content from any URL.
import { Agent, ScraperToolkit } from "@agentium/core";
const scraper = new ScraperToolkit();
const agent = new Agent({
name: "content-extractor",
instructions: "You extract and summarize text from web pages.",
toolkits: [scraper],
});
await agent.run("Extract the main text from https://example.com/blog/post-1 and give me a 3-sentence summary");
Execute JavaScript or Python code in a sandboxed environment.
import { Agent, CodeInterpreterToolkit } from "@agentium/core";
const interpreter = new CodeInterpreterToolkit({
languages: ["javascript", "python"],
});
const agent = new Agent({
name: "code-runner",
instructions: "You solve problems by writing and executing code.",
toolkits: [interpreter],
});
await agent.run("Write a Python script that generates the first 20 Fibonacci numbers and prints them as a formatted table");
Generate images using DALL-E from text descriptions.
import { Agent, ImageGenerationToolkit } from "@agentium/core";
const imageGen = new ImageGenerationToolkit({
apiKey: process.env.OPENAI_API_KEY,
});
const agent = new Agent({
name: "designer",
instructions: "You create images based on user descriptions.",
toolkits: [imageGen],
});
await agent.run("Generate a minimalist logo for a cloud infrastructure startup called 'NimbusOps'");
Extract text and metadata from PDF documents.
import { Agent, PdfToolkit } from "@agentium/core";
const pdf = new PdfToolkit();
const agent = new Agent({
name: "document-reader",
instructions: "You read and summarize PDF documents.",
toolkits: [pdf],
});
await agent.run("Extract text from ./reports/q4-financials.pdf and summarize the key metrics");
Search videos and retrieve transcripts from YouTube.
import { Agent, YouTubeToolkit } from "@agentium/core";
const youtube = new YouTubeToolkit({
apiKey: process.env.YOUTUBE_API_KEY,
});
const agent = new Agent({
name: "video-researcher",
instructions: "You find and summarize YouTube video content.",
toolkits: [youtube],
});
await agent.run("Search for 'TypeScript 5.0 features' and get the transcript of the top result");
Search and read Wikipedia articles.
import { Agent, WikipediaToolkit } from "@agentium/core";
const wiki = new WikipediaToolkit();
const agent = new Agent({
name: "knowledge-assistant",
instructions: "You answer questions using Wikipedia.",
toolkits: [wiki],
});
await agent.run("Search for 'Large Language Models' and read the full article, then explain it in simple terms");
Read, write, and append data in Google Sheets.
import { Agent, GoogleSheetsToolkit } from "@agentium/core";
const sheets = new GoogleSheetsToolkit({
credentials: JSON.parse(process.env.GOOGLE_CREDENTIALS),
});
const agent = new Agent({
name: "spreadsheet-assistant",
instructions: "You manage data in Google Sheets.",
toolkits: [sheets],
});
await agent.run("Read all rows from the 'Sales' sheet, calculate totals, and append a summary row");
List and create events in Google Calendar.
import { Agent, CalendarToolkit } from "@agentium/core";
const calendar = new CalendarToolkit({
credentials: JSON.parse(process.env.GOOGLE_CREDENTIALS),
});
const agent = new Agent({
name: "scheduling-assistant",
instructions: "You manage calendar events and scheduling.",
toolkits: [calendar],
});
await agent.run("List all events for next Monday and create a 30-minute team standup at 9am");
Make HTTP GET and POST requests with custom headers.
import { Agent, HttpToolkit } from "@agentium/core";
const http = new HttpToolkit();
const agent = new Agent({
name: "api-tester",
instructions: "You interact with REST APIs via HTTP requests.",
toolkits: [http],
});
await agent.run("GET https://api.example.com/health, then POST a test payload to https://api.example.com/echo");
PageIndexToolkit
Upload PDFs, build tree indices, and perform reasoning-based retrieval.
import { Agent, PageIndexToolkit } from "@agentium/core";
const pageIndex = new PageIndexToolkit({
apiKey: process.env.PAGEINDEX_API_KEY,
});
const agent = new Agent({
name: "document-analyst",
instructions: "You analyze documents using indexed retrieval and reasoning.",
toolkits: [pageIndex],
});
await agent.run("Upload ./docs/whitepaper.pdf, build a tree index, and answer: what are the three main contributions?");