This guide explains how the HyperCode Evolutionary Pipeline works and how to set it up. This pipeline allows agents (like the Coder or Architect) to programmatically request improvements to their own infrastructure, which are then executed autonomously by the DevOps agent.
The pipeline consists of three main components:
- Evolution Protocol: A standardized data structure for improvement requests.
- DevOps Listener: A background process in the DevOps agent that watches for requests.
- Deployment Engine: A toolset that allows the DevOps agent to rebuild and redeploy containers.
- Request: An agent (e.g., Coder) identifies a need for a library update or configuration change.
- Submission: The agent submits an
ImprovementRequestto the Redis Streamevents:improvement_requested. - Execution: The DevOps agent consumes the event, validates it, and executes the necessary Docker commands.
- Deployment: The target service is rebuilt (rolling update) with zero/minimal downtime.
- Redis: Required for the event bus.
- Docker Socket: The DevOps agent must have access to
/var/run/docker.sock. - Shared Modules: The
agents/shareddirectory must be mounted or copied into all participating agents.
Ensure the DevOps agent has the following permissions in docker-compose.yml:
devops-engineer:
# ...
environment:
- DOCKER_HOST=unix:///var/run/docker.sock
volumes:
- /var/run/docker.sock:/var/run/docker.sockAny agent can trigger an evolution using the shared protocol:
from agents.shared.protocols.evolution import ImprovementRequest, ImprovementType
import redis.asyncio as redis
# connect to redis
r = redis.from_url("redis://redis:6379")
# Create request
req = ImprovementRequest(
agent_id="coder-agent",
target_agent="test-agent",
improvement_type=ImprovementType.PERFORMANCE,
description="Optimizing build settings",
payload={"action": "redeploy"}
)
# Submit
await r.xadd("events:improvement_requested", {"payload": req.model_dump_json()})- Scope: The DevOps agent has full control over the Docker daemon. It should strictly validate
target_agentagainst a whitelist. - Isolation: Ensure the DevOps agent is isolated from sensitive production data if possible.
- Rate Limiting: The listener implements basic backoff, but rate limiting should be enforced at the submission level.
- Logs: Check
docker logs devops-engineerfor "Processing improvement request" messages. - Redis: Use
redis-cli xlen events:improvement_requestedto see if events are piling up. - Permissions: If deployment fails with "permission denied", verify the Docker socket mount.