OpsCode overview
OpsCode (ops) is an open-source, terminal-native coding agent built on the Deep Agents SDK and LangGraph for DevOps, SRE, and platform engineering. It combines an interactive Textual TUI and a scriptable headless CLI (ops -n) with 6 built-in infrastructure subagents, 20+ LLM providers, progressive-disclosure skills, and Model Context Protocol (MCP) tool integration.
Use OpsCode when you need an agent in your terminal or CI/CD pipeline that can:
- Author and validate infrastructure code: Write and verify Terraform, OpenTofu, Kubernetes, Helm, Ansible, Jenkins, and GitHub Actions configurations with real CLI validation (
terraform validate,helm lint,actionlint). - Isolate noisy tool output in subagents: Delegate domain work to 6 specialized subagents—each running in its own
BranchMemoryStorecontext so multi-page provider schemas and plan logs never bloat your main conversation. - Produce diffs, not unreviewed deployments: Inspect state, validate plans, and present syntax-highlighted diffs gated behind 3 approval modes (
Manual,Auto,YOLO) and a 5-layer shell security scanner. - Grade its own work against rubrics: Attach acceptance criteria via
--rubricor/goalso an independent evaluator verifies every requirement before completing the task. - Extend to your internal platform: Load project-specific
AGENTS.mdmemory, 7-tierSKILL.mdplaybooks, custom.opscode/agents/subagents, and external MCP servers.
Quickstart
Install OpsCode and launch the interactive terminal interface:
# Install the ops binary
curl -LsSf https://raw.githubusercontent.com/talkops-ai/opscode/main/scripts/install.sh | bash
# Launch the interactive TUI
ops
Inside the TUI, run /auth to configure your preferred model provider (Anthropic, OpenAI, Google Gemini, AWS Bedrock, Ollama, or 15+ others), or run a one-shot headless task directly from your shell:
ops -n "Create a Terraform module for an AWS S3 bucket with KMS encryption and lifecycle rules" \
--rubric "Includes server-side KMS encryption, versioning enabled, public access block, and passes terraform validate"
Core capabilities
OpsCode is organized around four core architectural pillars:
Built-in filesystem and shell tools, QuickJS evaluation, remote cloud sandboxes, and MCP server integration.
Persistent AGENTS.md memory, 7-tier progressive skill loading, DevOps environment detection, and auto-compaction.
Six built-in DevOps subagents with isolated BranchMemoryStore contexts plus custom and async remote subagents.
Three runtime approval modes (Manual, Auto, YOLO), AST command scanners, lifecycle hooks, and rubric grading loops.
Execution environment
Built-in tools
OpsCode equips the root agent with tools for filesystem inspection, precision edits, shell execution, and goal verification:
| Tool | What it does |
|---|---|
execute | Runs shell commands with stdout/stderr capture, wall-clock timeouts, and preflight AST safety analysis |
read_file / write_file / edit_file | Reads, creates, and modifies files with exact diff previews |
delete | Removes files (always gated behind explicit approval) |
glob / grep / ls | Searches file paths, regex patterns, and directory structures |
web_search / fetch_url | Searches provider documentation, CVEs, and release notes and extracts clean Markdown |
js_eval | Evaluates JavaScript expressions inside an isolated, in-memory QuickJS interpreter |
get_goal / update_goal / get_rubric | Reads and updates active goal checklists and rubric acceptance criteria |
DevOps environment awareness
When executing commands or delegating to subagents, OpsCode automatically detects and preserves standard cloud and infrastructure environment variables:
- Kubernetes & Helm:
KUBECONFIG,KUBE_CONTEXT,HELM_HOME,HELM_REPOSITORY_CONFIG - AWS:
AWS_PROFILE,AWS_REGION,AWS_DEFAULT_REGION,AWS_SHARED_CREDENTIALS_FILE - Google Cloud:
GOOGLE_APPLICATION_CREDENTIALS,GOOGLE_CLOUD_PROJECT,CLOUDSDK_CORE_PROJECT - Azure:
AZURE_SUBSCRIPTION_ID,AZURE_TENANT_ID - Terraform, OpenTofu & Terragrunt:
TF_CLI_CONFIG_FILE,TERRAGRUNT_CONFIG - Ansible & ArgoCD:
ANSIBLE_CONFIG,ANSIBLE_INVENTORY,ARGOCD_SERVER,ARGOCD_AUTH_TOKEN
It also detects infrastructure workspace roots automatically via project markers (terragrunt.hcl, Chart.yaml, ansible.cfg, .opscode/, .git, pyproject.toml).
For cloud-isolated execution, you can run OpsCode inside ephemeral remote sandboxes (AgentCore, Daytona, Modal, Runloop, LangSmith). See Remote Sandboxes.
Context management
Global skills
Four built-in skills are available to the root agent across every workspace:
| Skill | Scope |
|---|---|
cloud-core | Cloud architecture fundamentals—least-privilege IAM, network segmentation, tagging, and FinOps |
docker | Multi-stage Dockerfiles, distroless/rootless images, layer caching, and container security |
kubernetes | Workload manifests, Pod Security Standards (restricted), RBAC, NetworkPolicies, and health probes |
remember | Persists repository conventions and incident learnings into AGENTS.md or reusable SKILL.md files |
Skills follow a 7-tier resolution order where project skills (.opscode/skills/) override user skills (~/.opscode/skills/), plugin skills, and built-in defaults. For details, see Memory and Skills.
Subagent delegation
Instead of loading dozens of infrastructure playbooks into a single monolithic prompt, OpsCode delegates domain work to 6 built-in subagents. Each subagent loads its domain skills on demand via progressive disclosure and executes inside an isolated memory branch:
| Subagent | Domain | Bundled skills |
|---|---|---|
aws-opentofu-provisioner | OpenTofu on AWS | 7 skills (IAM, VPC networking, KMS state encryption, testing, MCP schema lookup) |
aws-terraform-module-writer | Terraform on AWS | 7 skills (IAM policy engine, VPC patterns, module layout, validation & repair loops) |
ci-jenkins-automater | Jenkins CI/CD | 4 skills (Declarative pipelines, Job DSL, Shared Libraries, Jenkinsfile testing) |
github-actions-writer | GitHub Actions | 4 skills (Workflow architecture, matrix caching, OIDC security hardening) |
infra-ansible-provisioner | Ansible Automation | 7 skills (Role layout, ansible-lint, Execution Environments, Vault security) |
k8s-helm-provisioner | Kubernetes & Helm | 5 skills (Chart authoring, JSON schema validation, secrets, rollout recovery) |
You can also define custom project subagents in .opscode/agents/<name>/AGENTS.md or connect remote LangGraph deployments in config.toml. For details, see Subagents.
Steering & governance
OpsCode enforces the "Produce Diffs, Not Deployments" principle:
- Three approval modes: Toggle between
Manual(review every action),Auto(heuristic + AI safety classification), andYOLO(autonomous execution for disposable sandboxes) usingShift+Tabor CLI flags (--auto,-y). See Approval Modes. - Goals and grading rubrics: Use
/goalinteractively or--rubricin CI/CD to enforce multi-attempt self-verification before the agent exits. See Goals and Rubrics. - Lifecycle hooks: Trigger custom pre-tool and post-tool validation scripts via
hooks.json. See Hooks.
- Not a replacement for engineering review: Every generated Terraform plan, IAM policy, or Kubernetes manifest should be reviewed by an engineer before production rollout.
- Not an unattended production deploy bot: OpsCode generates plans and diffs; do not use
-y(YOLOmode) against live production state backends.
Get started
Install OpsCode, configure provider credentials, and run your first interactive or headless task.
Explore all flags, subcommands, exit codes, and CI/CD piping patterns for the ops binary.
Learn how the 6 built-in DevOps subagents work and create custom domain subagents.
Configure model profiles, MCP servers, remote sandboxes, and environment variables.