Agentic Coding Agent
  • Shell 59.1%
  • Nix 40.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Krish Saxena 38491266d5
All checks were successful
CI / checks-1 (push) Successful in 16s
CI / checks (push) Successful in 0s
nixbot/nix-eval evaluation succeeded in 12s (1 warning)
kennel/deploy deployment healthy
nixbot/nix-build 5 attributes built
feat: set up dev shell, secretspec, and LiteLLM gateway access
Add the kennel dev shell, secretspec declarations for the AI gateway key
and URL in OpenBao, kennel's shared CI, and a script that pings the
gateway. Document OpenBao setup and gateway usage in the README.
2026-11-14 17:09:15 -05:00
.forgejo/workflows feat: set up dev shell, secretspec, and LiteLLM gateway access 2026-11-14 17:09:15 -05:00
scripts feat: set up dev shell, secretspec, and LiteLLM gateway access 2026-11-14 17:09:15 -05:00
.editorconfig feat: set up dev shell, secretspec, and LiteLLM gateway access 2026-11-14 17:09:15 -05:00
.gitattributes feat: set up dev shell, secretspec, and LiteLLM gateway access 2026-11-14 17:09:15 -05:00
.gitignore feat: set up dev shell, secretspec, and LiteLLM gateway access 2026-11-14 17:09:15 -05:00
flake.lock feat: set up dev shell, secretspec, and LiteLLM gateway access 2026-11-14 17:09:15 -05:00
flake.nix feat: set up dev shell, secretspec, and LiteLLM gateway access 2026-11-14 17:09:15 -05:00
README.md feat: set up dev shell, secretspec, and LiteLLM gateway access 2026-11-14 17:09:15 -05:00
secretspec.toml feat: set up dev shell, secretspec, and LiteLLM gateway access 2026-11-14 17:09:15 -05:00

slc

ScottyLabs Code (SLC) is an agentic coding agent, built by the ScottyLabs AI (slai) team.

The repository holds no application code yet. It sets up the development environment, the secrets in OpenBao, and access to the ScottyLabs AI gateway (LiteLLM), which SLC will call for its models.

Repository layout

.
├── .forgejo/workflows/ci.yml   # CI, reusing kennel's shared checks
├── scripts/ping-litellm.sh     # Checks the AI gateway and this repository's key
├── flake.nix                   # Nix dev shell, through kennel's flake module
└── secretspec.toml             # Secret declarations, resolved from OpenBao

Before you start

  1. Join slai through governance. Team membership grants read access to this repository's secrets in OpenBao.
  2. Install Git and either Nix (recommended) or the tools listed under Without Nix.

Setting up OpenBao

ScottyLabs keeps secrets in OpenBao at https://secrets.scottylabs.org. Governance writes this repository's secrets to secret/secretspec/slc/<profile>/<NAME>, and secretspec reads them from there through the provider declared in secretspec.toml.

Install Lix by following kennel's local development guide. Then clone the repository and enter the dev shell:

git clone ssh://forgejo@git.cmu.dev/ScottyLabs/slc.git
cd slc
nix develop

The dev shell provides bao and secretspec, sets BAO_ADDR=https://secrets.scottylabs.org, and selects the dev profile. Log in to OpenBao with your Andrew ID:

bao login -method=oidc

A browser window opens for single sign-on. The token is saved to ~/.vault-token and lasts several months, so you only need to log in again when it expires. Kennel's secrets guide covers the details.

Without Nix

Install OpenBao (brew install openbao on macOS) and secretspec (curl -sSL https://install.secretspec.dev | sh), then log in:

export BAO_ADDR=https://secrets.scottylabs.org
bao login -method=oidc

Outside the dev shell, pass the profile and the provider on every command, as in secretspec run -p openbao -P dev -- <command>. Passing the provider keeps a global secretspec configuration, such as provider = "keyring" in ~/.config/secretspec/config.toml, from overriding OpenBao.

Checking access

Confirm that both secrets resolve:

secretspec check

A working setup reports 2 found, 0 missing. If LITELLM_API_KEY is missing, confirm that bao token lookup succeeds and that your Andrew ID is listed in data/teams/slai.yaml in governance.

Secrets

secretspec.toml declares the following, which governance's ai_gateway feature writes to OpenBao on every profile:

Variable Description
LITELLM_API_KEY LiteLLM virtual key for this repository. The prod profile has its own key, and staging, preview, and dev share a key with a lower monthly budget
LITELLM_BASE_URL Gateway URL, https://litellm.scottylabs.org

Never commit either value, and don't copy them into .env files that leave your machine. Run commands through secretspec run so the values only exist in that process's environment.

Using the LiteLLM gateway

The gateway at LITELLM_BASE_URL accepts both the OpenAI and the Anthropic API formats. It meters spend against this repository's key, under the slai team.

Ping it

scripts/ping-litellm.sh checks the gateway's health, lists the models this key can use, and sends a short test message:

secretspec run -- ./scripts/ping-litellm.sh
Gateway: https://litellm.scottylabs.org
Health:  "I'm alive!"
Models available to this key:
  claude-fable-5-2
  claude-opus-5-5
  claude-sonnet-5-5
  claude-haiku-5-5
  ...
Sending a test message to claude-haiku-5-5...
pong

Pass a model name as the first argument to test a different model, as in ./scripts/ping-litellm.sh claude-sonnet-5-5.

With curl

The health check needs no key:

curl https://litellm.scottylabs.org/health/liveliness

Every other route needs the key. Wrap these commands in secretspec run -- bash -c '...', or run them in a shell started with secretspec run -- $SHELL.

# List models
curl "$LITELLM_BASE_URL/v1/models" \
  -H "Authorization: Bearer $LITELLM_API_KEY"

# OpenAI format
curl "$LITELLM_BASE_URL/v1/chat/completions" \
  -H "Authorization: Bearer $LITELLM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "claude-haiku-5-5", "messages": [{"role": "user", "content": "Hello"}]}'

# Anthropic format
curl "$LITELLM_BASE_URL/v1/messages" \
  -H "x-api-key: $LITELLM_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model": "claude-haiku-5-5", "max_tokens": 256, "messages": [{"role": "user", "content": "Hello"}]}'

With an SDK

Point any OpenAI- or Anthropic-compatible client at the gateway. The OpenAI SDK needs /v1 on the base URL, and the Anthropic SDK adds it on its own.

import os

from anthropic import Anthropic
from openai import OpenAI

anthropic = Anthropic(
    base_url=os.environ["LITELLM_BASE_URL"],
    api_key=os.environ["LITELLM_API_KEY"],
)

openai = OpenAI(
    base_url=os.environ["LITELLM_BASE_URL"] + "/v1",
    api_key=os.environ["LITELLM_API_KEY"],
)

Contributing

CI runs kennel's shared checks on every push and pull request. Run the same hooks locally before pushing:

nix develop --command prek run --all-files

Commits follow Conventional Commits.

  • governance: team membership and the ai_gateway feature that provisions this repository's keys.
  • kennel: the dev shell module, the shared CI, and deployments.
  • slai-rfcs: design documents for slai projects, including SLC.