r-ai

Integrate LLM chat, RAG, and agent execution into R applications.

19|1|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/arthurgailes/awesome-r-skills --skill r-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: r-ai
Source: https://github.com/arthurgailes/awesome-r-skills/tree/main/skills/r-ai
Command: npx skills add https://github.com/arthurgailes/awesome-r-skills --skill r-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies the integration of Large Language Models (LLMs) into R workflows, enabling advanced AI capabilities like chat, Retrieval-Augmented Generation (RAG), and agent-based task execution directly within R.

Core Features & Use Cases

  • LLM Chat Integration: Interact with various LLM providers (OpenAI, Anthropic, Ollama, etc.) directly from R.
  • RAG Workflows: Implement document search and retrieval to ground LLM responses in your data.
  • Agent Integration: Connect R to AI agents for code execution and task automation.
  • Evaluation: Assess the quality and accuracy of LLM outputs.
  • Use Case: Develop an R-based chatbot that can answer questions about your project's documentation by leveraging RAG, or build an agent that can write and execute R code based on natural language instructions.

Quick Start

Use the r-ai skill to chat with the OpenAI API using the provided API key.

Frequently Asked Questions about r-ai

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I integrate LLM chat capabilities into an R application?

To integrate LLM chat into an R application, use this Skill to connect with providers like OpenAI, Anthropic, and local Ollama models. You need to set the appropriate API keys and install R packages such as ellmer to enable direct chat workflows.

Can I build a RAG workflow in R to query my project documentation?

Yes, you can build a Retrieval-Augmented Generation (RAG) workflow in R to query your project documentation. This Skill supports document search and retrieval to ground LLM responses directly in your data using packages like ragnar.

What R packages are required to run AI agents locally?

To run AI agents locally, this Skill requires installing R packages like bttools, mcptools, and vitals. These packages facilitate agent-based task execution, allowing the agent to write and execute R code based on natural language instructions.

Does this Skill support local Ollama models or only cloud providers like OpenAI?

This Skill supports both cloud providers like OpenAI and Anthropic, as well as local Ollama models. You must configure the respective API keys for cloud providers, while local models run without external API dependencies.

How do I evaluate the quality and accuracy of LLM outputs in R?

You can evaluate the quality and accuracy of LLM outputs in R using the built-in evaluation features provided by this Skill. This allows you to assess generated responses, code execution results, and agent task accuracy directly within your R workflows.