Metadata-Version: 2.4
Name: ninetrix
Version: 0.2.1
Summary: CLI for building and deploying AI agents as containers
License: Apache-2.0
Keywords: ai,agents,cli,docker,automation
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: click>=8.1
Requires-Dist: rich>=13.7
Requires-Dist: pyyaml>=6.0
Requires-Dist: jinja2>=3.1
Requires-Dist: docker>=7.0
Requires-Dist: mcp>=1.0
Requires-Dist: pydantic>=2.0
Requires-Dist: psycopg[binary]>=3.0
Requires-Dist: httpx>=0.27
Requires-Dist: InquirerPy>=0.3
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"

# ninetrix

Build and deploy AI agents as Docker containers. Define your agent in YAML, ship it anywhere Docker runs.

```bash
pip install ninetrix
```

---

## Quickstart

```bash
# Scaffold a new agent
ninetrix init --name my-agent --provider anthropic

# Build the container image
ninetrix build --file ninetrix.yaml

# Run it interactively
ninetrix run --file ninetrix.yaml
```

## Multi-agent crews

```bash
# Start all agents on a shared Docker network
ninetrix up --file ninetrix.yaml

# Trigger the orchestrator
ninetrix invoke --agent orchestrator -m "Research Python history and write a summary"

# Stream logs from all agents
ninetrix logs --file ninetrix.yaml

# Visualize the execution trace
ninetrix trace --thread-id <id>

# Tear down
ninetrix down --file ninetrix.yaml
```

## ninetrix.yaml

```yaml
agents:
  orchestrator:
    metadata:
      role: "Research Orchestrator"
      goal: "Coordinate search and synthesis"
    runtime:
      provider: anthropic
      model: claude-sonnet-4-6
    tools:
      - { name: search, source: mcp://duckduckgo }
    collaborators: [researcher, writer]
    governance:
      max_budget_per_run: 1.00
      human_approval: true
    triggers:
      - type: webhook
        endpoint: /run

  researcher:
    runtime: { model: claude-haiku-4-5-20251001 }
    tools:
      - { name: search, source: mcp://duckduckgo }
      - { name: files,  source: mcp://filesystem }

  writer:
    runtime: { model: claude-sonnet-4-6, temperature: 0.7 }
    tools:
      - { name: files, source: mcp://filesystem }
```

## Commands

| Command | Description |
|---|---|
| `ninetrix init` | Scaffold a new `ninetrix.yaml` |
| `ninetrix build` | Build container images |
| `ninetrix run` | Run a single agent interactively |
| `ninetrix up` | Start all agents on a Docker bridge network |
| `ninetrix down` | Stop and remove all crew containers |
| `ninetrix status` | Show running agent containers |
| `ninetrix logs` | Stream logs from all agents |
| `ninetrix invoke` | POST a message to a running agent |
| `ninetrix trace` | Render a multi-agent execution tree |
| `ninetrix mcp list` | List available MCP tool servers |

## Environment variables

| Variable | Description |
|---|---|
| `ANTHROPIC_API_KEY` | Anthropic API key |
| `OPENAI_API_KEY` | OpenAI API key |
| `DATABASE_URL` | PostgreSQL URL for persistence |
| `ninetrix_PROVIDER` | Override model provider at runtime |
| `ninetrix_MODEL` | Override model at runtime |

## Requirements

- Python 3.10+
- Docker

## License

MIT
