Skip to content

47thtechcorner/RayCodes_Omnigent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

🧠 OmniCoder Local — Databricks Omnigent + Ollama: 100% Free Local AI Coding Agent

Run a powerful AI coding agent on your own machine. Zero cloud. Zero cost. Zero data leaks. Powered by Omnigent (Databricks' open-source agent meta-harness) + Ollama.


✨ What Is This?

OmniCoder Local is a minimal, production-ready AI coding agent that runs entirely on your hardware. It uses Omnigent — Databricks' newly open-sourced agent orchestration meta-harness — to wrap an Ollama-served language model into an agent capable of writing, refactoring, and debugging code — with no API keys, no subscriptions, and no internet connection required after setup.

Omnigent is a control plane that sits above existing AI agents. It provides a uniform API, governance controls (spend caps, tool-access policies, secure sandboxing), and seamless interoperability — so you can compose, govern, and share agents within a single unified system.

This project is the companion code for the YouTube tutorial: "Databricks Omnigent: The Secret Coding Agent Orchestration - Run Locally!"

⚠️ Clone the official Omnigent framework from Databricks first:

# Clone the Omnigent meta-harness (required dependency)
curl -fsSL https://raw.githubusercontent.com/omnigent-ai/omnigent/main/scripts/install_oss.sh | sh

See Step 3 in the Setup Guide below for full details.


🛠️ Tech Stack

Layer Technology
Agent Harness Omnigent — Databricks open-source agent meta-framework (Apache 2.0)
Local LLM Runtime Ollama — Run LLMs locally via a REST API
Model qwen2.5-coder:1.5b — Fast, dedicated code generation model

⚠️ Windows Users — Read This First

Omnigent's CLI depends on POSIX-only system modules (fcntl, SIGUSR1, tmux) that do not exist on Windows. Running omnigent in PowerShell or CMD will crash with an AttributeError or ModuleNotFoundError.

The fix: use WSL 2 (Windows Subsystem for Linux). It gives you a real Linux environment where Omnigent works perfectly, and your Windows files are accessible from inside it.

Windows native support is on Omnigent's roadmap. Track it at github.com/omnigent-ai/omnigent.


⚡ Setup Guide

Step 1 — Windows: Install WSL 2 + Ubuntu

macOS / Linux users: skip to Step 2.

Open PowerShell as Administrator and run:

wsl --install

This installs WSL 2 with Ubuntu automatically. Restart your machine when prompted.

After restart, open the Ubuntu app from the Start menu. It will ask you to create a Linux username and password — do that, then keep working in that Ubuntu terminal for all steps below.

All remaining commands must be run inside the Ubuntu/WSL terminal, not PowerShell.


Step 2 — Install Ollama

curl -fsSL https://ollama.com/install.sh | sh

Then pull the coding model:

ollama pull qwen2.5-coder:1.5b

Verify Ollama is running:

curl http://localhost:11434/api/tags

You should see a JSON list of your installed models.


Step 3 — Install Omnigent

The official installer handles Python, uv, and all dependencies automatically:

curl -fsSL https://raw.githubusercontent.com/omnigent-ai/omnigent/main/scripts/install_oss.sh | sh

Restart your terminal (or run source ~/.bashrc), then verify:

omnigent --version

The installer adds two aliases: omnigent and the shorter omni. They are identical.


Step 4 — Configure the Ollama Gateway

Run the interactive setup wizard:

omnigent setup

When prompted:

  1. Choose "Add a credential"
  2. Select the openai-agents harness
  3. Choose Gateway as the credential type
  4. Set Base URL to: http://localhost:11434/v1
  5. Set API key to any value (e.g. ollama — Ollama does not validate keys)
  6. Set the model to: qwen2.5-coder:1.5b

🚀 Run the Agent

omnigent run local_coder_agent.yaml --prompt "Build me a responsive landing page for a SaaS product."

Save output to a file:

omnigent run local_coder_agent.yaml --prompt "Build a dark-mode todo app in a single HTML file." --output todo_app.html

✅ Test It Works

# 1. Confirm Ollama is live
curl http://localhost:11434/api/tags

# 2. Confirm Omnigent CLI is installed
omnigent --version

# 3. Run the agent with a quick prompt
omnigent run local_coder_agent.yaml --prompt "Write a CSS button with a hover animation."

📄 YAML Configuration Explained

# local_coder_agent.yaml

name: local_hacker           # Unique agent identifier used by Omnigent

prompt: >
  You are an elite frontend developer.
  Your only job is to write single-file,
  responsive, beautiful HTML/CSS/JS applications.
  Output raw code without markdown wrappers if possible.

executor:
  harness: openai-agents     # Omnigent's OpenAI-compatible harness — works with Ollama

Key insight: Ollama exposes an OpenAI-compatible REST API at /v1. Omnigent's openai-agents harness speaks this protocol natively. The gateway URL and model are configured once via omnigent setup and reused across all agents — no credentials need to be hardcoded in the YAML.


🎯 Use Cases

  • Rapid Prototyping — Generate full UI components and landing pages from a single sentence.
  • Offline Development — Code with AI assistance in air-gapped or low-connectivity environments.
  • Privacy-First Workflows — Keep proprietary code and internal tooling off cloud servers.
  • CI/CD Integration — Embed the agent into local build pipelines for automated code generation steps.
  • Learning & Exploration — Experiment with prompt engineering and agent design without any API costs.

🔭 Future Feature Ideas

  • File-aware context: Feed the agent your entire project directory so it can refactor across multiple files.
  • Tool use / function calling: Enable the agent to read/write files, run shell commands, and browse documentation.
  • Multi-agent pipelines: Chain a planner agent and a coder agent using Omnigent's orchestration layer.
  • Web UI: Add a lightweight Gradio or Streamlit frontend for non-terminal users.
  • Model benchmarking: Auto-run a prompt suite against multiple local models and score output quality.

📁 Project Structure

RayCodes_Omnigent/
├── README.md                  # This file
├── local_coder_agent.yaml     # Omnigent agent definition
└── .gitignore                 # Excludes large model files

📜 License

MIT — Free to use, fork, and ship.


Built with ❤️ for the open-source AI community.


Keywords: Databricks Omnigent, AI agent orchestration, local AI coding agent, Ollama local LLM, run AI agent locally, free AI coding agent, qwen2.5-coder, agent meta-harness, open source AI agent, Omnigent tutorial, AI coding offline, LLM orchestration, agentic AI workflow, coding agent WSL, multi-agent orchestration, Databricks open source, AI agent framework 2025, local code generation, privacy AI coding, zero cloud AI

About

Run Databricks Omnigent AI agent orchestration locally with Ollama — free, offline, private coding agent using qwen2.5-coder. No API key needed.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors