eino-adk

Eino Agent Development Kit development skill. For building AI Agent applications including ChatModelAgent, workflows (Sequential/Parallel/Loop), multi-agent systems (Supervisor/PlanExecute), human-in-the-loop (interruption/approval). Use when users need to create Agents, use Runner for execution, manage tool calls, build multi-agent systems.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "eino-adk" with this command: npx skills add cylixlee/skills/cylixlee-skills-eino-adk

Eino ADK Development Guide

When to Use This Skill

Use this skill when:

  • User needs to build AI Agent applications
  • User asks how to use Eino ADK
  • User needs to implement multi-agent systems, workflows, human-in-the-loop
  • User wants to understand core concepts like Agent, Runner, Tool

Quick Start

Step 1: Import Required Packages

import (
    "context"
    "errors"
    "fmt"
    "io"

    "github.com/cloudwego/eino/adk"
    "github.com/cloudwego/eino/adk/prebuilt/planexecute"
    "github.com/cloudwego/eino/adk/prebuilt/supervisor"
    "github.com/cloudwego/eino/components/model"
    "github.com/cloudwego/eino/components/tool"
    "github.com/cloudwego/eino/schema"
)

Step 2: Create ChatModelAgent

agent, err := adk.NewChatModelAgent(ctx, &adk.ChatModelAgentConfig{
    Name:        "my_agent",
    Description: "An agent that helps with tasks",
    Instruction: "You are a helpful assistant.",
    Model:       chatModel, // model.ToolCallingChatModel
    ToolsConfig: adk.ToolsConfig{
        Tools: []tool.BaseTool{myTool},
    },
})

Step 3: Create Runner and Execute

runner := adk.NewRunner(ctx, adk.RunnerConfig{
    Agent:           agent,
    EnableStreaming: true,
})

events := runner.Run(ctx, []schema.Message{
    schema.UserMessage("Hello!"),
})

for event, ok := events.Next(); ok; event, ok = events.Next() {
    if event.Output != nil && event.Output.MessageOutput != nil {
        if stream := event.Output.MessageOutput.MessageStream; stream != nil {
            for {
                chunk, err := stream.Recv()
                if errors.Is(err, io.EOF) {
                    break
                }
                if err != nil {
                    // handle error
                    break
                }
                fmt.Print(chunk.Content)
            }
        }
    }
}

Note: MessageStream is automatically closed by ADK, no manual cleanup required.

Core Workflow

Basic Execution Flow

  1. Create Agent - Use NewChatModelAgent or prebuilt agents
  2. Create Runner - Use NewRunner to wrap the Agent
  3. Execute - Call runner.Run() or runner.Query()
  4. Process Events - Iterate AsyncIterator[*AgentEvent] to handle output

Key Interfaces

InterfaceLocationDescription
Agentreferences/core-concepts.mdCore Agent interface
Runnerreferences/core-concepts.mdExecution entry point
AgentEventreferences/core-concepts.mdEvent stream
Sessionreferences/core-concepts.mdSession state

Common Patterns

1. Basic Agent

See examples.md

agent, _ := adk.NewChatModelAgent(ctx, &adk.ChatModelAgentConfig{...})
runner := adk.NewRunner(ctx, adk.RunnerConfig{
    Agent:           agent,
    EnableStreaming: true,
})
events := runner.Query(ctx, "Hello!")

for event, ok := events.Next(); ok; event, ok = events.Next() {
    if event.Output != nil && event.Output.MessageOutput != nil {
        if stream := event.Output.MessageOutput.MessageStream; stream != nil {
            for {
                chunk, err := stream.Recv()
                if errors.Is(err, io.EOF) {
                    break
                }
                if err != nil {
                    // handle error
                    break
                }
                fmt.Print(chunk.Content)
            }
        }
    }
}

2. Workflow Agent

See examples.md

// Sequential - executes sub-agents in order
agent := adk.NewSequentialAgent(ctx, &adk.SequentialAgentConfig{
    SubAgents: []adk.Agent{agent1, agent2},
})

// Parallel - executes sub-agents concurrently
agent := adk.NewParallelAgent(ctx, &adk.ParallelAgentConfig{
    SubAgents: []adk.Agent{agent1, agent2},
})

// Loop - iterates until condition met
agent := adk.NewLoopAgent(ctx, &adk.LoopAgentConfig{
    SubAgents:     []adk.Agent{agent1},
    MaxIterations: 5,
})

3. Multi-Agent Systems

See examples.md

// Supervisor pattern
supervisor := supervisor.New(ctx, &supervisor.Config{
    Supervisor: supervisorAgent,
    SubAgents:  []adk.Agent{agent1, agent2},
})

// Plan-Execute-Replan pattern
entryAgent := planexecute.New(ctx, &planexecute.Config{
    Planner:   planAgent,
    Executor:  execAgent,
    Replanner: replanAgent,
})

4. Agent as Tool

See examples.md

agentTool := adk.NewAgentTool(ctx, subAgent,
    adk.WithFullChatHistoryAsInput(),
)

5. Interruption and Resume

See examples.md

// Trigger interruption (in tool's InvokableRun method)
err := adk.StatefulInterrupt(ctx, &ReviewInfo{...}, args)
return "", err

// Resume execution
iter, _ := runner.Resume(ctx, checkpointID)

6. Session Values

// Store
adk.AddSessionValue(ctx, "key", value)

// Retrieve
value, _ := adk.GetSessionValue(ctx, "key")

Configuration

Key configuration options in configuration.md:

  • ChatModelAgentConfig
  • RunnerConfig
  • ToolsConfig
  • AgentMiddleware

API Reference

Key APIs in api-reference.md:

  • NewChatModelAgent
  • NewRunner
  • Run/Query/Resume
  • NewAgentTool

Error Handling

Common error handling:

  1. Tool call failure: Check tool definition and parameters
  2. Model call failure: Check Model configuration and API Key
  3. Resume failure: Verify CheckpointStore and ResumeInfo
  4. Concurrency issues: Ensure Agent instances are not shared

References

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

test-driven-development

No summary provided by upstream source.

Repository SourceNeeds Review
General

skill-creator

No summary provided by upstream source.

Repository SourceNeeds Review
General

design-pattern

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.

Repository SourceNeeds Review
160.7K94.2Kanthropics