Quick Start
Config
string
default:"en"
Wikipedia language code (e.g.
"en", "fr", "de", "es").number
default:"5"
Default maximum search results per query.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Agentium 4.0.0 · Upgrade from 3.x.
Search and read Wikipedia articles — no API key required.
import { Agent, openai } from "@agentium/core";
import { WikipediaToolkit } from "@agentium/core/toolkits";
const wiki = new WikipediaToolkit();
const agent = new Agent({
name: "knowledge-agent",
model: openai(process.env.OPENAI_MODEL ?? "gpt-6.1-sol"),
instructions: "Look up facts on Wikipedia to answer questions accurately.",
tools: [...wiki.getTools()],
});
const result = await agent.run("Tell me about the history of TypeScript");
"en", "fr", "de", "es").| Tool | Description |
|---|---|
wikipedia_search | Search Wikipedia for articles. Returns titles, URLs, and snippets. |
wikipedia_summary | Get a summary of a Wikipedia article by exact title. |
const wiki = new WikipediaToolkit({ language: "fr" });
const agent = new Agent({
name: "french-researcher",
model: openai(process.env.OPENAI_MODEL ?? "gpt-6.1-sol"),
instructions: "Recherchez des informations sur Wikipedia en français.",
tools: [...wiki.getTools()],
});