Package: LLMRagent 0.8.0

Ali Sanaei

LLMRagent: Reproducible Language-Model Agents for Research

An 'R' interface built on 'LLMR' creates large language model (LLM) agents for use as reproducible and governed research instruments. Agents pair a model configuration with optional persona instructions. Stateful exchanges retain conversational memory, and native 'R' functions can serve as tools within declared budgets. Several agents can hold a turn-taking conversation over a shared transcript, and factorial experiments across such designs run in parallel. Model calls and tool activity are captured in a run object, so the research record extends beyond generated text. A study manifest hashes the design and computational apparatus without treating sampled replies as part of its identity, and a hash-sealed archive preserves it alongside transcripts and call records. Tool policies record declared side effects and can limit call counts or result sizes; calls marked for human review pause before execution. Robustness checks assess sensitivity to prompt or model changes, while calibration against human labels corrects estimates drawn from imperfect model labels.

Authors:Ali Sanaei [aut, cre]

LLMRagent_0.8.0.tar.gz
LLMRagent_0.8.0.tar.gz(r-4.7-any)LLMRagent_0.8.0.tar.gz(r-4.6-any)
LLMRagent_0.8.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
LLMRagent/json (API)

# Install 'LLMRagent' in R:
install.packages('LLMRagent', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/asanaei/llmragent/issues

Pkgdown/docs site:https://asanaei.github.io

On CRAN:

Conda:

3.60 score 64 exports 43 dependencies

Last updated from:09e71470aa. Checks:4 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK164
source / vignettesOK253
linux-release-x86_64OK141
wasm-releaseOK140

Exports:add_edgeadd_nodeagentAgentagent_as_toolagent_calibrateagent_experimentagent_manifestagent_pipelineagent_populationagent_robustnessagent_toolagent_workflowapprove_tool_callarchive_agent_studyas_agent_runas_llmrcontent_validationattach_calibrationbudgetcheck_state_leakagecollect_measurescontamination_reportconversationdebatedeliberatediagnosticsexposure_matrixfocus_groupfork_workflowguardrailguardrailshash_personahash_tool_spechash_workflowhuman_gateinterviewllm_claim_lintload_agentmark_claim_typemcp_toolsmemory_buffermemory_recallmemory_summarypersona_auditpersona_framepersona_variantsreplay_runreportresetresume_runresume_workflowrun_workflowsandbox_toolsave_agentsocietystep_interactionthink_hardervary_modelsvary_option_ordervary_personavary_promptvary_temperatureview_runworkflow_from_pipeline

Dependencies:askpassbase64enccachemcallrclicodetoolscpp11curldigestdplyrfastmapfuturefuture.applygenericsglobalsgluehttr2jsonlitelifecyclelistenvLLMRmagrittrmemoisemimeopensslotelparallellypillarpkgconfigprocessxpspurrrR6rlangstringistringrsystibbletidyrtidyselectutf8vctrswithr

A deliberation experiment: group composition and collective decisions

Last update: 2026-07-21
Started: 2026-07-21

Designed conversations: debates, focus groups, interviews, deliberations
Debate: the strongest case for each side | Focus group: opinions in company | Interview: depth on one respondent | Deliberation: talk, then decide | From transcripts to analysis

Last update: 2026-07-21
Started: 2026-07-21

Governed tools and human review: letting an agent act, safely
A governed tool declares its powers | Guardrails check what flows in and out | Human approval for the irreversible | Putting it together

Last update: 2026-07-21
Started: 2026-07-21

LLMRagent in 10 minutes
A first agent | Tools: let the agent call your R functions | Budgets: spend ceilings the agent cannot cross | Structured answers | Agents calling agents | Pipelines: a fixed sequence of specialists | A two-agent conversation

Last update: 2026-07-21
Started: 2026-07-21

Provenance and archiving: an agent run as evidence
One object, five views | Diagnostics for a run | Reporting within scope | The manifest: identity without the transcript | Archiving: seal the evidence | Redaction without lying | Why archive

Last update: 2026-07-21
Started: 2026-07-21

Strong planner, cheap workers: one strong model coordinating many cheap ones

Last update: 2026-07-21
Started: 2026-07-21

Validity: robustness, calibration, and honest claims
Robustness: does the result hold under a small perturbation? | Calibration: from a guess to a measurement | Claim types: say what you mean | The shape of an honest study

Last update: 2026-07-21
Started: 2026-07-21

Workflows: small, auditable, resumable pipelines
State in, state out | Branches and loops | Checkpoints, resume, and fork | Replay verification | When to reach for this

Last update: 2026-07-21
Started: 2026-07-21

Readme and manuals

Help Manual

Help pageTopics
Add an edge to a workflowadd_edge
Add a node to a workflowadd_node
Create an agentagent
Expose an agent as a tool for other agentsagent_as_tool
Calibrate LLM/agent labels for valid downstream inferenceagent_calibrate
Run a factorial agent experimentagent_experiment
Build the study manifest for a runagent_manifest
Run input through a chain of agentsagent_pipeline
Build a population of agentsagent_population print.agent_population
Run a robustness batteryagent_robustness
Define a governed toolagent_tool
Build an agent workflow (a small, explicit graph)agent_workflow
The Agent classAgent Agent-class
Approve, reject, or edit a pending tool callapprove_tool_call
Seal an agent study to a directoryarchive_agent_study
Convert an LLMRagent result to a unified run objectagent_run as_agent_run as_tibble.agent_run
Build a validation frame for LLMRcontentas_llmrcontent_validation
Attach a calibration to an agent runattach_calibration
Spending and effort limits for an agentbudget
Detect shared state across experiment cellscheck_state_leakage
Collect measures over a societycollect_measures
Flag shared agent instances across a populationcontamination_report
Run a multi-agent conversationconversation
Structured debate between two agentsdebate
Group deliberation with a recorded votedeliberate
Machine-readable diagnostics for a calibrationdiagnostics.agent_calibration
Machine-readable diagnostics for an agent experimentdiagnostics.agent_experiment
Machine-readable diagnostics for an agent rundiagnostics.Agent diagnostics.agent_run
Machine-readable diagnostics for a persona auditdiagnostics.persona_audit
Exposure matrix: who could see whomexposure_matrix
A moderated focus groupfocus_group
Fork a workflow run at a checkpointfork_workflow
Define a guardrailguardrail
Collect guardrailsguardrails
Hash a personahash_persona
Hash a tool's full specificationhash_tool_spec
Hash a run's control flow (the workflow)hash_workflow
Mark a point or a tool as requiring human approvalhuman_gate
A semi-structured interviewinterview
Assert (or scope) prose against a run's claim typellm_claim_lint
LLMR-family methods for LLMRagent run objectsllmragent-methods
Load an agent from diskload_agent
Mark the kind of claim a run can supportmark_claim_type
Expose MCP server tools to an agent, under governancemcp_tools
Agent memory policiesmemory memory_buffer memory_recall memory_summary
Audit persona briefs for essentializing language and caricaturepersona_audit print.persona_audit
A persona as an auditable research objectas.character.persona_frame persona_frame print.persona_frame
Vary a persona along named dimensionspersona_variants print.persona_set
Replay a workflow run, verifying state hashesreplay_run
Draft a short report for an agent experimentreport.agent_experiment
Draft a methods-section report for an agent runreport.Agent report.agent_run
Draft a disciplined report for a societyreport.society
Clear an agent's memoryreset.Agent
Resume a paused run after a tool-approval decisionresume_run
Resume a paused or failed workflow runresume_workflow
Robustness perturbation axesrobustness-axes vary_models vary_option_order vary_persona vary_prompt vary_temperature
Run a workflowrun_workflow
Define a confined (sandboxed) toolsandbox_tool
Save an agent to disksave_agent
Assemble a society from a population, a network, and measuresprint.society society
Advance one interaction roundstep_interaction
Work a hard problem with one strong model and many cheap onesthink_harder
View a run as a self-contained HTML inspectorview_run
Express an agent pipeline as a workflowworkflow_from_pipeline