Skip to contents

Agents

One agent: a persona, a model, tools, memory, and hard budgets.

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

Delegation and pipelines

Agents calling agents, and fixed chains of specialists.

agent_as_tool()
Expose an agent as a tool for other agents
agent_pipeline()
Run input through a chain of agents

Conversations and study presets

Multi-agent dialogue over a shared transcript, and ready-made formats that return analysis-ready tibbles.

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

agent_experiment()
Run a factorial agent experiment
think_harder()
Work a hard problem with one strong model and many cheap ones

Persistence

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

Provenance and reproducibility

Turn any run into one unified object, hash its inputs, and seal a replayable archive.

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 full specification
hash_workflow()
Hash a run's control flow (the workflow)

Governance

Declared tool side effects, guardrails, human approval gates, and state-leakage diagnostics.

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()
Resume a paused run after a tool-approval decision
check_state_leakage()
Detect shared state across experiment cells

Validity

Anti-essentialist personas, claim-type discipline, a calibration bridge, and robustness batteries.

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
agent_calibrate()
Calibrate LLM/agent labels for valid downstream inference
attach_calibration()
Attach a calibration to an agent run
as_llmrcontent_validation()
Build a validation frame for LLMRcontent
agent_robustness()
Run a robustness battery
vary_models() vary_temperature() vary_prompt() vary_persona() vary_option_order()
Robustness perturbation axes

Workflows

A small, auditable DAG runtime with checkpoint, resume, fork, and 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 simulation

A governed MCP client, sandboxed tools, social-simulation scaffolding, and an HTML run inspector.

mcp_tools()
Expose MCP server tools to an agent, under governance
sandbox_tool()
Define a confined (sandboxed) tool
agent_population() print(<agent_population>)
Build a population of agents
society() print(<society>)
Assemble a society from a population, a network, and measures
step_interaction()
Advance one interaction round
collect_measures()
Collect measures over a society
exposure_matrix()
Exposure matrix: who could see whom
contamination_report()
Flag shared agent instances across a population
view_run()
View a run as a self-contained HTML inspector

Diagnostics and reporting

LLMR-family generics registered for LLMRagent objects: machine-readable health numbers, methods-section drafts, and state reset.

llmragent-methods
LLMR-family methods for LLMRagent run objects
reexports diagnostics report reset
Objects exported from other packages
diagnostics(<agent_run>)
Machine-readable diagnostics for an agent run
diagnostics(<agent_experiment>)
Machine-readable diagnostics for an agent experiment
diagnostics(<agent_calibration>)
Machine-readable diagnostics for a calibration
diagnostics(<persona_audit>)
Machine-readable diagnostics for a persona audit
report(<agent_run>)
Draft a methods-section report for an agent run
report(<agent_experiment>)
Draft a short report for an agent experiment
report(<society>)
Draft a disciplined report for a society
reset(<Agent>)
Clear an agent's memory

Package

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