Getting Started
Prerequisites
Section titled “Prerequisites”- .NET SDK 10 — pinned in
global.json - Docker — the agent spawns executor containers via the Docker API
- A Xians account — get an API key from app.xians.ai
- An Anthropic API key — used by Claude Code inside executor containers
- A GitHub or Azure DevOps PAT — for repo access
1. Clone and Configure
Section titled “1. Clone and Configure”git clone https://github.com/xianix-team/the-agent.gitcd the-agentcp TheAgent/.env.example TheAgent/.envOpen TheAgent/.env and fill in the required values:
# RequiredXIANS_SERVER_URL=https://app.xians.aiXIANS_API_KEY=xns_...ANTHROPIC_API_KEY=sk-ant-...
# Platform tokens — include whichever you needGITHUB_TOKEN=ghp_...# AZURE_DEVOPS_TOKEN=...
# Executor (optional overrides)EXECUTOR_IMAGE=99xio/xianix-executor:latestCONTAINER_MEMORY_MB=1024CONTAINER_CPU_COUNT=1Environment Variable Reference
Section titled “Environment Variable Reference”| Variable | Required | Description |
|---|---|---|
XIANS_SERVER_URL | Yes | Xians platform URL |
XIANS_API_KEY | Yes | API key from Xians Agent Studio |
ANTHROPIC_API_KEY | Yes | Anthropic API key for Claude Code |
GITHUB_TOKEN | Conditional | GitHub PAT. Required for GitHub webhooks. |
AZURE_DEVOPS_TOKEN | Conditional | Azure DevOps PAT. Required for ADO webhooks. |
EXECUTOR_IMAGE | No | Docker image for the executor (default: 99xio/xianix-executor:latest) |
CONTAINER_MEMORY_MB | No | Memory limit per container in MB (default: 1024) |
CONTAINER_CPU_COUNT | No | CPU cores per container (default: 1) |
Multiple Environments
Section titled “Multiple Environments”The agent supports environment-specific .env files via the APP_ENV variable:
APP_ENV=prod dotnet run --project TheAgent/TheAgent.csproj # loads .env.prod2. Run the Agent
Section titled “2. Run the Agent”dotnet run --project TheAgent/TheAgent.csprojA healthy agent prints a banner and starts listening on its workflow queues:
╔══════════════════════════════╗║ The Xianix Agent v1.0 ║╚══════════════════════════════╝✓ Worker listening on queue 'xianix:...:Processing Workflow'✓ Worker listening on queue 'xianix:...:Integrator Workflow'...Running in Docker
Section titled “Running in Docker”docker run --rm \ -v /var/run/docker.sock:/var/run/docker.sock \ --env-file TheAgent/.env \ 99xio/xianix-agent:latestThe Docker socket mount is required — the agent creates executor containers via the Docker API.
3. Verify with a Test Webhook
Section titled “3. Verify with a Test Webhook”With the agent running, simulate a GitHub PR event:
export WEBHOOK_URL=https://app.xians.ai/webhooks/<your-agent-id>./TestScripts/simulate-pr-opened.shYou should see { "status": "success" } for a matching event or { "status": "ignored" } for an unmatched one.
4. Run Tests
Section titled “4. Run Tests”dotnet test TheAgent.Tests/TheAgent.Tests.csprojNext Step
Section titled “Next Step”Now that the agent is running, learn How It Works to understand the webhook-to-container pipeline.