BunCosmos AI Research Lab

A Practical Guide to Open Source AI Agents

How agents use tools and what you can run locally

Ask a chatbot how to repair a broken test and it can suggest a change. Give an AI agent the right tools and it can read the failing test, edit a file, run the test again and use the result to decide what to do next. Open-source agent projects make that sequence inspectable and give users choices about the model, the tools and the permissions behind each step.

The Model and the Agent Have Different Jobs

The language model proposes what to do. The agent software decides which tools are available, sends the model information from the task, and handles requests to use those tools. An inference runtime such as Ollama or LM Studio runs a downloaded model and can serve it to an agent on the same machine. The agent can also use a hosted model through an API. In that setup, the provider receives whatever the agent sends for the task, potentially including parts of local files or tool results.

A licence such as MIT or Apache 2.0 can cover the agent’s source code while the connected model has separate terms. Open weights are the downloadable numerical parameters learned during training. The Open Source Initiative’s definition for AI systems also calls for the code used to train and run the system and enough information about the training data for a skilled person to build a substantially equivalent system. An agent’s licence alone tells you little about the model’s training materials or where your information will go.

Start With the Job

A coding agent works inside a repository. A personal agent can work across websites, documents and connected accounts. A framework gives developers the pieces to build their own agent and choose which tools it can call. Those differences matter when you decide what to install. A tool built to review a folder may need only read access. An agent asked to reschedule appointments needs a calendar connection and permission to change events.

Open Source Agents by Task

Project

Code licence

What it offers

OpenCode

MIT

Terminal coding agent with configurable tool and path permissions. Supports local Ollama.

Aider

Apache 2.0

Terminal pair programmer with Git history and undo for its edits. Connects to Ollama.

Qwen Code

Apache 2.0

Terminal coding agent with configurable model providers, including compatible self-hosted endpoints.

OpenHands

MIT repository

Software development agent that can work in a sandbox. Supports local model servers such as Ollama and LM Studio.

goose

Apache 2.0

Extensible agent with desktop and terminal interfaces, permission modes and local model options.

smolagents

Apache 2.0

Python framework for building tool-using agents. Supports local Transformers models and Docker execution for generated code.

OpenClaw

MIT

Personal agent with messaging integrations. Its security guidance assumes a trusted operator or team per gateway.

Hermes Agent

MIT

General-purpose agent from Nous Research with persistent memory, reusable skills and support for local models.

Nod

Apache 2.0

Personal agent from n8n Labs with a browser and workspace. Available as a research preview.

Licences refer to the linked code repositories. Model licences and hosted services have their own terms.

What Changes as the Agent Gets More Access

Aider’s Git integration makes a code edit visible and reversible. With a personal agent, the action can happen in another service, where undo may work differently or be unavailable. A useful comparison is how each project lets you review actions before they happen and see what actually happened afterwards.

Local Files Can Still Reach a Cloud Model

Nod’s documentation distinguishes local storage from model and connection services. An installed app does not by itself guarantee that prompts, files or account operations stay on the device; those depend on the model provider, connectors and settings.

What You Can Run on a Laptop

For a machine with 8 GB of RAM, a modest first experiment is a small quantised model and one short task. Quantisation stores model weights at lower precision to reduce their size. Ollama lists its Q4 version of Qwen3 4B at about 2.5 GB on disk. Running it takes additional memory for the model runtime, the operating system and the working context, which grows as the agent reads files and receives tool results. LM Studio recommends at least 16 GB of RAM and says smaller models with modest contexts may work on some 8 GB Macs.

Getting a model to answer a question is a lower bar than getting it to call tools reliably through a long session. OpenHands’ own local-model guide recommends a capable model and GPU-backed inference for the best experience. On a low-memory laptop, a read-only file review or a suggested edit in a small repository makes a more informative first test than a full browser workflow or a large codebase.

A First Task You Can Verify

Give a coding agent a copy of a small repository and one question. Ask it to find where a setting is loaded, name the relevant file and explain which test covers it. Grant read access to that copy and verify the file and test yourself. If the answer is accurate, try a small edit on a separate Git branch. Review the diff and run the relevant test before accepting the change.

For a personal agent, try summarising a folder of sample documents and asking it to name the source for each key point. Keep it away from live inboxes and signed-in browser sessions during the trial. Compare the answer with the documents. This tests whether the agent can retrieve evidence and stay within the task before you grant access to real accounts.

Set the Limits Outside the Model

An email, webpage or repository file can contain text designed to redirect an agent. This is indirect prompt injection. Use tool permissions and isolation to limit what the agent can reach, and review the exact action before authorising a message, deletion, payment or deployment. A local model can keep inference on your own hardware while connected tools still contact external services.

Measure the first run by whether the answer or edit was correct, how much time it took to check, and whether the agent respected the permissions it was given. Those results tell you which parts of the next task you can safely delegate.

Sources

Licensing and Local Inference

Open Source AI Definition

LM Studio offline operation · LM Studio system requirements

Ollama Qwen3 4B model entry · Ollama context length

Coding Agents and Frameworks

OpenCode repository · Providers · Permissions

Aider repository · Git integration · Ollama setup

Qwen Code repository · Provider configuration

OpenHands repository · Local models and hardware

goose repository · Model providers · Permission modes

smolagents repository · Model reference · Agent executors

Personal Agents and Security

OpenClaw repository · OpenClaw security guidance

Hermes Agent repository · Hermes local models

Nod repository and privacy notes · n8n Labs research preview announcement

OWASP AI Agent Security Cheat Sheet

BunCosmos AI Research LabBack to top ↑