Origin
agm-cli was originally built as an internal tool for the Octopus
project, where it served as the backbone for orchestrating AI-agent
workflows over structured knowledge graphs. It has since been extracted
and released as a standalone, general-purpose CLI + library so that any
project can adopt the AGM format and its execution model.
What is AGM?
AGM is a compact, line-oriented text format for representing knowledge as a directed graph. It is designed for AI agent workflows: each node encodes a unit of knowledge (facts, rules, workflows, decisions, etc.) with explicit dependencies, verification contracts, and execution semantics. AGM files can be statically analyzed or orchestrated as runnable graphs.
Installation
agm-cli is distributed exclusively through crates.io.
A working Rust toolchain (stable) is required.
Pin a specific version:
Upgrade to the latest published version:
From source
Uninstall
Quick Start
# Validate an AGM file against the spec
# Run extended quality checks
# Render to Markdown
# View the dependency graph (DOT format)
# Load nodes at summary level (JSON output)
Commands
| Command | Description |
|---|---|
validate |
Validate an AGM file against the specification |
lint |
Run extended quality checks (validate + heuristics) |
load |
Load nodes at a specific expansion level (JSON output) |
render |
Render to another format (JSON, Markdown, DOT, Mermaid, canonical AGM) |
graph |
Output the dependency graph (DOT or Mermaid) |
run |
Execute nodes in dependency order via an agent backend |
status |
Show execution status of nodes |
retry |
Retry failed node executions |
state |
Manage execution state (list, get, export, import, reset) |
mem |
Manage memory sidecars (list, get, export, import, gc) |
context |
Build and display agent context for a node |
verify |
Run verification checks on nodes |
update |
Update agm to the latest version |
Library Usage
The agm-core crate provides the parsing, validation, loading, graph, and rendering engine as a library:
use parse;
use validate;
use ;
let source = read_to_string.unwrap;
let file = parse.expect;
let diagnostics = validate;
if diagnostics.iter.all
Documentation
- CLI API Reference -- Complete command reference with examples, options, and edge cases
- AGM Specification v1.1.0 -- Full format specification
- Library API (docs.rs) -- Auto-generated Rust API docs for
agm-core - Contributing -- How to contribute
Updating
New versions are published to crates.io. To upgrade:
Contributing
See CONTRIBUTING.md for development setup, testing, and PR guidelines.
License
Licensed under the Apache License, Version 2.0.
Copyright 2025-2026 Jose Angel Avila.