Sentinel Coming is a portfolio-grade observability and infrastructure automation project built around an agentic Python CLI, a read-only observability gateway, and a realistic multi-service test platform. It is designed for local labs and Kubernetes/COS-style environments where operators need a safer way to inspect metrics, logs, traces, configuration, and deployment state from one terminal workflow.
The core product is sentinel-cli: a Python command-line assistant that can run one-off prompts, start a REPL, inspect configuration, run health checks, install local observability stacks, and query a gateway-backed telemetry layer. The gateway keeps Prometheus, Loki, and Tempo access behind one read-only HTTP API so the CLI does not need to know every backend URL directly.
Modern observability stacks are powerful but operationally fragmented. A developer or platform engineer often has to switch between Grafana, Prometheus, Loki, Tempo, shell commands, Kubernetes tooling, and runbooks just to understand whether a service is healthy.
This project explores a practical answer to that workflow:
- Provide a single CLI surface for agent-assisted infrastructure and observability work.
- Keep telemetry access read-only by default through a gateway service.
- Support local and cloud LLM providers through a layered configuration model.
- Preserve useful debugging context through sessions, trajectories, memory extraction, and controlled documentation updates.
- Validate the workflow against a realistic target platform with services, databases, Redis Streams, load generation, chaos profiles, Kubernetes manifests, and smoke scripts.
- Agentic CLI with
run,repl,config,doctor,obs,install, andversioncommands. - LLM provider support for OpenAI-compatible APIs and Anthropic, including local OpenAI-compatible endpoints such as Ollama.
- Optional MCP client integration via the
mcpextra. - Layered configuration from defaults, YAML files, environment variables, and CLI flags.
- Tool execution controls for bash, filesystem access, approval modes, timeouts, output limits, and read-only bash mode.
- Session persistence, trajectory recording, context-window policy, and optional turn-end memory processing.
- Read-only FastAPI observability gateway for Prometheus metrics, Loki log queries, and Tempo trace search/detail calls.
- Gateway-backed CLI observability commands:
obs metric,obs logs, andobs traces. - Docker Compose installer assets and Kubernetes Helm chart assets for the Sentinel observability stack.
- Test platform with gateway, orders, payments, inventory, worker services, Postgres, Redis, OpenTelemetry Collector, Locust load scenarios, chaos profiles, and Kubernetes manifests.
- CI for the CLI package using GitHub Actions, Ruff, and Pytest.
- Gateway image workflow for multi-architecture GHCR builds.
User
|
v
sentinel-cli
|-- LLM provider adapters
|-- tool registry: bash, filesystem, MCP, observability tools
|-- session, trajectory, hooks, memory, and config layers
|
v
observability-gateway
|-- Prometheus: instant metric queries
|-- Loki: query_range log retrieval
|-- Tempo: trace search and trace detail retrieval
|
v
Target platform and observability backends
The repository also includes deployment paths for different environments:
for-download/compose/contains a Docker Compose observability stack with Prometheus, Loki, Tempo, Grafana, and the Sentinel gateway image.charts/sentinel/contains a Helm chart that installs kube-prometheus-stack, Loki, Tempo, Grafana, andsentinel-gatewayinto an existing Kubernetes cluster.test-platform/contains a realistic target application tree used to generate metrics, logs, and traces for the Sentinel workflow.skills/andcli/skills/contain structured operational and agentic guidance files used as project knowledge and implementation references.
- Python 3.11+ for the CLI, gateway, and test services.
- FastAPI and Uvicorn for HTTP services.
- Pydantic and pydantic-settings for typed configuration and request/response models.
- HTTPX for outbound API and backend calls.
- PyYAML and python-dotenv for configuration files and environment loading.
- Rich for CLI output and progress rendering.
- Pytest and Ruff for test and lint workflows.
- Docker Compose for local observability and target-platform runs.
- Helm and Kubernetes manifests for cluster deployment paths.
- Prometheus, Loki, Tempo, Grafana, OpenTelemetry Collector, Postgres, Redis, and Locust in the supporting lab platform.
sentinel-coming/
|-- cli/ # Sentinel CLI Python package
|-- observability-gateway/ # Read-only FastAPI gateway for telemetry backends
|-- test-platform/ # Multi-service target app, load, chaos, and smoke scripts
|-- charts/sentinel/ # Helm chart for Kubernetes observability stack
|-- for-download/ # Compose bundle and operational setup scripts
|-- scripts/ # MicroK8s/COS helper scripts and repo automation
|-- skills/ # COS/Juju/MicroK8s operational skill documents
|-- documantations/ # Project and phase documentation
|-- tasks/ # Durable owner-specific project tasks
|-- .github/workflows/ # CLI CI and gateway image workflows
`-- agentic/ # External/reference agent projects, not the main product
Important note: agentic/ contains independent reference projects. The main Sentinel implementation is in cli/, observability-gateway/, test-platform/, charts/, for-download/, scripts/, skills/, and documantations/.
cli/ is the main user-facing package. Its source code lives under cli/src/sentinel_cli/.
Key areas:
cli/app.py: argparse command surface and runtime wiring.agent/: agent loop, context compaction, and turn-end processing.llm/: provider factory, Anthropic adapter, OpenAI-compatible adapter, streaming, retries, and shared types.tools/: bash, filesystem, MCP, approval, registry, and observability tools.observability/: gateway and Grafana connection checks.config/: Pydantic configuration models and layered loader.memory/: extraction, dreaming, magic docs, memory path handling, and redaction-aware persistence.session/: session store and trajectory recording.installers/: Docker Compose, Kubernetes Helm, and COS discovery/install backends.assets/: packaged Compose and Helm chart assets used by the install command.
observability-gateway/ is a standalone FastAPI service. It exposes a small read-only API and adapts requests to Prometheus, Loki, and Tempo.
Endpoints:
GET /healthGET /api/v1/statusPOST /api/v1/metrics/queryPOST /api/v1/logs/query_rangePOST /api/v1/traces/searchGET /api/v1/traces/{trace_id}
The gateway supports bearer-token protection through SENTINEL_OBSERVABILITY_GATEWAY_TOKEN when that token is configured. Backend errors are returned through a structured model that avoids leaking secrets.
test-platform/ provides a target application for realistic observability tests:
gateway: public API facade.orders: coordinates payments and inventory, writes to Postgres, and emits Redis Stream events.payments: payment simulation with Redis idempotency.inventory: stock reads/reservations with Redis cache-through behavior.worker: Redis Streams consumer group processor.load/: Locust scenarios including steady, diurnal, flash crowd, and gradual degradation.chaos/profiles/: healthy, slow database, cache stampede, downstream outage, memory leak, and cascading profiles.k8s/: namespace, services, deployments/stateful resources, OpenTelemetry Collector config, and network policy manifests.
The Helm chart installs Prometheus, Loki, Grafana, Tempo, and the Sentinel gateway into an existing Kubernetes cluster. The chart uses upstream dependencies from the Prometheus Community and Grafana Helm repositories and keeps service names aligned with the CLI discovery code.
This folder contains deployment-oriented assets:
compose/docker-compose.yaml: local observability stack.compose/.env.example: ports and gateway token defaults for the compose stack.prepare-env.sh: MicroK8s, MetalLB, and Juju preparation helper.my-product-bundle.yaml: COS Lite bundle including Prometheus, Loki, Alertmanager, Grafana, Traefik, Catalogue, Tempo, and OpenTelemetry Collector.faz1-telemetry.shandfaz4-5.sh: operational scripts for telemetry setup and post-deployment checks.
Clone the repository and create a virtual environment:
cd sentinel-coming
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pipInstall the CLI for local development:
cd cli
python -m pip install -e ".[dev]"
python -m sentinel_cli --helpInstall the CLI with optional MCP support:
cd cli
python -m pip install -e ".[dev,mcp]"
python -m sentinel_cli doctor --profile localInstall and run the observability gateway locally:
cd observability-gateway
python -m pip install -e ".[dev]"
sentinel-observability-gatewayAlternative gateway startup:
cd observability-gateway
uvicorn observability_gateway.main:app --host 0.0.0.0 --port 8091The CLI keeps committed templates separate from local secrets:
cli/config/sentinel.example.yaml: committed YAML template.cli/.env.example: committed environment template.cli/config/sentinel.yaml: local runtime config, ignored by Git.cli/.env: local secrets and overrides, ignored by Git.
Create local configuration:
cd cli
cp config/sentinel.example.yaml config/sentinel.yaml
cp .env.example .envCommon CLI environment variables from cli/.env.example:
SENTINEL_CONFIGSENTINEL_PROFILESENTINEL_MODELSENTINEL_OPENAI_BASE_URLSENTINEL_API_KEYSENTINEL_LOCAL_BASE_URLSENTINEL_LOCAL_MODELANTHROPIC_API_KEYSENTINEL_ANTHROPIC_MODELSENTINEL_HTTP_CONNECT_TIMEOUT_SECSENTINEL_HTTP_TIMEOUT_SECSENTINEL_CONTEXT_WINDOW_TOKENSSENTINEL_LOG_LEVELSENTINEL_MAX_TURNSSENTINEL_AUTO_APPROVESENTINEL_SESSION_DIRSENTINEL_TRAJECTORY_DIRSENTINEL_EXPERIMENTAL_MCP
Gateway-related CLI settings are configured under observability_gateway in sentinel.yaml:
observability_gateway:
enabled: true
base_url: http://127.0.0.1:8091
timeout_sec: 10
token_env: SENTINEL_OBSERVABILITY_GATEWAY_TOKENGateway service environment variables documented in observability-gateway/README.md include:
SENTINEL_OBSERVABILITY_CONFIG_PATHSENTINEL_OBSERVABILITY_GATEWAY_TOKENSENTINEL_OBSERVABILITY_PROMETHEUS__BASE_URLSENTINEL_OBSERVABILITY_PROMETHEUS__TOKEN_ENVSENTINEL_OBSERVABILITY_LOKI__BASE_URLSENTINEL_OBSERVABILITY_TEMPO__BASE_URLSENTINEL_OBSERVABILITY_HTTP__TIMEOUT_SECSENTINEL_OBSERVABILITY_HTTP__RETRY__MAX_ATTEMPTS
The compose package in for-download/compose/.env.example also defines ports for Prometheus, Loki, Tempo, Grafana, and the Sentinel gateway.
Run a one-off agent prompt:
cd cli
source .venv/bin/activate
python -m sentinel_cli run "Summarize the current observability gateway status"Start an interactive REPL:
cd cli
source .venv/bin/activate
python -m sentinel_cli replInspect effective configuration:
cd cli
python -m sentinel_cli configRun diagnostics:
cd cli
python -m sentinel_cli doctor --profile localQuery telemetry through the gateway:
cd cli
python -m sentinel_cli obs metric 'up'
python -m sentinel_cli obs logs --service gateway
python -m sentinel_cli obs traces --service ordersRun a Compose install flow:
cd cli
python -m sentinel_cli install --mode composeRun a Kubernetes Helm install flow:
cd cli
python -m sentinel_cli install --mode k8sThe cos install backend currently includes discovery/config wiring, while its preflight, install, and verify steps are marked as TODO in code. Use the scripts under scripts/ and for-download/ for the existing MicroK8s/Juju/COS operational path.
The test platform can be started with Docker Compose:
cd test-platform
docker compose up --buildThe test-platform/README.md documents the local database environment variables and health checks:
export ORDERS_DB_URL=postgresql+asyncpg://sentinel:sentinel@localhost:5432/orders_db
export PAYMENTS_DB_URL=postgresql+asyncpg://sentinel:sentinel@localhost:5432/payments_db
export INVENTORY_DB_URL=postgresql+asyncpg://sentinel:sentinel@localhost:5432/inventory_db
export PAYMENTS_REDIS_URL=redis://localhost:6379/1
python scripts/seed_db.py
curl http://localhost:8080/health
curl http://localhost:8081/health
curl http://localhost:8082/health
curl http://localhost:8083/healthRun a ground-truth scenario:
cd test-platform
python scripts/scenario_runner.py run <scenario.yaml>Run the COS smoke workflow when a compatible MicroK8s/Juju/COS lab is already available:
cd test-platform
./scripts/run_cos_stack_check.shRun the local stack smoke workflow:
cd test-platform
./scripts/run_local_stack_check.shThese smoke scripts expect the repository-level .venv and required local infrastructure commands to exist. They write run artifacts under test-platform/runs/....
CLI lint and tests:
cd cli
python -m ruff check .
python -m pytest -qGateway tests:
cd observability-gateway
python -m pytest -qBuild a CLI wheel:
cd cli
python -m buildBuild a gateway wheel:
cd observability-gateway
python -m buildThe GitHub Actions workflow .github/workflows/cli-ci.yml runs the CLI package on Python 3.12 with editable dev installation, Ruff, and Pytest. The .github/workflows/gateway-image.yml workflow builds and pushes the gateway image to GHCR for gateway-v* tags or manual dispatch.
Docker image for the gateway:
docker pull ghcr.io/caglarkc/sentinel-gateway:latestHelm chart:
helm dependency update ./charts/sentinel
helm upgrade --install sentinel ./charts/sentinel \
--create-namespace -n sentinel \
--set gateway.token=<token>Local/lab Compose stack assets are available under for-download/compose/ and packaged into the CLI install assets.
- The observability gateway is intentionally read-only; it does not implement alert management, dashboard management, backend write operations, or a Grafana datasource proxy.
- Gateway bearer authentication is enabled when
SENTINEL_OBSERVABILITY_GATEWAY_TOKENis configured. - Gateway backend errors use a structured response model with retryability metadata and secret-safe messages.
- CLI configuration templates keep secrets in environment variables instead of committed config files.
.gitignoreexcludes.env, local Sentinel sessions, credentials, key material, build artifacts, caches, logs, and local run outputs.- CLI tools include approval modes, shell and file write timeouts, output limits, optional read-only bash behavior, and an optional memory write jail.
- Memory writes pass through redaction logic for common secret patterns before persistence.
- The gateway Dockerfile runs the service as a non-root
sentineluser. - The Helm chart sets non-root pod security context, disables privilege escalation, drops Linux capabilities, and uses a read-only root filesystem for the gateway container.
- The project is marked
Pre-Alphain the CLI package metadata. - The
cosinstaller backend is not a full installer yet; code marks preflight, install, and verify as TODO. - Production hardening such as TLS termination, process supervision, and secret rotation is documented as outside the current gateway README scope.
- No screenshots or UI assets were found in the main Sentinel project tree during README preparation.
agentic/contains external/reference projects and should not be presented as the shipped Sentinel product.
- Complete the COS installer backend so MicroK8s/Juju/COS setup can be driven consistently from the CLI.
- Add a production deployment guide covering TLS, ingress, secret rotation, and process supervision.
- Expand end-to-end tests around the gateway-backed agent
runandreplworkflows. - Add example scenario files for
scenario_runner.pyin a discoverable location. - Publish architecture diagrams and generated screenshots or conceptual visuals for portfolio presentation.
- Add a concise public quickstart that separates local demo, Kubernetes demo, and COS lab paths.
MIT License - Copyright (c) 2026 Ali Caglar Kocer