Specification, review, and scaffolding helpers for AI agent systems. The package standardizes workflow, memory, knowledge, interface, proposal, and review artifacts so humans and coding assistants can infer, inspect, revise, and hand off task designs. It intentionally excludes communication layers, provider-specific model client code, and full runtime execution engines so that design artifacts and implementation transport remain cleanly separated.
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:
agentr organizes agentic designs around reviewable specs:
WorkflowSpec: procedural structure, nodes, edges, gates, branches, schemas, nested workflows, and implementation hints.MemorySpec: context, semantic, episodic, and procedural memory schema.KnowledgeSpec: developer-supplied narrative knowledge, rules, heuristics, exceptions, and optional graph-shaped knowledge.AgentSpec: approved higher-level design bundle.DesignReviewSpec: browser-review data bundle with workflow, memory, knowledge, proposals, and feedback schema.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.
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.
agentr can render:
render_workflow_graphviz()render_memory_schema_graphviz()render_schema_shape_graphviz()render_knowledge_graphviz()export_design_review_html(), render_task_preview(), and render_task_previews()See Design Review Layer, Workflow Spec, MemorySpec, and Graph Representations.
The documentation hub is docs/index.md.
Key pages:
remotes::install_github("OliverLDS/agentr")
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.