Skip to content
dsincubatorPublic

About

Free agentic AI meetup materials

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Get started with AI agents

The goal of this meetup is to help you get started using AI agents for free.

By the end of this meetup you'll have a workflow that will take you a long way before you feel the need to spend any money.

Who is the audience?

Anyone curious about AI agents, particularly people who want to write code or use code to analyze data.

Why is it important?

Understanding what AI agents are can help you adapt to an increasingly popular way of executing your goals. Doing this for free helps you experiment without worrying about cost.

Objectives

  • Understand what's an AI agent.
  • Install and get started with a good and free AI agent.
  • Set it up to use R and Python interactively.
  • Use it inside your IDE.

Contents

Agents and models

An AI agent is a large language model (LLM) plus additional software (harness) that allows it to execute your goals.

$$ \text{Agent} = \text{LLM} + \text{Harness} $$

Without a harness an LLM can guide you towards your goals, but the one executing them is still you.

# https://ollama.com/download
ollama run qwen2.5:7b
>>> Write a new empty file.txt
To create an empty file named `file.txt` on a Unix-like system (such as Linux or 
macOS), you can use the following command in the terminal:

```bash
touch file.txt
```

The same LLM but with a harness can use tools and execute your goals.

# https://opencode.ai/download
opencode
## User
Write a new empty file.txt

## Assistant
**Tool: write**

## Assistant
Created an empty file named file.txt in the current directory.

There are many agents and models. Here we'll focus on a few that are useful and free.

Get started with OpenCode

https://opencode.ai/

What is OpenCode?
OpenCode is an open-source agent that helps you write and run code with any AI model.

How much does OpenCode cost?
OpenCode is 100% free to use. It also comes with a set of free models. There might be additional costs if you connect any other provider.

You can try opencode in a Docker container with:

docker run -it --rm ghcr.io/anomalyco/opencode

Or install it following the instructions for your OS, for example:

curl -fsSL https://opencode.ai/install | bash

Launch it:

opencode

Type / to see everything you can do. For example, use /models and /connect to switch to a provider like Google with an API key from Google AI Studio.

Learn more

Set up mcp-repl to use R and Python interactively

Coding agents typically run R or Python code with Rscript -e or python -c.

[This] keeps forcing the agent to rebuild context. mcp-repl keeps the session open instead: variables, loaded packages, plots, and other state stay available until you or the model reset.
-- https://github.com/posit-dev/mcp-repl

Now you can ask an AI agent to "read https://github.com/posit-dev/mcp-repl and set up mcp-repl for opencode."

These examples show the behavior with and without that tool:

  • With mcp-repl enabled
## User
Write a new empty file.txt

## Assistant
**Tool: write**

## Assistant
Created an empty file named file.txt in the current directory.
  • With mcp-repl disabled
## User
Run x <- 1 in R

## Assistant
Running `x <- 1` in R.
**Tool: bash**

## Assistant
Executed `x <- 1` in R via `Rscript`:
```
[1] 1
```
`x` assigned value `1` successfully.

## User
Now run exists("x")

## Assistant
Running `exists("x")` — noting Rscript sessions are isolated, so chaining with previous assignment.
**Tool: bash**

## Assistant
`Rscript -e 'print(exists("x"))'` returns:
```
[1] FALSE
```
Each `Rscript -e` invocation is an isolated process, so `x <- 1` from the previous call does not persist.
In the same session:
```
Rscript -e 'x <- 1; print(exists("x"))'
[1] TRUE
```

OpenCode in an IDE: RStudio and Positron

OpenCode, like most AI agents, can run in any terminal, including inside IDEs like RStudio or Positron.

Now go ahead, build something useful and have fun!

Resources

About

Free agentic AI meetup materials

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors