Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 OpenCode2 Auto Agent

The plan rigor meets the build execution — fully autonomous, zero guardrails.

An autonomous agent for OpenCode 2 (opencode2, beta) that plans, executes, verifies, and summarizes — without ever interrupting you.

License OpenCode Platform PRs Welcome Made with ❤️


⚠️ Warning

This agent allows every action without confirmation — edits, shell commands, .env files, external directories. Use it only on projects where you accept the consequences. A fully permissive agent can damage your system if given bad instructions.


✨ What it does

Mode Role
build Executes tools based on configured permissions
plan Plans, forbids all modifications
auto Plans → executes → verifies → summarizes, never asks

The auto workflow

1. 🧭 Understand & plan      → analyze the code, state the plan (read/glob/grep)
2. ⚡ Execute               → run it end-to-end, no confirmation needed
3. 🔍 Verify               → tests, lint, review the diff
4. 📋 Summarize            → what was done, what changed, watch-outs

📦 Installation

Option A — Markdown file (recommended)

mkdir -p ~/.config/opencode/agents
cp agents/auto.md ~/.config/opencode/agents/

Option B — JSON config

Copy opencode.example.jsonc into your project or global config (opencode.jsonc / opencode.json), keeping only the agents block.

Option C — One-liner

mkdir -p ~/.config/opencode/agents && \
curl -o ~/.config/opencode/agents/auto.md \
  https://raw.githubusercontent.com/Ryvexam/opencode2-auto-agent/main/agents/auto.md

🕹️ Usage

  1. Run opencode2 in a project.
  2. Press Tab (or /agents) to cycle buildplanauto.
  3. Give it a task. The agent plans, executes, verifies, and summarizes — no prompts.

⚙️ Customization

Field Description
steps: 64 Max model steps. Lower for short tasks, raise for long-running.
color Agent color in the TUI.
permissions To re-add guardrails, append ask/deny rules at the end (last match wins).

🔬 Technical notes

  • OpenCode 2 is in beta: plugin API and config may change.
  • The agent is loaded dynamically by the background service — no restart needed for Markdown files.
  • System base rules (*.env, external_directory) are applied before agent rules, so the JSON version appends explicit allow rules at the end to override them.

🧩 Why auto?

Combine the discipline of a planner with the autonomy of a builder — for when you trust the task and just want it done.


About

Agent autonome pour OpenCode 2 (plan + build sans garde-fous)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors