DISCOVER THE FUTURE OF AI AGENTSarrow_forward

ESA

calendar_todayAdded Feb 26, 2026
categoryAgent & Tooling
codeOpen Source
大语言模型Model Context ProtocolGoAI AgentsAgent FrameworkCLIAgent & ToolingModel & Inference FrameworkDeveloper Tools & CodingAutomation, Workflow & RPAProtocol, API & Integration

AI-powered command-line micro agent framework that wraps shell commands as LLM-callable functions via TOML configuration, with multi-LLM backend and MCP protocol support for safe natural-language-to-system-operation translation.

Overview#

ESA is a Go-based (71.3%) AI-powered command-line tool developed by meain with 222 commits. The core concept is "personalized micro agents"—limiting LLMs to highly specific, audited toolsets for safer, more precise, and efficient system automation.

Key Features#

Multi-LLM Provider Support#

  • OpenAI (OPENAI_API_KEY)
  • Groq (GROQ_API_KEY)
  • OpenRouter (OPENROUTER_API_KEY)
  • GitHub Models (GITHUB_MODELS_API_KEY)
  • Ollama local deployment (OLLAMA_API_KEY)
  • Custom OpenAI-compatible APIs

Agent System#

Define specialized agents via TOML configuration files. Each agent contains:

  • system_prompt: Defines agent role and behavior
  • functions: Callable command definitions with parameter validation, type checking, and formatting

Built-in agents: +default (basic system operations), +new (create new agents), +auto (auto-select appropriate agent)

Function-Based Architecture#

  • Wrap shell scripts/CLI commands as LLM-callable functions
  • Support {{$command}} for dynamic shell command execution and output insertion
  • Parameter validation: type, required, format

MCP Server Integration#

Support for Model Context Protocol (MCP) servers to connect external data sources and tools (filesystem, databases, web services). Function-level security control via safe_functions and allowed_functions.

Interaction Modes#

  • CLI one-shot: esa "your query"
  • REPL mode: esa --repl
  • Web interface: esa --serve (WebSocket streaming, default port 8080)

Safety Controls#

  • Three-tier confirmation: none (default), unsafe (confirm dangerous commands), all (confirm everything)
  • Function safety marking: safe = true/false

Conversation Management#

Session history save/restore (--continue, --conversation <id>), history viewing (--list-history, --show-history <index>), retry mechanism (--retry)

Quick Start#

# Install
go install github.com/meain/esa@latest

# Configure API Key
export OPENAI_API_KEY="your-key"

# Basic usage
esa "what time is it"
esa +k8s "show pod status"
git diff --staged | esa +commit

Agent Configuration Example#

name = "Kubernetes Command Assistant"
description = "An agent with read-only access to Kubernetes cluster"

system_prompt = """
You are a Kubernetes Command Assistant.
"""

[[functions]]
name = "get_namespaces"
description = "Retrieve all namespaces"
command = "kubectl get namespaces"
safe = true

[[functions]]
name = "get_resources"
command = "kubectl get {{resource}} {{namespace}}"
safe = true

[[functions.parameters]]
name = "resource"
type = "string"
required = true

Typical Use Cases#

  • DevOps/Kubernetes management: esa +k8s "what is the secret value that starts with AUD_"
  • Git workflows: git diff --staged | esa +commit
  • JIRA integration: esa +jira "list all open issues assigned to me"
  • Codebase analysis: Tree-sitter query generation, code search
  • Personal workflows: timezone conversion, system monitoring, web retrieval

Core Value Proposition#

  • Reduced confusion (more precise LLM selection)
  • Better tool invocation (avoid "script guessing")
  • Faster and cheaper (works with small models)
  • Safer autonomy

Requirements#

  • Go 1.23.6+
  • At least one LLM provider API key
  • Configuration path: ~/.config/esa/config.toml

Related Projects

View All arrow_forward

STAY UPDATED

Get the latest AI tools and trends delivered straight to your inbox. No spam, just intelligence.

rocket_launch