Skip to contents

Agents, budgets, and memory

Create agents with model configurations, personas, memory policies, and declared budgets.

agent()
Create an agent
budget()
Spending and effort limits for an agent
memory_buffer() memory_summary() memory_recall()
Agent memory policies

Governed tools and human review

Declare tool effects and limits, check boundaries, and pause tool calls for a human decision.

agent_tool()
Define a governed tool
guardrail()
Define a guardrail
guardrails()
Collect guardrails
human_gate()
Mark a point or a tool as requiring human approval
approve_tool_call()
Approve, reject, or edit a pending tool call
resume_run() as.character(<agent_resume_result>) print(<agent_resume_result>)
Resume a paused run after a tool-approval decision

Designed conversations and group decisions

Run general conversations or formats designed for argument, group discussion, interviews, and collective decisions.

conversation()
Run a multi-agent conversation
debate()
Structured debate between two agents
focus_group()
A moderated focus group
interview()
A semi-structured interview
deliberate()
Group deliberation with a recorded vote

Experiments and robustness

Run factorial designs and robustness batteries, and check cross-cell state leakage.

agent_experiment() print(<agent_experiment>)
Run a factorial agent experiment
check_state_leakage()
Detect shared state across experiment cells
agent_robustness()
Run a robustness battery
vary_models() vary_temperature() vary_prompt() vary_persona() vary_option_order()
Robustness perturbation axes

Personas and claim scope

Represent and vary personas, inspect essentializing language, and mark the scope of claims.

persona_frame() print(<persona_frame>) as.character(<persona_frame>)
A persona as an auditable research object
persona_variants() print(<persona_set>)
Vary a persona along named dimensions
persona_audit() print(<persona_audit>)
Audit persona briefs for essentializing language and caricature
mark_claim_type()
Mark the kind of claim a run can support
llm_claim_lint()
Assert (or scope) prose against a run's claim type

Delegation and model coordination

Coordinate specialist agents through model-directed delegation, fixed pipelines, or fan-out synthesis.

agent_as_tool()
Expose an agent as a tool for other agents
agent_pipeline()
Run input through a chain of agents
agent_fanout_synthesis()
Work a hard problem with one strong model and many cheap ones

Run records, archives, and reports

Create common run records, manifests, and inspectable archives. Includes report, diagnostics, and reset methods for LLMRagent results.

as_agent_run() as_tibble(<agent_run>)
Convert an LLMRagent result to a unified run object
agent_manifest()
Build the study manifest for a run
archive_agent_study()
Seal an agent study to a directory
hash_persona()
Hash a persona
hash_tool_spec()
Hash a tool's declared specification
llmragent-methods
LLMR-family methods for LLMRagent run objects
reexports diagnostics report reset
Objects exported from other packages
diagnostics(<agent_run>) diagnostics(<Agent>)
Machine-readable diagnostics for an agent run
diagnostics(<agent_experiment>)
Machine-readable diagnostics for an agent experiment
diagnostics(<persona_audit>)
Machine-readable diagnostics for a persona audit
report(<agent_run>) report(<Agent>)
Draft a methods-section report for an agent run
report(<agent_experiment>)
Draft a short report for an agent experiment
reset(<Agent>)
Clear an agent's memory

Resumable workflows and replay

Branched and resumable procedures with checkpoints, forks, and workflow replay.

agent_workflow()
Build an agent workflow (a small, explicit graph)
add_node()
Add a node to a workflow
add_edge()
Add an edge to a workflow
run_workflow()
Run a workflow
resume_workflow()
Resume a paused or failed workflow run
fork_workflow()
Fork a workflow run at a checkpoint
replay_run()
Replay a workflow run, verifying state hashes
workflow_from_pipeline()
Express an agent pipeline as a workflow

External tools and inspection

Connect governed MCP tools and write an HTML view of a run record.

mcp_tools()
Expose MCP server tools to an agent, under governance
view_run()
View a run as a self-contained HTML inspector

Saving and loading agents

Persist agent state and restore it with tool functions attached again.

save_agent()
Save an agent to disk
load_agent()
Load an agent from disk

Package

LLMRagent LLMRagent-package
LLMRagent: agents, multi-agent conversations, and agent experiments