devex AGENTS.md

A set of development instructions for Devex, a cloud development environment with isolated terminal workspaces. It describes the services, Kubernetes-based sessions, storage, routing, and key code entry points.

In plain words
What is it for?
It is for working on the core service, runner, sandbox sessions, WebSocket and terminal access, S3-compatible storage, Kubernetes deployments, and routed repl URLs.
Why use it?
It gives an agent the system context needed to change or troubleshoot Devex without guessing how its parts connect.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/parthkapoor-dev/devex/agents-md
Clone the repo
git clone --depth 1 https://github.com/ParthKapoor-dev/devex

Made for: Codex, OpenCode.

Per session 835 This file is loaded in full into every session.
When invoked 835 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00835 $0.00835
Opus 5 $0.00417 $0.00417
Sonnet 5 $0.00167 $0.00167
Haiku 4.5 $0.00084 $0.00084

Measured 3d ago against content hash b9c26ab971fc, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

devex AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 72 lines

What it actually says

Devex Agent Guide

Summary Devex is a cloud development IDE with sandboxed “repl” sessions. The system is split into services. The core service handles auth and session orchestration, while the runner provides the interactive sandbox (WebSocket + PTY). Session data is persisted to S3-compatible storage when a repl is deactivated.

Architecture (High Level)

  • Core service (apps/core) is deployed to a VPS via Docker Swarm and is the control plane.
  • Runner service (apps/runner) is the data plane sandbox image. Each repl is a Kubernetes Deployment with a single pod.
  • Pod layout:
    • initContainer pulls workspace files from S3.
    • runnerContainer is the interactive sandbox (WebSocket + PTY).
  • Deactivation flow:
    • Core injects an ephemeral container into the pod to upload workspace data to S3.
    • Core then deletes Deployment/Service/Ingress/Middleware.
  • Routing:
    • Base host: repl.parthkapoor.me
    • Route pattern: repl.parthkapoor.me/<repl-id>/<route>
    • Uses hostNetwork: true to avoid a load balancer and save cost.

Key Entry Points

  • Core API: apps/core/cmd/main.go
  • Runner API: apps/runner/cmd/main.go
  • MCP service: apps/mcp/cmd/main.go

Repo Layout

  • apps/core/: Control-plane service (auth + session orchestration + k8s + s3 + redis).
  • apps/runner/: Sandbox service (WebSocket, PTY, file operations, shutdown manager).
  • apps/mcp/: MCP server.
  • apps/web/: Frontend web app.
  • apps/agent/: Agent-related app (check README inside).
  • packages/: Shared Go packages and generated protobufs.
    • packages/logging: Shared logger wrapper.
    • packages/proto + packages/pb: Proto sources and generated code.
  • infra/: Deployment and infrastructure.
    • infra/core/: Swarm dockerfile + stack config.
    • infra/runner/: Runner dockerfiles (base + language variants).
    • infra/mcp/: MCP dockerfile.
    • infra/k8s/: K8s manifests, cert-manager, ingress, traefik.
  • templates/: Repl templates synced to object storage.

Data Stores

  • Redis: repl/session state.
  • S3-compatible storage: workspace persistence on session end.

Build and Test (Local)

  • Core build:
    • cd apps/core
    • go build -o /tmp/core ./cmd/main.go
  • Runner build:
    • cd apps/runner
    • go build -o /tmp/runner ./cmd/main.go
  • Docker images:
    • docker build -f infra/core/dockerfile -t devex/core:local .
    • docker build -f infra/runner/dockerfile -t devex/runner:local .

CI/CD

  • Workflows live in .github/workflows/.
  • Core pipeline builds/pushes and deploys via Docker Swarm.
  • Runner pipeline builds runner + env images.
  • Templates pipeline syncs templates/ to DigitalOcean Spaces.

Where to Look First

  • Auth/session logic: apps/core/services/auth/
  • Repl lifecycle: apps/core/services/repl/ and apps/core/internal/k8s/
  • Runner WS/PTY: apps/runner/pkg/ws/, apps/runner/pkg/pty/
  • Shared logging: packages/logging/

Notes for Agents

  • The system relies on hostNetwork: true for simplicity and cost.
  • The core service is the orchestrator; runner instances are ephemeral and created per repl session.
  • If you change protobufs in packages/proto/, regenerate via make generate-proto.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 72 lines · 835 tokens per session scan A b9c26ab971fc

Subscribe to this mod's changes

devex AGENTS.md is an instructions file published in the GitHub repository ParthKapoor-dev/devex (78 stars, last pushed 6mo ago), licensed MIT. It adds 835 tokens to every session, about $0.0042 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.