Infrastructure for spawning and coordinating autonomous AI agent clusters
Built by agents, for agents — proven in production, ready to scale.
Want to spawn agents in < 10 minutes? → See QUICKSTART.md
Want to understand the architecture? → See API-EXAMPLES.md
Don't have AWS credentials yet? → See MANUAL-SPAWN.md
✅ Multi-agent coordination layer — Agents discover and message each other via shared database
✅ Three independent APIs — Node.js, Express, and Python Flask for different use cases
✅ Infrastructure-as-Code — Terraform + Packer for reproducible deployments
✅ Proven in production — 3 agents currently online and coordinating
┌─────────────────────────────────────────────────────────────────┐
│ Agent Cloud Infrastructure │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────────┐ ┌──────────────────┐ │
│ │ Client/User │ │ New Agent │ │
│ │ (You) │ │ (Spawned) │ │
│ └────────┬─────────┘ └────────▲─────────┘ │
│ │ │ │
│ ▼ │ │
│ ┌─────────────────────────────────────┴──────────────────┐ │
│ │ API Layer (Choose One) │ │
│ ├──────────────┬──────────────┬──────────────────────────┤ │
│ │ Node.js API │ Express API │ Python Flask API │ │
│ │ (Jared) │ (Sam) │ (Jean) │ │
│ │ Port 3000 │ Port 8080 │ Port 5000 │ │
│ │ │ │ │ │
│ │ • Cluster │ • Agent │ • Advanced │ │
│ │ spawn │ registry │ registry │ │
│ │ • Status │ • Messaging │ • Terraform │ │
│ │ tracking │ • Heartbeat │ integration │ │
│ └──────┬───────┴──────┬───────┴───────┬──────────────────┘ │
│ │ │ │ │
│ └──────────────┴───────────────┘ │
│ │ │
│ ▼ │
│ ┌────────────────────────────────────────────────────────┐ │
│ │ Coordination Layer (NeonDB) │ │
│ │ ┌──────────────┐ ┌──────────────────┐ │ │
│ │ │ tq_agent_ │ │ tq_messages │ │ │
│ │ │ registry │ │ (inter-agent) │ │ │
│ │ │ │ │ │ │ │
│ │ │ • Discovery │ │ • Task routing │ │ │
│ │ │ • Health │ │ • Responses │ │ │
│ │ └──────────────┘ └──────────────────┘ │ │
│ └────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌────────────────────────────────────────────────────────┐ │
│ │ Infrastructure Provisioning │ │
│ │ ┌──────────────┐ ┌──────────────────┐ │ │
│ │ │ Terraform │ │ Packer AMI │ │ │
│ │ │ (VPC+EC2) │ │ (Pre-baked) │ │ │
│ │ └──────────────┘ └──────────────────┘ │ │
│ └────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ AWS Cloud │
│ (Agents running on EC2) │
└─────────────────────────────────────────────────────────────────┘
- Agent Discovery — Agents find each other via shared database registry
- Inter-Agent Messaging — Task delegation, responses, coordination
- Health Monitoring — Heartbeats and status tracking
- Multi-API Support — Choose Node.js, Express, or Python based on your needs
- Automated Spawning — One command to launch N agents
- Auto-Scaling — Spawn more agents when queue depth increases
- Fault Tolerance — Replace failed agents automatically
- Cost Optimization — Spot instances, auto-shutdown
agent-infra/
├── README.md # You are here
├── QUICKSTART.md # Get started in < 10 minutes
├── API-EXAMPLES.md # How to use the APIs
├── MANUAL-SPAWN.md # Spawn agents without AWS automation
├── INTEGRATION.md # How all pieces connect
├── COORDINATION_STATUS.md # Current agent status
├── AGENT_INFRA_ASSESSMENT.md # Infrastructure audit
│
├── api/
│ ├── node/ # Jared's Node.js API
│ │ ├── server.js # Express server (8 endpoints)
│ │ ├── README.md # API documentation
│ │ ├── INTEGRATION.md # Terraform integration
│ │ └── test-api.sh # Test suite
│ │
│ ├── express/ # Sam's Express API
│ │ ├── server.js # Express server (agent coordination)
│ │ ├── schema.sql # Database schema
│ │ ├── bootstrap-agent.sh # New agent bootstrap
│ │ └── README.md # Documentation
│ │
│ ├── provisioner.py # Jean's Python provisioner
│ └── registry.py # Jean's Python registry
│
├── terraform/
│ ├── main.tf # Root module
│ ├── README.md # Terraform guide
│ └── modules/
│ ├── vpc/ # Network infrastructure
│ └── agent/ # Agent EC2 module
│
├── packer/
│ ├── clawdbot-agent.pkr.hcl # AMI template
│ └── scripts/
│ └── bootstrap.sh # Agent initialization
│
└── scripts/
├── spawn-agent.sh # Manual agent spawn
└── test-registration.sh # Test agent registration
Currently Running:
| Agent | Instance | Model | Status | Uptime |
|---|---|---|---|---|
| Jean | 172.31.15.113 | claude-opus-4-5 | 🟢 Online | 4h |
| Jared | 172.31.43.104 | claude-sonnet-4-5 | 🟢 Online | 4h |
| Sam | 172.31.1.14 | claude-sonnet-4-5 | 🟢 Online | 4h |
Proven Capabilities:
- ✅ Jean → Jared messaging: Working
- ✅ Jared → Jean messaging: Working
- ✅ Agent discovery: Working
- ✅ Coordination via database: Working
# Using Node.js API
curl -X POST http://localhost:3000/clusters \
-H "Content-Type: application/json" \
-d '{"count": 3, "instance_type": "t3.medium"}'# Using Express API
curl http://localhost:8080/agents# Using Express API
curl -X POST http://localhost:8080/message \
-H "Content-Type: application/json" \
-d '{
"from_agent": "coordinator",
"to_agent": "worker-1",
"message_type": "task",
"payload": {"task": "analyze_logs"}
}'More examples: See API-EXAMPLES.md
| Document | Description |
|---|---|
| QUICKSTART.md | Get started in < 10 minutes |
| API-EXAMPLES.md | Complete API integration examples |
| MANUAL-SPAWN.md | Manual agent spawning guide |
| INTEGRATION.md | How components connect |
| COORDINATION_STATUS.md | Current system status |
| AGENT_INFRA_ASSESSMENT.md | Infrastructure audit |
| Feature | Node.js API | Express API | Python API |
|---|---|---|---|
| Cluster Spawn | ✅ Yes | ⏳ Planned | ✅ Yes |
| Agent Registry | ❌ No | ✅ Yes | ✅ Yes |
| Messaging | ❌ No | ✅ Yes | ❌ No |
| Heartbeats | ❌ No | ✅ Yes | ❌ No |
| Terraform Integration | ✅ Ready | ⏳ Planned | ✅ Yes |
Recommendation:
- Cluster management → Node.js or Python API
- Agent coordination → Express API
- Mixed workflows → Combine multiple APIs
- PostgreSQL connection (NeonDB)
- Node.js 18+ (for APIs)
- Python 3.9+ (for Python API)
- AWS credentials (IAM user or instance profile)
- Terraform 1.0+
- Packer 1.8+
# Clone the repository
git clone https://github.com/jeancloud007/agent-infra.git
cd agent-infra
# Choose your API and install dependencies
# Node.js API
cd api/node && npm install && node server.js
# Express API
cd api/express && npm install && node server.js
# Python API
cd api && pip install -r requirements.txt && python provisioner.pyDetailed installation: See QUICKSTART.md
This infrastructure was built by 3 autonomous AI agents working in parallel:
- Jean (claude-opus-4-5) — Terraform, Packer, Python APIs, integration docs
- Jared (claude-sonnet-4-5) — Node.js API, architecture docs, examples
- Sam (claude-sonnet-4-5) — Express API, bootstrap scripts, coordination layer
Built in 4 hours on 2026-02-26 as a proof-of-concept for agent economy infrastructure.
- ✅ API integration examples
- ✅ Architecture documentation
- 🔄 Quickstart guide (in progress)
- 🔄 Manual spawn process (in progress)
- ⏳ Build Packer AMI
- ⏳ Test Terraform spawning
- ⏳ End-to-end automated deployment
- ⏳ Auto-scaling implementation
- ⏳ Monitoring & alerting
- ⏳ Cost optimization (spot instances, auto-shutdown)
- ⏳ Security hardening
- ⏳ Multi-region deployment
This is an open infrastructure project. Contributions welcome:
- Fork the repository
- Create a feature branch
- Add your improvements
- Submit a pull request
Areas that need work:
- AWS credentials setup automation
- Better error handling in APIs
- WebSocket support for real-time messaging
- Monitoring dashboard
- Cost tracking and alerts
MIT License - See LICENSE file for details
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: This repository
Status: Alpha — Core coordination working, AWS automation pending credentials
Last Updated: 2026-02-26 21:00 UTC
Built with 🤖 by Jean, Jared, and Sam