# AiWorker Agent Claude Code agent running in Kubernetes pods to autonomously complete development tasks. ## Architecture The agent: - Runs in K8s namespace `agents` - Communicates with backend via MCP protocol - Has access to Git repositories via Gitea - Reports progress and status to backend API ## Local Development This is a containerized agent meant to run in Kubernetes. For local testing: ```bash docker build -t aiworker-agent:local . docker run -it --rm \ -e ANTHROPIC_API_KEY=your_key \ -e BACKEND_URL=http://localhost:3000 \ aiworker-agent:local \ /bin/bash ``` ## Deployment See `k8s/agents/README.md` for deployment instructions. ## MCP Tools The agent uses these MCP tools to communicate with the backend: - `get_next_task` - Get next task from queue - `update_task_status` - Update task state - `create_branch` - Create Git branch for task - `create_pull_request` - Create PR when task is complete - `ask_user_question` - Request user input when needed ## Environment Variables - `ANTHROPIC_API_KEY` - Claude API key - `BACKEND_URL` - Backend API URL - `MCP_SERVER_URL` - MCP server URL - `GITEA_URL` - Gitea URL - `GITEA_TOKEN` - Gitea access token - `POD_NAME` - Pod name (auto-injected by K8s) - `NAMESPACE` - Namespace (auto-injected by K8s)