docs
Quick Start
Build and run your first AI agent in 5 minutes.
Install the CLI
curl -fsSL https://install.ninetrix.io | sh
The install script auto-detects pipx, uv, or pip3 and picks the best option. Or install manually:
# or manually:
pip install ninetrix
# or:
uv tool install ninetrix
ninetrix --version
Start the local stack
ninetrix dev starts PostgreSQL and the API server (including the observability dashboard) in Docker. The MCP gateway and worker are opt-in — pass --mcp to include them.
ninetrix dev
The dashboard is available at http://localhost:8000/dashboard. Leave this running in the background.
Scaffold a new agent
ninetrix init --name my-agent --provider anthropic --yes
This creates agentfile.yaml in the current directory. In interactive mode (without --yes), it prompts for your API key and saves it to .env automatically.
# If you used --yes, create .env manually:
echo "ANTHROPIC_API_KEY=sk-ant-..." > .env
Review agentfile.yaml
The scaffolded file defines a single agent with a web search tool:
agents:
my-agent:
metadata:
role: Research assistant
goal: Answer questions accurately using web search
instructions: |
Search the web to find accurate, up-to-date information.
Always cite your sources.
runtime:
provider: anthropic
model: claude-sonnet-4-6
temperature: 0.3
tools:
- name: web_search
source: mcp://brave-search
Need system packages (e.g. git, ffmpeg, chromium) in the container? Add a packages list under the agent:
agents:
my-agent:
packages:
- git
- ffmpeg
Build and run
ninetrix build
ninetrix run
Type a message at the prompt. Your agent will search the web and respond. Open the dashboard to see the full trace.
What just happened?
ninetrix buildrendered your YAML into a Dockerfile + Python runtime and built a Docker image taggedninetrix/my-agent:latestninetrix runstarted the container, connected it to your local API server, and streamed its output to your terminal- Every tool call and LLM response was checkpointed to PostgreSQL
- The dashboard at localhost:8000/dashboard shows the full trace
Resume a session
Every run has a thread ID. Pass --thread-id to resume exactly where you left off:
ninetrix run --thread-id my-project
Next steps
- MCP Tools — add GitHub, Slack, filesystem tools
- Multi-Agent — build a crew of specialized agents
- Persistence — session memory, crash recovery, and automatic checkpointing
- Human-in-the-Loop — gate tool calls on human approval