$ show FellouAI/eko
Eko is a TypeScript framework for building production-ready AI agents that can automate workflows across browser, Node.js, and web extension environments. The core orchestration engine (Eko class) takes a natural language task, uses an LLM to generate a multi-agent workflow plan encoded as XML, then executes it with parallel/serial agent execution, replanning, and human-in-the-loop support. The system provides a clean abstraction over LLM providers (OpenAI, Anthropic, etc.) with retry and fallback, a ReAct tool-calling loop, and built-in browser automation agents that operate via screenshots or DOM labels. It also includes MCP client implementations (SSE, HTTP, stdio) for integrating external tools, and a chat agent for conversational interactions with tool delegation. The architecture is modular with separate npm packages: @eko-ai/eko-core (core engine), @eko-ai/eko-nodejs (Playwright-based browser agent), @eko-ai/eko-extension (Chrome extension agent), and @eko-ai/eko-web (web environment agent). The repository includes working examples (Chrome extension with side panel, Node.js automation using Playwright, and a React web app). The framework is designed for developers who want to automate complex, multi-step tasks using language models, with a focus on reliability, human oversight, and extensibility via custom agents and tools.
The LLM identified 4 files worth highlighting for reuse:
RetryLanguageModel is a robust LLM wrapper that centralizes provider creation, retry logic, fallback, and streaming timeouts. It supports OpenAI, Anthropic, Google, Bedrock, Azure, OpenRouter, Modelscope, and OpenAI-compatible providers. The component is self-contained (imports from @ai-sdk/provider and internal types) and can be extracted into any TypeScript project needing a resilient LLM client with fallback capabilities.
Implements the ReAct (Reasoning + Acting) loop for tool-calling agents. It handles streaming responses, tool invocation, result parsing, and retry on malformed outputs. The function `callWithReAct` is a generic, reusable pattern for any LLM-based agent that needs to call tools iteratively. It is isolated from specific agent logic and can be reused across different agent implementations.
Provides functions to parse and generate an XML representation of multi-agent workflows. The XML schema encodes agent dependencies, task nodes, forEach loops, watch triggers, and variable passing. This component demonstrates a non-obvious pattern of using structured XML as a plan language for AI agents, and it is decoupled from the execution engine, making it reusable for any system that needs to serialize/deserialize hierarchical agent plans.
EkoMemory manages conversation history with configurable capacity, token estimation, and automatic compression. It uses a sliding window approach and summarizes older messages to stay within token limits. The component is self-contained and can be extracted into any chat application or agent system that needs to maintain bounded conversation context with efficient memory management.