Eino V0.7.0 Alpha Release: Human-in-the-Loop #527
shentongmartin
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Eino V0.7.0 Alpha Release: Human-in-the-Loop
Introduction
We're releasing the Alpha version of Eino V0.7.0 with Human-in-the-Loop capabilities—a new feature that enables AI agents to collaborate with humans in real-time.
The framework lets you pause agent execution at almost any point, get human input, and continue with full state preservation. This means no lost context and no need to restart from scratch.
Our approach: "Interrupt anywhere, resume directly" - simple, flexible, and designed for real-world use.
The Problem We're Solving
Eino already has interrupt/checkpoint capabilities, but building effective human-in-the-loop interactions has been harder than it should be. Here's what developers currently face:
The Technical Overhead
The Conceptual Gap
The current system is too technical. Instead of thinking "I want human approval here," developers have to:
The result: Too much time spent on interrupt plumbing, not enough on actual collaboration features.
Our solution: Make human-in-the-loop interactions straightforward, with ready-to-use patterns and simple building blocks for custom needs.
Core Patterns: Four Practical Ways to Add Human Input
Important Note: These four patterns are implemented as examples in our alpha release, but they're not yet finalized into the core framework. We're being conservative - we want to make sure they're the right approach before introducing them into eino-ext or eino itself. Your feedback during alpha testing will directly influence their final form.
1. Approval Pattern: Simple Yes/No Decisions
When to use: For operations that need human confirmation - like payments, database changes, or sending emails.
flowchart LR A[Agent Executes] --> B{Tool Call} B --> C[Interrupt: Request Approval] C --> D{Human Decision} D -- Approve --> E[Execute Tool] D -- Deny --> F[Skip Operation] E --> G[Continue Execution] F --> GExample: A ticket booking agent preparing to book a flight pauses and asks: "Book ticket to Paris for John Smith? [Y/N]"
Implementation: approval/main.go
2. Review & Edit Pattern: Fix Before Continuing
When to use: When an agent might get details wrong and you want to correct them before proceeding.
flowchart LR A[Agent Generates Content] --> B[Interrupt: Show Draft] B --> C{Human Review} C -- Approve --> D[Use Original] C -- Edit --> E[Provide Corrections] E --> F[Use Edited Version] D --> G[Continue Execution] F --> GExample: A ticket booking agent shows booking details "Destination: Paris, Passenger: John Smith" and the user corrects it to "Destination: London, Passenger: Jane Doe" before confirming.
Implementation: review-and-edit/main.go
3. Feedback Loop Pattern: Keep Improving Until It's Right
When to use: For content creation or tasks that benefit from multiple rounds of human feedback.
flowchart LR A[Writer Agent] --> B[Generate Content] B --> C[Interrupt: Show to Human] C --> D{Human Review} D -- Provide Feedback --> E[Refine Based on Feedback] E --> C D -- Satisfied --> F[Final Output]Example: A poetry-writing agent generates a verse, receives feedback "make it more humorous," and continues refining until the human indicates they're satisfied.
Implementation: feedback-loop/main.go
4. Follow-up Pattern: Ask Questions When Unsure
When to use: When an agent needs more information to complete a task and should ask for clarification.
flowchart LR A[Agent Researches] --> B{Sufficient Information?} B -- No --> C[Interrupt: Ask Clarifying Question] C --> D[Human Provides Answer] D --> E[Continue Research] E --> B B -- Yes --> F[Complete Task]Example: A trip planning agent needs to understand user preferences and asks: "What type of activities do you enjoy: adventure sports, cultural experiences, or relaxing vacations?" The agent continues this questioning cycle until it has sufficient information to create the perfect personalized itinerary.
Implementation: follow-up/main.go
Beyond the Basics: Build Your Own Patterns
The four core patterns cover common needs, but the real value is that you're not limited to them. The underlying system lets you create any interaction pattern you need.
Interrupt Anywhere: Three Key Implications
Universal Interrupt Points: Interrupts can happen from almost any entity - nodes, tools, graphs, sub-processes within lambdas, or agents. No component is off-limits.
Arbitrary Nesting Support: The interrupting entity can be nested anywhere in the hierarchy - from simple agents to complex workflow agents, agent tools, graphs, sub-graphs, or graphs within lambda nodes.
Simple Interrupt API: Interrupting is straightforward. Just call
StatefulInterrupt, passing the 'info' you want end-users to see and the 'state' you want preserved for resumption.Resume Directly: Three Key Implications
Targeted Resume Data: No longer need to define Options or use 'StateModifier'. Just call
TargetedResumewith a map where the key is the interrupt ID and the value is the data for that specific interrupt.Automatic State Management: The interrupting entity no longer needs to fetch state from global graph State. Everything is available in
ResumeInfo- both state and resume data. The framework handles the plumbing.Concurrent Interrupt Control: When multiple interrupts occur simultaneously, end-users have complete control over which ones to resume and can pass different resume data accordingly.
Join the Alpha: Help Us Shape the Future
We're releasing our human-in-the-loop framework in alpha because we need your help. This is a significant feature that requires real-world testing and feedback before we can finalize the design.
What to Expect (and What to Be Prepared For)
How to Get Started
Explore the Examples:
git clone -b feat/hitl https://github.com/cloudwego/eino-examples.git cd eino-examples/adk/human-in-the-loopTry the four core patterns in action:
Read the Documentation (Optional, for advanced users):
Build Your Own Agents:
Option 1: Fork and Extend (Recommended for quick testing)
feat/hitlbranch)Option 2: Start from Scratch (For advanced users building custom patterns)
Build your own patterns using the low-level interrupt/resume mechanisms:
Join the Conversation:
We're grateful for your time and expertise in helping us improve Eino. Your contributions will make the framework better for everyone.
Beta Was this translation helpful? Give feedback.
All reactions