Skip to content
@goailoop

goailoop

Ailoop - Human-in-the-Loop CLI Tool for AI Agent Communication

License

Ailoop is a command-line tool that enables AI agents to communicate with human users through structured interactions. It supports both direct mode (for single-agent scenarios) and server mode (for multi-agent environments), providing a seamless bridge between AI automation and human oversight.

Features

Human-in-the-Loop Interactions

  • Ask questions and wait for human responses
  • Request authorization for critical actions
  • Send notifications with priority levels
  • Display images and navigate to URLs
  • Channel-based isolation for multi-agent workflows

Server Mode

  • Centralized server for multi-agent environments
  • Interactive terminal UI with real-time monitoring
  • WebSocket-based communication
  • Channel management and message history
  • Web interface for remote monitoring

Agent Message Forwarding

  • Stream agent output to centralized server
  • Support for multiple agent types (Cursor, JSONL, etc.)
  • Real-time message broadcasting
  • Message history and channel switching

Installation

Option 1: Release Binaries (Recommended)

Download the latest release from GitHub Releases:

  • Linux GNU: ailoop-x86_64-unknown-linux-gnu.tar.gz
  • Linux MUSL: ailoop-x86_64-unknown-linux-musl.tar.gz
  • Windows: ailoop-x86_64-pc-windows-msvc.zip

Extract and add to your PATH, then make executable on Unix systems.

Option 2: Homebrew (Linux)

brew install goailoop/cli/ailoop

Option 3: Scoop (Windows)

scoop bucket add goailoop https://github.com/goailoop/scoop
scoop install ailoop

Verify Installation

ailoop --version

Quick Start

Ask a Question

ailoop ask "What is the best approach for this task?"
ailoop ask "Should we proceed?" --timeout 60
ailoop ask "Review this code change" --channel dev-review

Request Authorization

ailoop authorize "Deploy version 1.2.3 to production"
ailoop authorize "Delete user data" --timeout 300 --channel admin-ops

Note: If no response is received within the timeout period, authorization defaults to DENIED for security.

Send Notifications

ailoop say "Build completed successfully"
ailoop say "System alert: High CPU usage detected" --priority high
ailoop say "Critical error occurred" --priority urgent --channel alerts

Forward Agent Messages

# Stream agent output to server
ailoop forward --channel my-agent

# Forward from file
ailoop forward --input agent-output.jsonl --channel my-agent

Commands

ailoop ask - Ask Questions

Ask a question and wait for a human response.

ailoop ask "What is the best approach?"              # Simple question
ailoop ask "Should we proceed?" --timeout 60         # With timeout
ailoop ask "Review this code" --channel dev-review  # Specific channel
ailoop ask "What is your name?" --json              # JSON output

Options: --channel, -c, --timeout, -t, --server, --json

ailoop authorize - Request Authorization

Request human approval for critical actions.

ailoop authorize "Deploy to production"
ailoop authorize "Delete user data" --timeout 300 --channel admin-ops
ailoop authorize "Execute operation" --json

Options: --channel, -c, --timeout, -t, --server, --json

ailoop say - Send Notifications

Send notification messages to human users.

ailoop say "Build completed successfully"
ailoop say "High CPU usage" --priority high
ailoop say "Critical error" --priority urgent --channel alerts

Options: --channel, -c, --priority, --server

Available priorities: low, normal, high, urgent

ailoop serve - Start Server

Run ailoop in server mode for multi-agent environments.

ailoop serve                    # Default port 8080
ailoop serve --port 9000        # Custom port
ailoop serve --host 0.0.0.0 --port 8080 --channel default

The server provides an interactive terminal UI showing:

  • Server status and metrics
  • Queue size and active connections
  • Recent activity

Press Ctrl+C to stop the server.

ailoop forward - Forward Agent Messages

Stream agent output to centralized server.

ailoop forward --channel my-agent
ailoop forward --input agent-output.jsonl --channel my-agent
ailoop forward --transport websocket --url ws://localhost:8080

Options: --channel, -c, --agent-type, --format, --transport, --url, --input, --output, --client-id

ailoop config - Configuration

Set up your configuration interactively.

ailoop config --init
ailoop config --init --config-file ~/.config/ailoop/custom.toml

The configuration wizard will prompt you for:

  • Default timeout for questions
  • Default channel name
  • Log level (error/warn/info/debug/trace)
  • Server bind address and port

Configuration is saved in TOML format at ~/.config/ailoop/config.toml by default.

Examples

Example 1: Code Review Workflow

# Agent asks for code review
ailoop ask "Please review PR #123" --channel code-review --timeout 3600

# Agent requests approval
ailoop authorize "Merge PR #123 to main branch" --channel code-review

Example 2: Deployment Workflow

# Start server for deployment team
ailoop serve --port 8080 --channel deployments

# In another terminal, request deployment approval
ailoop authorize "Deploy v2.1.0 to production" \
  --server http://localhost:8080 \
  --channel deployments \
  --timeout 600

Example 3: Monitoring and Alerts

# Send urgent alert
ailoop say "Database connection pool exhausted!" \
  --priority urgent \
  --channel monitoring

# Show monitoring dashboard
ailoop navigate https://monitoring.example.com/dashboard \
  --channel monitoring

Example 4: Agent Message Forwarding

# Start server
ailoop serve --port 8080

# Forward agent output from stdin
agent-command | ailoop forward --channel my-agent

# Forward from file
ailoop forward --input agent-output.jsonl --channel my-agent

Channels

Channels provide isolation between different workflows or agent instances. Each channel maintains its own message queue and connections.

  • Channel names must be 1-64 characters
  • Use lowercase alphanumeric characters, hyphens, or underscores
  • Must start with a letter or digit
  • Default channel is public

Examples of valid channel names:

  • production
  • dev-review
  • analytics_team
  • channel-123

Troubleshooting

Command Not Found

  • Ensure binary is in your PATH
  • Make executable on Unix: chmod +x ailoop

Server won't start

  • Check if the port is already in use: lsof -i :8080 (Linux) or netstat -an | grep 8080 (Windows)
  • Ensure you have permission to bind to the specified port (ports < 1024 require root/admin)
  • Check firewall settings

Timeout issues

  • Increase timeout value if operations take longer than expected
  • Use --timeout 0 to wait indefinitely (not recommended for production)

Channel validation errors

  • Ensure channel names follow the naming convention
  • Channel names are case-sensitive
  • Avoid special characters except hyphens and underscores

Connection issues

  • Verify server is running: ailoop serve
  • Check server URL format: http://localhost:8080 or ws://localhost:8080 for WebSocket
  • Ensure firewall allows connections on the specified port

Getting Help

  • Version: ailoop --version
  • Command help: ailoop <command> --help
  • Documentation: GitHub Repository

License

Apache License, Version 2.0 - See LICENSE file for details.

Need help? Open an issue on GitHub.

Pinned Loading

  1. ailoop ailoop Public

    AI Loop

    Rust

Repositories

Showing 5 of 5 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…