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:
- Coding Assistant Scaffolding
- Full-Stack Task Spec Inference Guide
- Workflow-Only Task Spec Inference Guide
- WorkflowSpec Inference Guide
- MemorySpec Inference Guide
- KnowledgeSpec Inference Guide
- Task Code Construction Guide
- Node Script Construction Guide
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.- Proposal states: explicit review loops for workflow, agent, memory, and knowledge.
- Optional node labels: diagnostic color/ontology labels for understanding workflow nodes.
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:
- YAML is the preferred human-editable source in task folders.
- JSON is for LLM responses, browser feedback, and machine interchange.
- RDS/R6 is for R-native helper objects, proposal state, validation, and cache artifacts.
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:
- workflow graphs with
render_workflow_graphviz() - memory-schema graphs with
render_memory_schema_graphviz() - schema-shape graphs with
render_schema_shape_graphviz() - knowledge graphs with
render_knowledge_graphviz() - integrated task review pages with
export_design_review_html(),render_task_preview(), andrender_task_previews()
See Design Review Layer, Workflow Spec, MemorySpec, and Graph Representations.
The documentation hub is docs/index.md.
Key pages:
- Architecture
- Workflow Spec
- MemorySpec
- KnowledgeSpec Lifecycle
- Graph Representations
- Proposal Lifecycle
- Workspace CLI Lifecycle
- R Function Examples
- Function Index
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.