Quickstart: Run an agentic workflow
mainTo use Eko, define your LLM configurations (supporting Anthropic, Google, OpenAI, and OpenAI-compatible providers), initialize your agents (e.g., BrowserAgent, FileAgent), and instantiate the Eko class. You can then run natural language commands using eko.run().
const llms: LLMs = {
default: {
provider: "anthropic",
model: "claude-sonnet-4-5-20250929",
apiKey: "your-api-key"
},
gemini: {
provider: "google",
model: "gemini-2.5-pro",
apiKey: "your-api-key"
},
openai: {
provider: "openai",
model: "gpt-5",
apiKey: "your-api-key"
},
// OpenAI-compatible models (Qwen, Doubao, etc.)
qwen: {
provider: "openai",
model: "qwen-plus",
apiKey: "your-qwen-api-key",
config: {
baseURL: "https://dashscope-intl.aliyuncs.com/compatible-mode/v1"
}
},
doubao: {
provider: "openai", // Use OpenAI provider for compatibility
model: "doubao-seed-1-6-250615", // or other Doubao model
apiKey: "your-volcengine-api-key",
config: {
baseURL: "https://ark.cn-beijing.volces.com/api/v3" // Volcengine endpoint
}
}
};
let agents: Agent[] = [new BrowserAgent(), new FileAgent()];
let eko = new Eko({ llms, agents });
let result = await eko.run("Search for the latest news about Musk, summarize and save to the desktop as Musk.md");