R CI rtemis.llm status badge Docs

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

LLM Agent
Reasoning
Structured output
Tool use x
Memory management x
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.")