Metadata-Version: 2.4
Name: agentic-factory
Version: 0.1.0
Summary: Infrastructure, container images, and reusable GitHub Actions for autonomous AI agents
License-Expression: MIT
Requires-Python: >=3.12
Requires-Dist: click
Requires-Dist: httpx
Provides-Extra: bot
Requires-Dist: discord-py>=2.3; extra == 'bot'
Description-Content-Type: text/markdown

# agentic-factory

Infrastructure, container images, and reusable GitHub Actions for autonomous AI agents.

## What This Is

A toolbox repo that provides the foundation for running AI agents. Agents themselves live in other repos — this repo builds:

- **Container images** — layered Docker images with common dev tools + AI CLI tools (Claude Code, OpenCode, pi-coding-agent)
- **Shared composite action** — reusable GitHub Action that any agent repo can reference
- **Infrastructure provisioning** — Ansible playbooks for setting up self-hosted runners on Hetzner Cloud or MacBook
- **Agent tooling** — Python package with CLI tools for agent communication (Discord notifications, etc.)

## Quick Start

### Using the Container Images

```yaml
# In your agent repo's workflow:
jobs:
  agent:
    runs-on: [self-hosted, claude-agent]
    container:
      image: ghcr.io/ondrasek/agent-runtime-claude:latest
      env:
        CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
    steps:
      - uses: actions/checkout@v4
      - uses: ondrasek/agentic-factory/.github/actions/run-agent@main
        with:
          tool: claude-code
          prompt: "Review this PR for issues"
          post-to: pr
          post-number: ${{ github.event.pull_request.number }}
```

### Available Images

| Image | Description |
|---|---|
| `ghcr.io/ondrasek/agent-runtime-base` | Ubuntu 24.04 + Python, Node.js, git, gh, uv |
| `ghcr.io/ondrasek/agent-runtime-claude` | Base + Claude Code CLI |
| `ghcr.io/ondrasek/agent-runtime-opencode` | Base + OpenCode CLI |
| `ghcr.io/ondrasek/agent-runtime-pi` | Base + pi-coding-agent |

### Discord Notifications

Agents can post to Discord using the `af-discord` CLI (included in all images):

```bash
af-discord send --channel agent-results "Code review complete for PR #42"
af-discord send --channel agent-results --title "Agent: Reviewer" --status success "LGTM"
```

## Development

```bash
uv sync
uv run pytest
uv run ruff check .
```

## License

MIT
