Skip to content

Getting Started

  • .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
Terminal window
git clone https://github.com/xianix-team/the-agent.git
cd the-agent
cp TheAgent/.env.example TheAgent/.env

Open TheAgent/.env and fill in the required values:

# Required
XIANS_SERVER_URL=https://app.xians.ai
XIANS_API_KEY=xns_...
ANTHROPIC_API_KEY=sk-ant-...
# Platform tokens — include whichever you need
GITHUB_TOKEN=ghp_...
# AZURE_DEVOPS_TOKEN=...
# Executor (optional overrides)
EXECUTOR_IMAGE=99xio/xianix-executor:latest
CONTAINER_MEMORY_MB=1024
CONTAINER_CPU_COUNT=1
VariableRequiredDescription
XIANS_SERVER_URLYesXians platform URL
XIANS_API_KEYYesAPI key from Xians Agent Studio
ANTHROPIC_API_KEYYesAnthropic API key for Claude Code
GITHUB_TOKENConditionalGitHub PAT. Required for GitHub webhooks.
AZURE_DEVOPS_TOKENConditionalAzure DevOps PAT. Required for ADO webhooks.
EXECUTOR_IMAGENoDocker image for the executor (default: 99xio/xianix-executor:latest)
CONTAINER_MEMORY_MBNoMemory limit per container in MB (default: 1024)
CONTAINER_CPU_COUNTNoCPU cores per container (default: 1)

The agent supports environment-specific .env files via the APP_ENV variable:

Terminal window
APP_ENV=prod dotnet run --project TheAgent/TheAgent.csproj # loads .env.prod
Terminal window
dotnet run --project TheAgent/TheAgent.csproj

A 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'
...
Terminal window
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
--env-file TheAgent/.env \
99xio/xianix-agent:latest

The Docker socket mount is required — the agent creates executor containers via the Docker API.

With the agent running, simulate a GitHub PR event:

Terminal window
export WEBHOOK_URL=https://app.xians.ai/webhooks/<your-agent-id>
./TestScripts/simulate-pr-opened.sh

You should see { "status": "success" } for a matching event or { "status": "ignored" } for an unmatched one.

Terminal window
dotnet test TheAgent.Tests/TheAgent.Tests.csproj

Now that the agent is running, learn How It Works to understand the webhook-to-container pipeline.