Version 0.1.0 | Status: Beta
π Quick Links: Agent Guide | Testing | FAQ | Troubleshooting | Examples
Complete autonomous agent communication system for Claude Code with automatic message processing and background monitoring.
New to AEA? Start here:
- Agent Guide - Learn when to auto-process vs ask for approval
- Testing Guide - Verify AEA is working correctly
- Examples - See real-world scenarios
Key points:
- β Auto-process questions, updates, responses with normal/low priority
β οΈ Ask user for urgent messages, handoffs, or code changes- π‘οΈ Safety first - when in doubt, ask the user
curl -fsSL https://raw.githubusercontent.com/openSVM/aea/main/install.sh | bashThat's it! The installer automatically:
- β Downloads all required files from GitHub
- β
Creates
.aea/directory structure - β Sets up Claude Code integration
- β Configures automatic message checking
Note: This requires bash. If you only have sh, use the manual method below.
# Clone the repository
git clone https://github.com/openSVM/aea
cd aea
# Run the local installer
bash scripts/install-aea.sh /path/to/your/projectπ Read the full installation guide β
The installation creates:
.aea/- Complete AEA system with scripts and configuration.claude/settings.json- Hooks for automatic message processing.claude/commands/aea.md-/aeaslash command~/.config/aea/agents.yaml- Agent registry (auto-initialized)- Updates
CLAUDE.mdwith AEA integration instructions
- bash 4.0+
- jq - For JSON processing (install:
apt-get install jqorbrew install jq) - Claude Code - This protocol is designed for Claude Code agents
After installation, your repository is:
- β
Registered in the agent registry (
~/.config/aea/agents.yaml) - β Ready to send messages to other agents
- β Automatically processing incoming messages via hooks
- β
Configured with the
/aeaslash command
To register other repositories for messaging:
bash .aea/scripts/aea-registry.sh register agent-name /path/to/repo "Description"To upgrade an existing AEA installation:
# From repository root
bash .aea/aea.sh upgrade
# Or from .aea directory
cd .aea
bash aea.sh upgradeWhat gets updated:
- β Documentation (all docs/*.md files)
- β Scripts (all operational scripts)
- β Prompts (all prompts/*.md files)
- β Protocol specification (PROTOCOL.md)
What's preserved:
- β Your configuration (agent-config.yaml)
- β Your messages (message-*.json files)
- β Processing history (.processed/ directory)
- β Activity logs (agent.log)
Automatic backup:
- Backup created at
.aea/.backup-{timestamp}/ - Rollback command shown in upgrade output
This system enables fully autonomous inter-agent communication with:
β Automatic checking on every user message / AI response / task completion β Configuration-driven policies for autonomous decision-making β Background monitoring service for continuous operation β PID management with health checks and graceful failover β Multi-project support via centralized configuration β¨ GitHub Issues integration - automatically checks relevant issues based on your work context
/aeaOr from command line:
bash .aea/scripts/aea-check.shbash .aea/scripts/aea-monitor.sh startWhat this does:
- β
Auto-registers current directory to
~/.config/aea/projects.yaml - β Checks for existing monitor (PID healthcheck)
- β Starts new background service if needed
- β Monitors every 5 minutes for new messages
bash .aea/scripts/aea-monitor.sh statusbash .aea/scripts/aea-monitor.sh stopThis example shows the complete autonomous flow between two repositories.
# Install AEA in backend repo
cd ~/projects/backend
bash /path/to/aea/scripts/install-aea.sh
# β
Auto-registers as "claude-backend"
# Install AEA in frontend repo
cd ~/projects/frontend
bash /path/to/aea/scripts/install-aea.sh
# β
Auto-registers as "claude-frontend"# From either repo, check the registry
bash .aea/scripts/aea-registry.sh list
# Output:
# Agent: claude-backend
# Path: /home/user/projects/backend
# Enabled: true
#
# Agent: claude-frontend
# Path: /home/user/projects/frontend
# Enabled: trueFrom backend, ask frontend about API endpoints:
cd ~/projects/backend
bash .aea/scripts/aea-send.sh \
--to claude-frontend \
--type question \
--subject "API endpoints" \
--message "What API endpoints consume the user authentication service?" \
--priority normalOutput:
β
Message delivered!
From: claude-backend
To: claude-frontend
Message file: /home/user/projects/frontend/.aea/message-....json
The frontend repo's hooks automatically:
- Detect the message (SessionStart or Stop hook fires)
- Validate JSON structure
- Classify as simple question
- Extract search terms: "endpoints consume user authentication service"
- Search codebase for matching files
- Generate response with findings
- Send response back to backend
- Mark original message as processed
All without human intervention! β‘
Back in backend repo:
cd ~/projects/backend
# List responses
ls .aea/message-*-from-claude-frontend.json
# Read the response
cat .aea/message-*-from-claude-frontend.json | jq -r '.message.body'Example Response:
Auto-search results for: endpoints consume user authentication service
Files matching 'authentication':
./src/api/auth.ts
./src/api/user-service.ts
Files containing 'authentication service':
./src/api/auth.ts
./src/api/routes/login.ts
---
This response was automatically generated by searching the codebase.
If you need more detailed analysis, please ask again with more context.
β Cross-repo messaging - Message automatically delivered via registry β Autonomous detection - Hooks fired without manual trigger β Smart classification - Identified as simple, auto-processable query β Automatic processing - Searched and responded without asking β Response delivery - Answer sent back automatically
No human typed anything except the initial question!
If you ask something complex, like:
bash .aea/scripts/aea-send.sh \
--to claude-frontend \
--type request \
--subject "Refactoring request" \
--message "Please refactor the authentication module to use OAuth2"The auto-processor will:
- Classify as "request" (code changes)
- Escalate to Claude with message:
β οΈ Message requires review: message-....json Type: request | Priority: normal From: claude-backend Subject: Refactoring request Use /aea to process this message
Safe escalation for risky operations! β
.aea/
βββ README.md # This file
βββ agent-config.yaml # Response policies and agent configuration
βββ agent-launcher.md # Usage documentation
βββ docs/aea-rules.md # Complete AEA protocol specification
βββ PROTOCOL.md # Technical protocol details
βββ agent.log # Agent activity log
β
βββ prompts/
β βββ check-messages.md # Prompt template for message checking
β
βββ scripts/
β βββ aea-check.sh # Manual message check script
β βββ aea-monitor.sh # Background monitoring daemon
β
βββ message-*.json # Incoming messages
βββ .processed/
βββ message-*.json # Processed message markers
AEA uses two methods for automatic checking:
After installation, AEA configures hooks in .claude/settings.json:
{
"hooks": {
"SessionStart": {
"command": "bash .aea/scripts/aea-check.sh",
"description": "Check for new AEA messages on session start",
"enabled": true
},
"UserPromptSubmit": {
"command": "bash .aea/scripts/aea-check.sh",
"description": "Check for AEA messages before processing user prompt",
"enabled": true
},
"Stop": {
"command": "bash .aea/scripts/aea-check.sh",
"description": "Check for AEA messages after task completion",
"enabled": true
}
}
}How it works:
- β SessionStart: Checks for messages when Claude Code starts
- β UserPromptSubmit: Checks before processing every user message
- β Stop: Checks after completing tasks
- β
Completely automatic - no manual
/aeaneeded! - β Hook output visible to Claude - messages are processed automatically
To disable automatic checking, edit .claude/settings.json:
{
"hooks": {
"SessionStart": { "enabled": false },
"UserPromptSubmit": { "enabled": false },
"Stop": { "enabled": false }
}
}The CLAUDE.md file includes:
### **π€ AUTOMATIC MESSAGE CHECKING**
**CRITICAL: Check for AEA messages on EVERY interaction:**
1. **On EVERY user message** - Check for new messages at start of processing
2. **After completing ANY task** - Check if new messages arrived
3. **When AI finishes responding** - Check before ending turnThis method relies on Claude following CLAUDE.md guidance. Hooks (Method 1) are more reliable.
User Message
β
Hook fires: UserPromptSubmit
β
Automatic check: bash .aea/scripts/aea-check.sh
β
Messages found? β Yes β Claude sees output and processes
β No β Continue normal operation
β
Process user request
β
Hook fires: Stop β Check again
β
Respond to user
Defined in agent-config.yaml:
| Message Type | Priority | Action | Approval Needed? |
|---|---|---|---|
| question | any | Auto-respond with technical answer | β No |
| update | normal | Auto-acknowledge if needed | β No |
| update | high/urgent | Summarize and inform user | β No |
| issue | low/medium | Auto-analyze and suggest fix | β No |
| issue | high/urgent | Notify user and wait | β Yes |
| handoff | any | Review and request approval | β Yes |
| request | any | Evaluate and respond with plan |
- β Read files
- β Search codebase
- β Analyze code
- β Answer technical questions
- β Generate documentation
- β Create response messages
- β Code changes
- β Configuration modifications
- β Deployment actions
- β Security-related changes
~/.config/aea/projects.yaml β Central configuration
β
aea-monitor.sh (daemon)
β
Checks every 5 minutes
β
For each registered project:
1. Check .aea/message-*.json
2. Find unprocessed messages
3. Log to .aea/agent.log
4. (Future) Trigger Claude via API
When you run aea-monitor.sh start:
# Pseudo-code
if current_dir not in projects.yaml:
add_current_dir_to_yaml()
existing_pid = get_pid_from_yaml(current_dir)
if existing_pid exists:
health_status = send_healthcheck(existing_pid)
if health_status == "OK":
print("Existing monitor is healthy")
shutdown_self() # Don't start duplicate
else:
kill(existing_pid, SIGTERM) # Graceful shutdown
wait_or_force_kill()
start_new_monitor()
else:
start_new_monitor()
# Save our PID to yaml
update_yaml(current_dir, our_pid)- Monitor receives SIGUSR1 (health check signal)
- If process alive β Returns OK
- If process dead/hanging β Returns ERROR
- Caller takes action based on response
Location: ~/.config/aea/projects.yaml
version: "1.0"
check_interval_default: 300 # 5 minutes
projects:
- name: "this-repo"
path: "/path/to/this-repo"
enabled: true
check_interval: 300
job_pid: 12345
agent_id: "claude-aea"
last_check: "2025-10-14T14:30:00Z"
- name: "other-repo"
path: "/path/to/other-repo"
enabled: true
check_interval: 300
job_pid: 12346
agent_id: "claude-agent-1"
last_check: "2025-10-14T14:30:00Z"- Daemon logs:
~/.config/aea/monitor.log - Project logs:
.aea/agent.log(per project)
Incoming: .aea/message-20251014T143000Z-from-claude-agent-1.json
{
"message_type": "question",
"priority": "normal",
"requires_response": true,
"from": {"agent_id": "claude-agent-1"},
"message": {
"subject": "Batch size for 50k updates/sec?",
"question": "What's the optimal batch_size?"
}
}Claude's Autonomous Action:
- β Reads message (automatic via CLAUDE.md instruction)
- β
Determines:
question+normalβ Auto-respond (no approval) - β
Searches
CLAUDE.md:450-470for performance data - β Generates technical answer with code references
- β
Creates response:
/path/to/other-repo/.aea/message-{timestamp}-from-claude-aea.json - β
Marks original as processed:
.aea/.processed/message-20251014T143000Z-from-claude-agent-1.json - β
Logs action to
.aea/agent.log
User sees: "β Processed 1 message: answered technical question from claude-agent-1"
Incoming: .aea/message-20251014T150000Z-from-claude-agent-1.json
{
"message_type": "issue",
"priority": "high",
"from": {"agent_id": "claude-agent-1"},
"message": {
"issue_description": "Memory leak in batch processing",
"severity": "high"
}
}Claude's Autonomous Action:
- β Reads message
- β
Determines:
issue+highβ Require approval - β Notifies user:
π¨ High priority issue reported by claude-agent-1
Issue: Memory leak in batch processing
Severity: high
Should I:
1. Analyze and propose a fix?
2. Forward to you for investigation?
3. Ignore (mark as processed)?
- β³ Waits for user response
- β After approval: Searches codebase, analyzes, sends response
- Agent ID:
claude-aea - Role: Redis Orderbook Module Developer
- Monitors:
/path/to/this-repo/.aea/ - Can auto-respond about:
- Redis commands
- Performance tuning
- Integration help
- API documentation
- Build issues
- Agent ID:
claude-agent-1 - Role: Data Pipeline Integration Engineer
- Monitors:
/path/to/other-repo/.aea/ - Integration topics:
- OrderbookSaver usage
- Batch configuration
- Performance optimization
- Error troubleshooting
other-repo agent repo-a agent
β β
Has question Auto-checks .aea/
β β
Creates message Finds message
β β
Saves to: Reads message
repo-a/.aea/ β
β Applies policy
β β
βββββββββββββββββ Sends response
β
Receives answer
# Via slash command (in Claude)
/aea
# Via script
bash .aea/scripts/aea-check.sh
# Check what would be processed
ls -1t .aea/message-*.json | while read msg; do
[ -f ".aea/.processed/$(basename $msg)" ] || echo "Unprocessed: $msg"
done# Start monitoring
bash .aea/scripts/aea-monitor.sh start
# Check status
bash .aea/scripts/aea-monitor.sh status
# Stop monitoring
bash .aea/scripts/aea-monitor.sh stop
# View logs
tail -f ~/.config/aea/monitor.log
tail -f .aea/agent.log# View projects
cat ~/.config/aea/projects.yaml
# View agent config
cat .aea/agent-config.yaml
# View processing log
cat .aea/agent.log# Ubuntu/Debian
sudo apt-get install jq
# macOS
brew install jq
# Or download from: https://stedolan.github.io/jq/download/# Verify auto-processor exists
ls .aea/scripts/aea-auto-processor.sh
# If missing, re-install from source with latest version
bash /path/to/aea/scripts/install-aea.sh# 1. Check agent registry
bash .aea/scripts/aea-registry.sh list
# 2. Verify destination agent exists
bash .aea/scripts/aea-registry.sh get-path target-agent-name
# 3. Check destination has .aea/ directory
ls /path/to/destination/.aea/
# 4. Manually register if needed
bash .aea/scripts/aea-registry.sh register agent-name /path/to/repo "Description"# Initialize registry
bash .aea/scripts/aea-registry.sh init
# Register current repo
bash .aea/scripts/aea-registry.sh register-current# 1. Check hooks are configured
cat .claude/settings.json
# Should show:
# "SessionStart": { "command": "bash .aea/scripts/aea-auto-processor.sh" }
# "Stop": { "command": "bash .aea/scripts/aea-auto-processor.sh" }
# 2. Test auto-processor manually
bash .aea/scripts/aea-auto-processor.sh
# 3. Check for errors
tail -20 .aea/agent.log# This is normal for:
# - Complex questions (requires code analysis)
# - High/urgent priority messages
# - Code change requests
# - Handoffs
# Simple queries should auto-process:
# - "What files contain X?"
# - "Where is Y?"
# - Status updates# Normal behavior - prevents Claude Code from hanging
# Max 10 messages per hook invocation
# Remaining messages processed on next hook trigger
# If you have many messages, process manually:
bash .aea/scripts/aea-auto-processor.sh# Check if monitor is running
bash .aea/scripts/aea-monitor.sh status
# Manually trigger check
bash .aea/scripts/aea-check.sh
# Check logs
tail -20 .aea/agent.log# Check for zombie processes
ps aux | grep aea-monitor
# Force kill old monitors
pkill -f aea-monitor.sh
# Remove stale PID from config
nano ~/.config/aea/projects.yaml
# Set job_pid to null
# Try starting again
bash .aea/scripts/aea-monitor.sh start# Check if monitor PID exists
ps -p <PID>
# Check monitor logs
tail -50 ~/.config/aea/monitor.log
# Restart monitor
bash .aea/scripts/aea-monitor.sh stop
bash .aea/scripts/aea-monitor.sh start- Agent Guide β - How to use AEA autonomously and safely
- Testing Guide - Verify AEA is working
- Examples - Real-world scenarios and workflows
- FAQ - Frequently asked questions
- Troubleshooting - Common issues and solutions
- Installation Guide - Detailed installation instructions
- Quick Start - Get started in 10 seconds
- Architecture - How AEA works internally
- Protocol Specification - Message format and schema (v0.1.0)
- Security - Security considerations
- GitHub Integration - GitHub Issues integration
- Global Command - Global 'a' command setup
- AEA Rules - Complete protocol rules
agent-config.yaml- Response policies and configuration.claude/settings.json- Hook configuration~/.config/aea/agents.yaml- Agent registry
You now have a fully autonomous agent system that:
- β Auto-checks for messages on every interaction
- β Auto-responds to safe messages (questions, updates)
- β Requests approval for risky operations
- β Background monitors for continuous operation
- β Manages PIDs with health checks
- β Multi-project support via central config
Just run and forget:
bash .aea/scripts/aea-monitor.sh startYour agents will communicate autonomously! π€π
We'd love to hear from you! Here's how to get help or contribute:
Before creating an issue, please check:
- FAQ - Common questions
- Troubleshooting - Fix common problems
- Existing Issues - See if it's already reported
Want to contribute code or documentation? See CONTRIBUTING.md