Learn R Programming

rtemis.llm R package

Unified interface for creating LLM and Agent objects, generating responses, and performing batch inference.
Built on a type-checked and validated 'S7' backend.
Features reasoning, structured output, memory management, and tool use.
Supports Ollama, OpenAI-compatible, and Anthropic-compatible endpoints.

Features

LLMAgent
Reasoning
Structured output
Tool usex
Memory managementx
Batch generation

Installation

R-universe

pak::repo_add(myuniverse = "https://rtemis-org.r-universe.dev")
pak::pak("rtemis.llm")

GitHub

pak::pak("rtemis-org/llm")

Documentation

For detailed documentation, see the rtemis.llm documentation.

Quick Usage

library(rtemis.llm)

List available Ollama models

ollama_list_models()

LLM

Create an LLM object

llm <- create_Ollama(
  model_name = "gemma4:26b",
  system_prompt = "You are a meticulous research assistant.",
  temperature = 0.3
)
generate(llm, "What is the role of the telomere?")

Agent

Create an Agent object

agent <- create_agent(
  llmconfig = config_Ollama(
    model_name = "gemma4:26b",
    temperature = 0.3
  ),
  system_prompt = "You are a meticulous research assistant.",
  name = "Kaimana"
)
generate(agent, "Explain quantum superposition in seven bullet points.")

Copy Link

Version

Install

install.packages('rtemis.llm')

Version

0.8.1

License

GPL (>= 3)

Maintainer

Efstathios D. Gennatas

Last Published

May 4th, 2026

Functions in rtemis.llm (0.8.1)

agentapply

Apply an Agent over a vector of prompts
config_Ollama

Create an OllamaConfig Object
config_Anthropic

Create a AnthropicConfig Object
as.list.Message

Convert Message to List
config_OpenAI

Create an OpenAI-compatible Config Object
anthropic_list_models

List Anthropic (Anthropic) Models
anthropic_check_model

Check Anthropic Model Is Available
create_Anthropic

Create a Anthropic LLM Object
as_list

Convert to R list
available_tools

Print built-in tools available for use by agents
create_custom_tool

create_custom_tool
generate

Generate Method
llmapply

Apply an LLM over a vector of prompts
create_agent

Create a rtemis.llm Agent
openai_check_model

Check OpenAI-compatible Model Is Available
ollama_get_model_info

Get Ollama Model Info
schema

Define output schema for LLM responses
ollama_check_model

Check Ollama Model is Available
reasoning

Extract reasoning trace(s) from a Message or list of Messages
map

Map
create_OpenAI

Create an OpenAI-compatible LLM Object
ollama_list_models

List Ollama Models
rtemis.llm-package

rtemis.llm: Agentic AI for the rtemis ecosystem
field

Define a schema field
openai_list_models

List OpenAI-compatible Models
tool_param

tool_param
create_Ollama

Create an Ollama Object
create_tool

create_tool
tools

Built-in Agent Tools
responses

Extract response(s) from a Message or list of Messages