Skip to main content

An intelligent DevOps agent with BYOK for managing cloud infrastructure

Project description

Xerxes

An intelligent DevOps agent with unrestricted CLI access and free-form reasoning

License: MIT Python 3.10+ Code style: black

FeaturesInstallationQuick StartDocumentationContributing


Overview

Xerxes is a command-line AI agent that transforms natural language into DevOps operations. Unlike traditional tools with predefined commands, Xerxes uses free-form thinking to execute any command supported by your installed CLI tools (AWS, GCP, Kubernetes, Docker).

Features

Core Capabilities

  • Unrestricted CLI Access: Execute ANY command from AWS CLI, gcloud, kubectl, or docker
  • Free-Form Thinking: LLM reasons about your request and forms optimal commands
  • Interactive Approval: See command + reasoning before execution
    • [R]un - Execute this command
    • [S]kip - Skip and continue
    • [A]lways - Auto-approve for session
  • Bring Your Own Key (BYOK): Use your own Vertex AI credentials
  • Multi-Cloud Support: AWS, GCP, Kubernetes, Docker in one interface
  • Safety Mechanisms: Automatic detection of destructive operations

Installation

Using UV (Recommended)

uv tool install xerxes

From Source

git clone https://github.com/shammianand/xerxes.git
cd xerxes
uv sync

Quick Start

1. Prerequisites

  • Python 3.10+
  • GCP Project with Vertex AI API enabled
  • Service Account or API key for Vertex AI
  • Optional: Install CLI tools you want to use (kubectl, docker, aws, gcloud)

2. Configuration

Create a .env file:

XERXES_VERTEX_PROJECT_ID=your-gcp-project-id
XERXES_VERTEX_LOCATION=us-central1
XERXES_VERTEX_MODEL=gemini-2.0-flash
XERXES_GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json

Or use the CLI:

xerxes config set vertex_project_id your-gcp-project-id
xerxes config set google_application_credentials /path/to/sa.json

3. Start Chatting

xerxes chat

Usage

Example Session

You: how many GKE clusters do i have?

[Thinking...]

┌─ Command Preview ────────────────────────────────────────┐
│ Command:                                                  │
│ $ gcloud container clusters list --format=json           │
│                                                           │
│ Reasoning:                                                │
│ Listing all GKE clusters to count them                   │
└───────────────────────────────────────────────────────────┘

[R]un / [S]kip / [A]lways for session? a

✓ Auto-approve enabled for this session

Executing: gcloud container clusters list --format=json

╭─────────────── Output ───────────────╮
│ [                                    │
│   {                                  │
│     "name": "prod-cluster",          │
│     "location": "us-central1-a",     │
│     ...                              │
│   }                                  │
│ ]                                    │
╰──────────────────────────────────────╯

Xerxes:
You have 3 GKE clusters: prod-cluster, staging-cluster, and dev-cluster.

You: show me pods in prod-cluster that are failing

[Thinking...]

Executing: kubectl get pods --all-namespaces --field-selector=status.phase=Failed

...

Example Use Cases

Infrastructure Discovery:

"What cloud run services do I have and what are their URLs?"
"Show me all pods that have restarted more than 5 times"
"List S3 buckets and their sizes"

Troubleshooting:

"Why is my deployment failing?"
"Show me logs from the last hour for pods with label app=frontend"
"What containers are using more than 1GB of memory?"

Operations:

"Scale the api deployment to 5 replicas"
"Delete all pods in failed state"
"Create a new GCS bucket for backups"

CLI Commands

# Start interactive chat
xerxes chat

# Manage configuration
xerxes config show
xerxes config set <key> <value>

# List available tools
xerxes tools

# Show version
xerxes version

Configuration Options

Variable Description Default
XERXES_VERTEX_PROJECT_ID GCP project ID (required) -
XERXES_VERTEX_LOCATION GCP region us-central1
XERXES_VERTEX_MODEL Model name claude-3-5-sonnet@20240620
XERXES_GOOGLE_APPLICATION_CREDENTIALS Path to service account JSON -
XERXES_MAX_TOKENS Max tokens per response 4096
XERXES_TEMPERATURE LLM temperature 0.0

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Run tests and linters:
    uv run pytest
    uv run black src/
    uv run ruff check src/
    
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

Development Setup

# Clone the repo
git clone https://github.com/shammianand/xerxes.git
cd xerxes

# Install dependencies
uv sync --all-extras

# Run in development mode
uv run xerxes chat

Roadmap

  • Additional LLM providers (Anthropic direct, OpenAI, Ollama)
  • Terraform integration
  • Ansible playbook execution
  • Multi-step workflow automation
  • Session history save/replay
  • Web dashboard for monitoring
  • Plugin system for custom tools
  • One-shot command mode (xerxes run "list all pods")

License

MIT License - see LICENSE for details

Support


Built with ❤️ by Shammi Anand

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xerxes-0.1.0.tar.gz (94.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xerxes-0.1.0-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

Details for the file xerxes-0.1.0.tar.gz.

File metadata

  • Download URL: xerxes-0.1.0.tar.gz
  • Upload date:
  • Size: 94.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.4

File hashes

Hashes for xerxes-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a347320859ca178cea3006a9c7824d7a3eabb4fa3d69dde759b90f76774a1eb3
MD5 7538550f572d9998c7763e93e8b27832
BLAKE2b-256 d613c3915dc80f8c5df7f07b40f5465d54c949f73edde7e5727f0e32397e21bb

See more details on using hashes here.

File details

Details for the file xerxes-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: xerxes-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.4

File hashes

Hashes for xerxes-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e8bd0400dfd321bee677c8a8f42e0457964b6840b9e897c3d0c6b46d71273541
MD5 05de1e23dffc67d1350e89ca57a4b98c
BLAKE2b-256 5927eafa7adbd3e6ce803abe2b702bca80e010ed4945609b3070fb39865fc51c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page