docsservicesSyntraSyntra

Syntra

Syntra is the central AI teammate for the Goalixa platform — an intelligent orchestration service that manages incidents, automates DevOps workflows, and provides seamless Kubernetes cluster management through a multi-agent system powered by CrewAI.

Overview

Syntra acts as an always-available DevOps teammate that:

  • Investigates incidents automatically
  • Manages Kubernetes operations with AI
  • Provides a unified CLI interface for all operations
  • Learns from past incidents to improve future responses

Technology Stack

ComponentTechnology
FrameworkFastAPI
AI OrchestrationCrewAI
LLM IntegrationLangChain + Claude
KubernetesPython K8s Client
CLITyper + Rich
AuthenticationGoalixa Auth

Project Structure

syntra/
├── main.py                    # Entry point
├── config.py                  # Configuration
├── api/                       # FastAPI routes
│   ├── main.py
│   ├── routes.py
│   ├── auth_routes.py
│   ├── admin_routes.py
│   └── schemas.py
├── agents/                    # CrewAI agents
│   ├── base_agent/
│   ├── planner_agent/
│   ├── incident_agent/
│   ├── evidence_collector/
│   ├── devops_agent/
│   └── tools/
├── skills/                    # Skill modules
│   ├── devops/
│   ├── incident/
│   ├── review/
│   └── planning/
├── tools/                     # Tool implementations
│   ├── kubernetes_tools/
│   ├── git_tools/
│   ├── log_tools/
│   └── llm_tools/
├── services/
│   └── k8s_service.py
└── orchestration/
    └── crew_runner.py

API Endpoints

Main Routes

MethodEndpointDescription
POST/api/askAsk a question
GET/api/agentsList agents
GET/api/agents/<id>/statusAgent status
POST/api/agents/<id>/cancelCancel agent

Health

MethodEndpointDescription
GET/healthHealth check
GET/readyReadiness probe

Agent System

Planner Agent

  • Intent recognition and task decomposition
  • Coordinates other agents
  • Manages workflow execution

Incident Agent

  • Automatic incident detection
  • Root cause analysis
  • Resolution recommendations

Evidence Collector

  • Log collection and correlation
  • Event filtering
  • Related pod discovery

DevOps Agent

  • Kubernetes operations
  • Pod inspection and status
  • Deployment management

Code Examples

Asking a Question

curl -X POST http://localhost:8000/api/ask \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  -d '{
    "query": "Why is auth-service crashing?",
    "context": "production"
  }'

Response:

{
  "task_id": "abc123",
  "status": "processing",
  "message": "Investigation started"
}

Checking Agent Status

curl -X GET http://localhost:8000/api/agents/abc123/status \
  -H "Authorization: Bearer <token>"

Response:

{
  "agent_id": "abc123",
  "status": "completed",
  "result": {
    "root_cause": "OOMKilled",
    "recommendation": "Increase memory limit"
  }
}

Configuration

Environment Variables

VariableDescriptionDefault
OPENAI_API_KEYOpenAI API keyRequired
ANTHROPIC_API_KEYAnthropic API keyRequired
KUBECONFIGKubernetes config path~/.kube/config
AUTH_SERVICE_URLAuth service URLhttp://localhost:5001

Kubernetes Deployment

apiVersion: apps/v1
kind: Deployment
metadata:
  name: syntra
spec:
  replicas: 2
  selector:
    matchLabels:
      app: syntra
  template:
    metadata:
      labels:
        app: syntra
    spec:
      containers:
      - name: syntra
        image: goalixa/syntra:latest
        ports:
        - containerPort: 8000
        env:
        - name: OPENAI_API_KEY
          valueFrom:
            secretKeyRef:
              name: goalixa-secrets
              key: openai-api-key
        - name: ANTHROPIC_API_KEY
          valueFrom:
            secretKeyRef:
              name: goalixa-secrets
              key: anthropic-api-key
        resources:
          requests:
            memory: "512Mi"
            cpu: "500m"

Authentication

Syntra implements two authentication mechanisms:

  1. CLI Authentication - API key-based
  2. Admin Panel - JWT via Goalixa Auth