agentr

agentr is an R package for specifying, reviewing, and scaffolding agentic AI systems. It standardizes task-local specs for workflows, memory, knowledge, interfaces, proposals, and review artifacts so a coding assistant can inspect a project, infer or revise specs, render review HTML, and implement code against approved designs.

agentr is not a provider-specific LLM client, communication backend, domain-specific agent, or full execution engine. It supplies the spec shapes, renderers, validators, prompt contracts, and guidance that make agentic systems reviewable and portable across downstream runtimes.

The recommended end-to-end path is coding-assistant scaffolding:

existing task code and docs
-> coding assistant reads agentr guidance
-> assistant infers task-local YAML specs
-> agentr renders review HTML and graph views
-> human reviews specs, diagrams, and outputs
-> assistant revises specs or implementation
-> Git records the evolution

Humans generally should not need to write the implementation code by hand. The R functions remain important because the shipped guidance asks coding assistants to consume package helpers, conform to standardized spec shapes, validate artifacts, and render review pages. Function examples are still documented so humans can inspect what the assistant is using and debug the workflow when needed.

Start with:

What agentr Standardizes

agentr organizes agentic designs around reviewable specs:

The current built-in node-label ontology uses RWM, PG, AE, LA, and IAC, following the five-module vocabulary from Lamo Castrillo et al. (2025). These labels are not required for runtime execution. They are diagnostic annotations for graph coloring, human review, and capability discussion. Future labeling ontologies can coexist with the same workflow specs.

Spec Formats

Use the format that matches the boundary:

Typical task-local layout:

tasks/<task_id>/docs/
  workflow_spec.yaml
  memory_spec.yaml
  knowledge_spec.yaml
  review.html
  inference_notes.md

See Spec Formats.

Rendering And Review

agentr can render:

See Design Review Layer, Workflow Spec, MemorySpec, and Graph Representations.

Documentation

The documentation hub is docs/index.md.

Key pages:

Installation

remotes::install_github("OliverLDS/agentr")

Minimal R Inspection Example

The full workflow is usually driven by a coding assistant and task-local specs, but R helpers are useful for inspection:

library(agentr)

specs <- load_task_specs("tasks/write_new_blog_article")
validate_task_specs("tasks/write_new_blog_article", require = "workflow")

render_task_preview(
  "tasks/write_new_blog_article",
  output_path = file.path(tempdir(), "review.html")
)

For more snippets, see R Function Examples.