# Eino

> LLM application and agent framework for Go, built the Golang way

- Category: Agents & Automation / Agent Frameworks & Builders
- Language: Go
- Licence: Apache-2.0
- Repository: https://github.com/cloudwego/eino
- Website: https://www.cloudwego.io/docs/eino/
- Canonical page: https://ai-tldr.dev/tools/eino/

## In short

Eino is an LLM application development framework written in Go. It draws on ideas from LangChain, Google ADK, and similar projects, but follows Golang conventions so the code feels natural to Go developers. It sits in the Agent Frameworks & Builders category of the Agents & Automation tools and is open-source, written in Go and licensed Apache-2.0.

## Overview

Eino is an LLM application development framework written in Go. It draws on ideas from LangChain, Google ADK, and similar projects, but follows Golang conventions so the code feels natural to Go developers.

It gives you reusable building blocks like ChatModel, Tool, Retriever, and ChatTemplate, with official implementations for providers such as OpenAI, Claude, Gemini, and Ollama. You can wire these blocks into graphs and workflows, or use the Agent Development Kit (ADK) to build agents that call tools and coordinate with each other.

Eino is part of the CloudWeGo open-source family. The core repo holds the type definitions, streaming engine, component abstractions, and agent implementations, while separate repos provide ready-made component implementations, dev tooling, and examples.

## What it does

- Component abstractions (ChatModel, Tool, Retriever, Embedding, and more) with official implementations for OpenAI, Claude, Gemini, Ark, Ollama, and Elasticsearch
- Agent Development Kit (ADK) for tool use, multi-agent coordination, context management, and ready-to-use agent patterns
- Graph and workflow composition with precise control over execution flow, and the option to expose a graph as a tool for agents
- DeepAgent that breaks complex tasks into steps, delegates to sub-agents, and can run shell commands, execute Python, and search the web
- Automatic stream processing that concatenates, merges, and copies streams as data flows between nodes
- Interrupt and resume support so any agent or tool can pause for human input and continue from a checkpoint

## Getting started

Eino is a Go module that needs Go 1.18 or above. Add it to your project, then configure a ChatModel and wrap it in an agent.

1. Install Eino

   Add the Eino module to your Go project.

```bash
go get github.com/cloudwego/eino@latest
```

2. Build a ChatModelAgent

   Configure a ChatModel, build an agent around it, and run a query through a Runner. The agent handles the ReAct loop internally.

```go
chatModel, _ := openai.NewChatModel(ctx, &openai.ChatModelConfig{
    Model:  "gpt-4o",
    APIKey: os.Getenv("OPENAI_API_KEY"),
})

agent, _ := adk.NewChatModelAgent(ctx, &adk.ChatModelAgentConfig{
    Model: chatModel,
})

runner := adk.NewRunner(ctx, adk.RunnerConfig{Agent: agent})
iter := runner.Query(ctx, "Hello, who are you?")
```

3. Compose a graph

   When you need exact control over flow, use compose to connect nodes into a graph, then compile and invoke it.

```go
graph := compose.NewGraph[*Input, *Output]()
graph.AddLambdaNode("validate", validateFn)
graph.AddChatModelNode("generate", chatModel)
graph.AddEdge(compose.START, "validate")
graph.AddEdge("validate", "generate")
graph.AddEdge("generate", compose.END)

runnable, _ := graph.Compile(ctx)
result, _ := runnable.Invoke(ctx, input)
```

## When to use it

- Building tool-using AI agents in Go that decide when to call tools and when to respond
- Coordinating multiple specialized agents on complex tasks with DeepAgent, including running shell commands, Python code, and web search
- Composing deterministic LLM workflows as graphs and exposing them as tools for autonomous agents
- Adding human-in-the-loop steps where an agent pauses for input and resumes from a checkpoint
- Instrumenting LLM apps with logging, tracing, and metrics through callback aspects
