anomalyco/opencode
Opencode
OpenCode is a framework for orchestrating autonomous AI agents within development environments. It provides a multi-tiered architecture where primary assistants manage user interaction while specialized subagents handle specific tasks like planning, research, and code generation. The system includes a comprehensive command-line interface for managing these workflows, configuring agent behavior, and defining custom tools or commands through metadata-rich files.
The platform features a modular plugin system and extensive integration support, including standardized protocols for connecting local and remote tool servers. It incorporates a security-focused architecture with granular permission controls, allowing users to define access policies for file operations, shell commands, and web access. These security measures are complemented by enterprise-grade infrastructure options, such as centralized authentication and private registry integration.
For developers, the project offers a type-safe SDK for building custom integrations and a RESTful API for programmatic system management. Configuration is handled through a schema-validated system that supports variable injection and multi-file organization. The interface is fully customizable, featuring a theme system for terminal displays and interactive commands for managing model selection and session history.
Features
- Agent Configurations - Agent behavior is defined via structured configuration files, supporting parameters for response creativity and execution limits to manage resource usage.
- MCP Server Controls - Granular control over tool availability using global or agent-specific settings and pattern-based filtering for secure tool execution.
- Action Resolution Policies - A policy system defining whether tool actions are automatically permitted, require user approval, or are blocked by default.
- Data Security Architectures - A security-focused architecture that avoids storing code or context, processing data locally or via direct API calls to trusted providers.
- Model Selection Strategies - A model-selection system that determines the active model based on a priority hierarchy of command-line flags, configuration files, and usage history.
- Command Configurations - Customizable command behavior supporting model overrides, agent assignment, subtask triggering, and descriptive metadata for command-line interfaces.
- Structured Output Handlers - SDK support for requesting validated structured data from models, including automated retry logic and error handling for reliable parsing.