What is Eino?

Eino is an open-source Go framework in the CloudWeGo ecosystem that provides typed LLM components, Core orchestration with Chain, Graph, and Workflow, and an Agent Development Kit for autonomous and multi-agent applications.

Quick Facts

Full NameEino AI Application Development Framework
CreatedOpen-sourced by the CloudWeGo community
SpecificationOfficial Specification

How It Works

Core components

Eino Core models common capabilities as typed components, including ChatModel, Tool, PromptTemplate, Retriever, Document Loader, Indexer, Transformer, and Lambda. Implementations can be replaced behind their interfaces, while callbacks provide lifecycle hooks for tracing, metrics, debugging, and audit. This separation helps a Go service test retrieval, generation, and Tool execution independently instead of hiding them inside one prompt wrapper.

Chain, Graph, and Workflow

Chain is the simplest forward-only composition. Graph supports directed cyclic or acyclic control flow, branches, state, and more flexible execution. Workflow is a directed acyclic composition with struct-field mapping between nodes. All three compile into runnable units and handle type checks, stream conversion, concurrency, callback injection, and node options. Choose the least flexible form that expresses the required control flow.

Agent Development Kit

Eino ADK centers on the Agent interface. ChatModelAgent combines a ChatModel, Tools, a ReAct loop, and middleware so the model can decide whether to call a Tool and continue from its result. Deterministic Sequential, Parallel, and Loop workflow agents cover fixed coordination, while AgentAsTool lets a parent agent delegate a bounded subtask. Multi-agent structure should follow independent responsibilities, not agent count as a goal.

Runner, events, and recovery

Runner is the execution boundary for querying an Agent and receiving an asynchronous AgentEvent stream. It is also the entry point for checkpoint and resume support, interruption, and multi-turn control through TurnLoop. Applications should convert this stream into explicit success, failure, cancelled, interrupted, and unknown outcomes, persist idempotency and checkpoint data outside transient model context, and avoid treating a closed stream as proof of success.

Production boundary

Eino can standardize application structure, but a compiled Graph or running Agent is not a security or quality guarantee. The surrounding service must authenticate the caller, authorize each object and side effect, cap model and Tool loops, validate outputs, protect secrets, isolate tenants, handle duplicate delivery, and evaluate task success and regressions. Pin module and provider versions because Core, ADK, component implementations, and model APIs evolve independently.

Key Characteristics

  • Go-native abstractions: typed interfaces and explicit errors fit existing backend services
  • Composable Core: ChatModel, Tool, Retriever, Template, Loader, Transformer, and Lambda implementations are replaceable
  • Three orchestration forms: Chain, Graph, and Workflow cover progressively richer deterministic control flow
  • Agent runtime: ADK provides ChatModelAgent, workflow agents, AgentAsTool, middleware, and multi-agent composition
  • Event and state lifecycle: Runner supports streaming execution, interruption, checkpointing, resume, and multi-turn control
  • Operational integration: callbacks and options expose hooks for tracing, metrics, policy, and per-node configuration

Common Use Cases

  1. Building a Go assistant that combines model decisions, bounded Tools, and streamed events
  2. Implementing a typed RAG pipeline from document loading through retrieval and generation
  3. Encoding deterministic branches or field mappings with Graph or Workflow
  4. Coordinating specialist agents through AgentAsTool or fixed workflow agents
  5. Wrapping model and Tool execution with checkpoints, human approval, tracing, and regression tests

Example

loading...
Loading code...

Frequently Asked Questions

Is Eino a model provider or an application framework?

Eino is an application framework, not a foundation model or hosting service. It supplies abstractions and orchestration for connecting model implementations, Tools, retrievers, state, and application logic. Model credentials, quotas, data terms, and provider behavior remain outside the framework.

When should I use Eino Core instead of Eino ADK?

Use Core components and Chain, Graph, or Workflow when control flow should be deterministic and reviewable. Use ADK when a model must choose Tools or delegate dynamically across iterations. A system can combine both by placing deterministic workflows behind an Agent Tool.

How do Chain, Graph, and Workflow differ?

Chain is forward-only, Graph supports richer directed control flow including cycles and branches, and Workflow is a directed acyclic graph with field-level data mapping. Prefer the simplest abstraction that captures the required state and transitions because flexibility also increases testing and recovery complexity.

Does ToolsNode decide which Tool an Agent should call?

No. ToolsNode executes Tool calls supplied by the surrounding orchestration, typically calls generated by a ChatModel. In ADK, ChatModelAgent owns the ReAct decision loop. Tool execution still needs deterministic argument validation, authorization, timeouts, and idempotency.

Does Eino make an Agent production-ready by itself?

No. Runner adds event delivery, checkpoints, resume, interruption, and multi-turn control, but the service must still define terminal states and durable recovery data. Production readiness also requires access control, secret handling, tenant isolation, budgets, retries, idempotency, observability, evaluations, deployment discipline, and incident recovery.

Related Terms

Related Articles