eino README

The project's README from github.com/cloudwego/eino. As one markdown file: README.md.

Eino

coverage Release WebSite License Go Report Card OpenIssue ClosedIssue Stars Forks

English | 中文

Overview

Eino['aino] is an LLM application development framework in Golang. It draws from LangChain, Google ADK, and other open-source frameworks, and is designed to follow Golang conventions.

Eino provides:

Quick Start

ChatModelAgent

Configure a ChatModel, optionally add tools, and you have a working agent:

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?")
for {
    event, ok := iter.Next()
    if !ok {
        break
    }
    fmt.Println(event.Message.Content)
}

Add tools to give the agent capabilities:

agent, _ := adk.NewChatModelAgent(ctx, &adk.ChatModelAgentConfig{
    Model: chatModel,
    ToolsConfig: adk.ToolsConfig{
        ToolsNodeConfig: compose.ToolsNodeConfig{
            Tools: []tool.BaseTool{weatherTool, calculatorTool},
        },
    },
})

The agent handles the ReAct loop internally — it decides when to call tools and when to respond.

→ ChatModelAgent examples · docs

DeepAgent

For complex tasks, use DeepAgent. It breaks down problems into steps, delegates to sub-agents, and tracks progress:

deepAgent, _ := deep.New(ctx, &deep.Config{
    ChatModel: chatModel,
    SubAgents: []adk.Agent{researchAgent, codeAgent},
    ToolsConfig: adk.ToolsConfig{
        ToolsNodeConfig: compose.ToolsNodeConfig{
            Tools: []tool.BaseTool{shellTool, pythonTool, webSearchTool},
        },
    },
})

runner := adk.NewRunner(ctx, adk.RunnerConfig{Agent: deepAgent})
iter := runner.Query(ctx, "Analyze the sales data in report.csv and generate a summary chart")

DeepAgent can be configured to coordinate multiple specialized agents, run shell commands, execute Python code, and search the web.

→ DeepAgent example · docs

Composition

When you need precise control over execution flow, use compose to build graphs and workflows:

graph := compose.NewGraph[*Input, *Output]()
graph.AddLambdaNode("validate", validateFn)
graph.AddChatModelNode("generate", chatModel)
graph.AddLambdaNode("format", formatFn)

graph.AddEdge(compose.START, "validate")
graph.AddEdge("validate", "generate")
graph.AddEdge("generate", "format")
graph.AddEdge("format", compose.END)

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

Compositions can be exposed as tools for agents, bridging deterministic workflows with autonomous behavior:

tool, _ := graphtool.NewInvokableGraphTool(graph, "data_pipeline", "Process and validate data")

agent, _ := adk.NewChatModelAgent(ctx, &adk.ChatModelAgentConfig{
    Model: chatModel,
    ToolsConfig: adk.ToolsConfig{
        ToolsNodeConfig: compose.ToolsNodeConfig{
            Tools: []tool.BaseTool{tool},
        },
    },
})

This lets you build domain-specific pipelines with exact control, then let agents decide when to use them.

→ GraphTool examples · compose docs

Key Features

Component Ecosystem

Eino defines component abstractions (ChatModel, Tool, Retriever, Embedding, etc.) with official implementations for OpenAI, Claude, Gemini, Ark, Ollama, Elasticsearch, and more.

→ eino-ext

Stream Processing

Eino automatically handles streaming throughout orchestration: concatenating, boxing, merging, and copying streams as data flows between nodes. Components only implement the streaming paradigms that make sense for them; the framework handles the rest.

→ docs

Callback Aspects

Inject logging, tracing, and metrics at fixed points (OnStart, OnEnd, OnError, OnStartWithStreamInput, OnEndWithStreamOutput) across components, graphs, and agents.

→ docs

Interrupt/Resume

Any agent or tool can pause execution for human input and resume from checkpoint. The framework handles state persistence and routing.

→ docs · examples

Framework Structure

The Eino framework consists of:

Documentation

Dependencies

Code Style

This repo uses golangci-lint. Check locally with:

golangci-lint run ./...

Rules enforced:

Security

If you discover a potential security issue in this project, or think you may have discovered a security issue, we ask that you notify Bytedance Security via our security center or vulnerability reporting email.

Do not create a public GitHub issue.

Contact

    LarkGroup

License

This project is licensed under the Apache-2.0 License.

eino (cloudwego/eino)

Searching Database…

13.3K ·GitHub
What is this?Eino is an LLM/AI application development framework for Go, drawing design ideas from LangChain and Google ADK. It provides reusable components (ChatModel, Tool, Retriever, ChatTemplate), an agent development kit, and a composition engine to build graphs and workflows for AI apps.
Is this a framework or just a component library?It's a full framework: it includes component abstractions, an Agent Development Kit (ADK) for building agents, and a composition layer to wire components into graphs/workflows, plus a separate EinoExt repo for concrete implementations.
How do I get started building an agent with it?Configure a ChatModel (optionally with tools) to create a ChatModelAgent that runs a ReAct loop automatically, or use compose to build graphs/workflows for precise control over execution flow; compositions can also be exposed as tools for agents.
What Go version and extra packages do I need?You need Go 1.18 or above; concrete component implementations (OpenAI, Claude, Gemini, Ark, Ollama, Elasticsearch, etc.) live in the separate eino-ext repository.
Does it include ready-made model/tool integrations, or just the interfaces?This repo mainly defines abstractions and orchestration logic; actual provider integrations (OpenAI, Claude, Gemini, Ollama, Elasticsearch, etc.) are implemented separately in EinoExt, so you'll likely need that companion module too.
What is DeepAgent for?DeepAgent is for complex tasks: it breaks problems into steps, delegates work to sub-agents, and tracks progress, and can be configured to coordinate multiple specialized agents, run shell commands, execute Python code, and search the web.
How does Eino handle streaming data between components?Eino automatically manages streaming across orchestration — concatenating, boxing, merging, and copying streams as data flows between nodes — so components only need to implement the streaming paradigms relevant to them.
Can a long-running agent be paused for human input?Yes, any agent or tool can pause execution for human input via interrupt/resume and later continue from a saved checkpoint, with the framework handling state persistence and routing.
How can I observe what my agents and graphs are doing?Eino lets you inject logging, tracing, and metrics at fixed callback points (OnStart, OnEnd, OnError, and stream variants) across components, graphs, and agents, and there's a separate Eino Devops tool for visualized development and debugging.
Creator
cloudwego
Size
15.3 MB
Stars
13.3K
Age
1y
Commits · 90 Days