{"name":"DeclarAgent: Declarative Runbook Executor for Safe AI Agent Workflows","description":"DeclarAgent is an innovative declarative runbook executor specifically designed for AI agents. It enables agents to validate, dry-run, and safely execute multi-step YAML workflows. This tool provides a structured, auditable, and secure way for LLM agents to interact with real CLI workflows, enhancing their operational safety and reliability.","github":"https://github.com/shiehn/DeclarAgent","url":"https://osrepos.com/repo/shiehn-declaragent","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/shiehn-declaragent","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/shiehn-declaragent.md","json":"https://osrepos.com/repo/shiehn-declaragent.json","topics":["Go","AI Agents","Automation","DevOps","CLI Tools","Runbooks","LLM Tools","Model Context Protocol"],"keywords":["Go","AI Agents","Automation","DevOps","CLI Tools","Runbooks","LLM Tools","Model Context Protocol"],"stars":null,"summary":"DeclarAgent is an innovative declarative runbook executor specifically designed for AI agents. It enables agents to validate, dry-run, and safely execute multi-step YAML workflows. This tool provides a structured, auditable, and secure way for LLM agents to interact with real CLI workflows, enhancing their operational safety and reliability.","content":"## Introduction\n\nDeclarAgent is an innovative declarative runbook executor specifically designed for AI agents. It empowers large language model (LLM) agents to safely and reliably execute multi-step YAML workflows, including real CLI commands, HTTP requests, and built-in actions. By providing validation, dry-run capabilities, and explicit approval for destructive steps, DeclarAgent ensures that AI agents can interact with real-world systems in a controlled and auditable manner.\n\n## Why Use and Key Benefits\n\nDeclarAgent offers a range of features and benefits that make it an essential tool for secure and structured workflow execution by AI agents:\n\n*   **YAML Plans**: Human-readable, version-controllable runbooks.\n*   **Three Step Types**: Shell commands (`run`), built-in actions (`action`), and HTTP requests (`http`).\n*   **Dry-run & Explain**: Inspect exactly what will happen before execution.\n*   **Destructive-Step Gating**: Steps marked `destructive: true` require explicit approval.\n*   **Structured JSON Results**: Machine-readable output with typed errors for every run.\n*   **Built-in Actions**: File I/O, JSON manipulation, and environment access.\n*   **Template Engine**: Reference outputs from prior steps with `${{steps.<id>.outputs.<key>}}`.\n*   **MCP Server**: Expose plans as directly callable tools over the Model Context Protocol.\n*   **Plan-as-Tool**: YAML files in a directory automatically become MCP tools.\n\n## Installation\n\nTo install DeclarAgent, you will need [Go](https://go.dev/dl/){:target=\"_blank\"} installed on your system.\n\nbash\ngo install github.com/shiehn/declaragent@latest\n\n# Verify\ndeclaragent --help\n\n\nNote: This project is currently tested on macOS, and Linux should work out of the box. Windows requires WSL or a similar POSIX-compatible shell.\n\n## Examples\n\nDeclarAgent offers a straightforward command-line interface for managing your runbooks. Here are some quick start examples:\n\nbash\n# Validate a plan\ndeclaragent validate plan.yaml\n\n# See what it would do\ndeclaragent explain plan.yaml --input branch=main\n\n# Dry-run (resolves templates, shows commands)\ndeclaragent dry-run plan.yaml --input branch=main\n\n# Execute for real\ndeclaragent run plan.yaml --input branch=main\n\n# Execute with destructive steps allowed\ndeclaragent run plan.yaml --input branch=main --approve\n\n\nFor a practical demonstration, consider the `hello.yaml` plan:\n\nyaml\nname: hello\ndescription: Say hello to someone\ninputs:\n  name:\n    description: Who to greet\n    default: World\nsteps:\n  - id: greet\n    run: echo \"Hello, ${{inputs.name}}!\"\n    outputs:\n      message: stdout\n\n\nYou can run this plan with:\n\nbash\ndeclaragent run plans/hello.yaml --input name=Alice\n\n\nThis will output a greeting, demonstrating a simple shell command execution within a declarative plan.\n\n## Links\n\nFind the official repository and contribute on GitHub:\n\n*   [DeclarAgent GitHub Repository](https://github.com/shiehn/DeclarAgent){:target=\"_blank\"}","metrics":{"detailViews":0,"githubClicks":0},"dates":{"published":null,"modified":"2026-09-12T15:46:09.000Z"}}