DEV Community

Cover image for SOLO: A Local-First AI Developer Agent That Works With Gemma 4
Vishal Kumar
Vishal Kumar

Posted on

SOLO: A Local-First AI Developer Agent That Works With Gemma 4

Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady Submission 🦥

This is my submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady.

What I Built

I built SOLO, a local-first AI developer agent designed to help developers work with AI without being locked into a single model or cloud provider.

I wanted to explore something beyond a basic AI chatbot. Something that could actually interact with a development environment, understand project context, use tools, and help with everyday engineering tasks.

Most AI coding assistants depend heavily on hosted APIs. That's useful, but I also wanted the option to work locally, keep development context on my own machine, and switch between different AI models whenever needed.

That's where SOLO comes in.

With SOLO, developers can use a locally running Gemma 4 model through Ollama or connect to hosted AI providers. The same agent runtime handles both.

Some things SOLO can do:

  • Read and search project files.
  • Write and modify files through controlled tools.
  • Execute calculations.
  • Run restricted shell commands with permission checks.
  • Use skills to provide additional instructions and capabilities.
  • Connect external tools through MCP.
  • Maintain sessions, memory, and execution traces.
  • Switch between local and hosted AI providers.

The idea is simple: Your development agent, your models, your environment, your control.

Demo

[Add your SOLO demo video or deployed dashboard link here]

A short walkthrough showing local Gemma 4 running through Ollama, interacting with the agent, using tools, and switching providers would be a good demonstration.

Code

GitHub Repository: [Add your SOLO GitHub repository URL]

I'd love for developers to explore the implementation, experiment with different models, and contribute ideas.

How I Built It

I built SOLO around a shared agent runtime rather than creating separate implementations for different AI providers.

This was important because I didn't want the agent's behavior to change completely whenever someone switched models.

1. Gemma 4 + Ollama (Local AI)

For the local AI setup, I integrated Gemma 4 through Ollama.

I'm currently using gemma4:e2b locally.

Ollama makes it possible to run the model on my own machine and communicate with it through a local API.

This gives SOLO an offline-capable model option without requiring every interaction to go through a hosted AI service.

2. Multiple AI Providers

I didn't want SOLO to depend on just one model.

The provider architecture supports:

  • Ollama local provider.
  • OpenAI-compatible API provider.
  • Optional LiteLLM adapter.

This makes it possible to experiment with different models without rebuilding the entire agent.

3. The Agent Runtime

The core of SOLO is a shared runtime implemented in Python.

Both the CLI and API use the same SoloContext runtime.

The agent follows a controlled execution flow:

  1. Receive the user's request.
  2. Validate the request.
  3. Load relevant skills.
  4. Send context to the selected model.
  5. Validate requested tool calls.
  6. Check permissions.
  7. Request approval when required.
  8. Execute approved tools.
  9. Persist the result and execution trace.

I wanted the agent to have actual boundaries instead of blindly executing whatever the model suggests.

4. Tools and Permissions

SOLO includes tools for:

  • File listing and reading.
  • File writing.
  • Project search.
  • Calculations.
  • Restricted shell execution.

Shell execution is disabled by default and uses an allowlist.

The agent also supports approval workflows, so sensitive operations are not automatically executed without authorization.

5. MCP Integration

Another interesting part of this project is Model Context Protocol (MCP).

SOLO supports MCP connections through:

  • stdio
  • SSE
  • Streamable HTTP

This allows the agent to connect to external tools and services instead of being limited to its built-in capabilities.

6. Memory and Sessions

I also implemented persistent sessions, memory, and execution traces using SQLite.

This helps keep track of previous interactions and makes it easier to inspect what the agent actually did.

7. Dashboard and CLI

SOLO isn't limited to a terminal.

The project includes:

  • Typer-based CLI.
  • FastAPI backend.
  • React + Vite dashboard.

The dashboard provides an interface for interacting with the agent and managing its functionality.

Tech Stack

Component Technology
AI Model Gemma 4 (gemma4:e2b)
Local Inference Ollama
Backend Python, FastAPI
CLI Typer
Frontend React, Vite
Database SQLite
AI Providers Ollama, OpenAI-compatible APIs, LiteLLM
Tool Integration MCP
Testing Pytest

Why Does Open Innovation Matter?

One of the biggest reasons I wanted to work with open-weight models was control.

Developers should have the freedom to experiment with AI without always depending on external APIs.

Using Gemma 4 with Ollama gives SOLO a local execution option. It makes experimentation easier and allows developers to keep model interactions on their own machine when using the local provider.

I also like that open models encourage developers to understand what's happening behind the interface rather than treating AI as a black box.

For me, this challenge was a good opportunity to explore how open-weight models can become part of real developer tools.

The Lazy Payoff

The biggest benefit of SOLO is that I don't have to build a completely different agent whenever I want to try another model.

I can switch between a local Gemma 4 model and hosted providers while keeping the same agent runtime, tools, and workflow.

It also gives me a structured way to experiment with tool execution, project context, permissions, and MCP integrations.

I'm still improving the project, but building it has taught me a lot about what goes into making an AI agent useful beyond simply generating text.

What I Learned

Building SOLO helped me understand that an AI agent is much more than a model connected to a chat interface.

The interesting engineering challenges are around:

  • Tool execution and validation.
  • Provider abstraction.
  • Permission management.
  • Session persistence.
  • Error handling and retries.
  • Keeping local and hosted model workflows consistent.

These are the parts I enjoyed exploring the most.

What's Next?

I want to continue improving SOLO by making its tool ecosystem more extensible, strengthening its security, improving the developer experience, and exploring more open-weight models.

My long-term goal is to make SOLO a practical agent harness that developers can run locally, customize, and extend according to their own workflows.


Built with curiosity, Python, Ollama, and Gemma 4.

Thanks for checking out SOLO!

Hacktoberfest #Gemma4 #Ollama #OpenSource #AI #DeveloperTools

Top comments (0)