Skip to content

Repository files navigation

Slashbay

Slashbay — DataKnifeAI’s issue-webhook herald: issues dock here, cheap-LLM triage decides if they are work, and a Coder workspace is berthed for a coding agent.

Slashbay owns intake, classification, berth, and dispatch for internal DataKnifeAI repositories. It is not a resold Cursor service. Cursor CLI is a coding worker we dispatch into, not the product identity.

Sibling Role vs Slashbay
nauarchos Future Kubernetes fleet control plane (classes, sandboxes, on-demand workers). Slashbay is today’s herald on Coder; Nauarchos is the longer-term cluster admiral.
dioptra Observe-only fleet status board. Slashbay acts; Dioptra watches.

What it does

  1. Receive GitHub / GitLab issue webhooks
  2. Cheap-LLM triage (OpenAI gpt-5-nano, escalate to gpt-5.6-luna when confidence is below 0.7)
  3. If actionable: create/start a Coder workspace from the dkai-agent template
  4. Dispatch coding via Cursor CLI (agent -p) inside that workspace
  5. Comment and label the issue
flowchart TD
    GH[GitHub issue webhook] --> SB[Slashbay FastAPI]
    GL[GitLab issue webhook] --> SB
    SB --> V[Verify signature / token]
    V --> A[Allowlist org/repo]
    A --> T[Triage gpt-5-nano]
    T -->|confidence below 0.7| L[Escalate gpt-5.6-luna]
    T --> D{action}
    L --> D
    D -->|skip / needs_info| C[Comment + label]
    D -->|actionable| CW[Coder create/start dkai-agent]
    CW --> P["Dispatch agent -p in workspace"]
    P --> C
    C --> ISS[Issue thread]
Loading

Integrations (reuse, do not copy)

Repo Why Slashbay talks to it
coder-templates (dkai-agent) Workspace template: Cursor CLI, tool PVC, cursor_api_key
agent-workspace Default Cloud Agent / skills baseline the template can clone
agent-skills Shared skills installed in those workspaces
gitops-dev Coder platform delivery
rancher-deploy Clusters the workspaces run on
nauarchos Future K8s fleet (not a runtime dependency today)
dioptra Observe-only dashboard

Dispatch contract

Slashbay does not invent a Cursor worker pool. One named human seat, on-demand:

  • Coder rich parameters: cursor_api_key, optional cursor_worker_git_url (issue repo, or SLASHBAY_WORKSPACE_GIT_URL)
  • Workspace env: SLASHBAY_DISPATCH=1, SLASHBAY_RUN_ID, SLASHBAY_ISSUE_URL, SLASHBAY_PROMPT
  • Command after the workspace is Started: agent -p "$SLASHBAY_PROMPT" (via coder ssh or a dkai-agent startup hook — request the hook in coder-templates if missing)
  • Cap: SLASHBAY_MAX_CONCURRENT (2–5)

See src/slashbay/dispatch/contract.py.

Cursor seat (internal)

  • Cursor CLI is the coding worker, not the classifier
  • One paid human user API key, suggested name dataknife-coder-issue-bot
  • 2–5 concurrent jobs, on-demand usage on that seat
  • Do not share one Pro key across a farm; do not create dummy bot seats
  • Internal DataKnifeAI repos only

Configure

Copy .env.example to .env. Secrets never go in git.

Variable Purpose
OPENAI_API_KEY Triage only. Unset → heuristic classifier (local/dev)
CURSOR_API_KEY Injected into the Coder workspace as cursor_api_key
GITHUB_WEBHOOK_SECRET HMAC for X-Hub-Signature-256
GITLAB_WEBHOOK_TOKEN Shared token for X-Gitlab-Token
CODER_ACCESS_URL / CODER_TOKEN / CODER_TEMPLATE Berth dkai-agent (default template name)
SLASHBAY_REPO_ALLOWLIST owner/name or owner/*
SLASHBAY_DRY_RUN Default true: no Coder or issue API calls

Point GitHub/GitLab webhooks at:

  • POST /webhooks/github (issues)
  • POST /webhooks/gitlab (Issue Hook)
  • GET /healthz

Local run

Python 3.12+:

python3 -m venv .venv
source .venv/bin/activate
make install
cp .env.example .env   # set webhook secrets at minimum
make test
make run               # http://127.0.0.1:8080/healthz

Docker:

cp .env.example .env
docker compose up --build

Layout

src/slashbay/
  app.py           # FastAPI: /healthz + webhooks
  service.py       # allowlist → triage → berth → comment
  webhooks/        # signature checks + event parse
  triage/          # structured {action, start_workspace, comment, confidence}
  coder/           # Coder API client (create/start)
  dispatch/        # agent -p contract
  state/           # issue ↔ run ↔ workspace (memory or sqlite)
  comments/        # GitHub/GitLab write-back

License

Apache License 2.0. See LICENSE.

About

Slashbay: issue webhook intake, cheap-LLM triage, Coder workspace berth, and coding-agent dispatch for the DataKnifeAI fleet.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages