Omnigent Documentation

repository·main·Indexed 24 days ago

https://github.com/omnigent-ai/omnigent

Omnigent is an open-source meta-harness for orchestrating and managing multiple AI agents. It provides a unified layer for switching agent providers, managing cloud sandboxes, and collaborating across devices. The framework supports multiple sandbox providers including BoxLite (local micro-VMs and cloud mode) and CoreWeave Sandboxes, and can be deployed on Cloudflare (using Containers, D1, and R2) or Databricks Apps (using Lakebase and UC Volumes).

Tokens
142.5K
Snippets
267
Records
700
Agent score
92%

What's inside omnigent

  1. Overview of Omnigent Desktop (Electron)

    main

    Omnigent Desktop is a thin Electron-based shell that wraps the existing Omnigent web UI. It provides the same user experience as a web browser but adds native desktop features including:

    • OS-native notifications: Alerts for agent turn completions (runningidle/failed), new elicitation requests, or runner disconnections. Notifications include a preview of the agent's final message.
    • Foreground attention cues: On macOS and Windows, the app bounces the dock icon or flashes the taskbar frame to alert you even when the app is in the foreground.
    • Unread session badges: A dock/taskbar badge shows the number of unread sessions (sessions that finished a turn or asked for input while not being actively viewed).
    • Native menus: Standard text-editing shortcuts (Cmd/Ctrl-A, C, V, etc.) and a dedicated Server submenu for managing connections.
    • Native file support: Supports browser-style drag-and-drop for files like images directly into text fields.
    • Voice dictation: Integrated microphone support using a server-side fallback for transcription.
  2. Overview of omnigent-client

    main

    The omnigent-client is a typed Python SDK designed to drive omnigent sessions via the server's HTTP and SSE (Server-Sent Events) API.

    Key capabilities include:

    • Creating new sessions.
    • Sending turns to the agent.
    • Streaming responses.

    The client uses shared StreamEvent and SessionStreamEventType types to ensure that streamed envelopes are validated against the server's single source of truth.

  3. Overview of Omnigent Meta-Harness

    main
    Omnigent is an open-source meta-harness providing an orchestration layer for various AI agents including Claude Code, Codex, Cursor, OpenCode, Hermes, Pi, and custom agents. It allows developers to swap or combine different agent harnesses, enforce policies and sandboxing, and collaborate in real time across multiple devices (terminal, browser, phone, or native desktop app).
  4. Understand Omnibox Sandboxing

    main

    Omnibox is the OS-level sandbox used to isolate agent execution. It provides three layers of security:

    1. Filesystem Isolation: Only explicitly granted paths are visible; dotfiles are masked.
    2. Network Isolation: A default-deny egress proxy blocks private IPs and cloud metadata, allowing only allowlisted hosts.
    3. Credential Injection: Instead of giving the agent raw secrets, a placeholder token is injected into the sandbox. A credential proxy swaps this placeholder for the real secret only when an allowed request is made.
  5. Understand the Omnigent Desktop (Electron) Architecture

    main

    Omnigent Desktop is an Electron-based application designed with a security-first approach. It uses a main process to manage settings, window creation, and permissions, while the UI runs in a sandboxed environment.

    Key Components

    • Main Process (src/main.js): Manages settings persistence, window lifecycle, application menus, microphone permissions, and IPC handlers (e.g., normalize_url, change_server, navigate-to-server).
    • Preload Script (src/preload.js): Acts as the sole, serialization-safe bridge between the untrusted SPA and the main process using contextBridge. It exposes window.omnigentDesktop and omnigentSetup.
    • Browser Pane: Managed via src/browserViewRegistry.js and src/browserIpc.js to handle per-conversation web content.
    • Find Bar: A built-in find-in-page feature (Cmd/Ctrl+F) anchored to the top-right corner.

    Security Model

    • Isolation: Uses nodeIntegration: false and contextIsolation: true.
    • Origin Pinning: Every window is pinned to the specific server origin the user connected to. Privileged IPC handlers (like notify or setBadgeCount) verify that both the calling frame and the top-level page match the pinned origin.
    • Protocol Handling: Non-web schemes (e.g., vscode://, ssh://) trigger an OS protocol handler with a consent prompt showing the requesting origin and URL.
  6. Manage Omnigent app icons and logos

    main

    The platform-assets directory contains the shared native assets used by Omnigent web UI wrappers (Electron and iOS).

    • App Icons: AppIcon.icon is the source of truth for the Apple Icon Composer.
      • iOS: References AppIcon.icon directly.
      • Electron: Uses generated artifacts located in electron/icons/ (including Assets.car, icon.icns, icon.png, and icon.ico). This allows packaging without requiring Xcode.
    • Logos: The logos/ directory contains SVG files used for setup screens.
      • Electron: Loads these SVGs from platform-assets at runtime.
      • iOS: Symlinks these files into its asset catalog so the SwiftUI setup screen uses the same sources.
  7. Understand the Embedded Browser Pane architecture

    main

    The Omnigent Desktop shell uses a native Electron WebContentsView to host an embedded browser pane. This is a real Chromium page that is not an in-page webview or iframe, allowing for full screenshots, arbitrary in-page JS, and cross-origin navigation.

    Key Components

    • WebContentsView: A native Chromium view positioned over a placeholder <div> in the SPA. It runs with nodeIntegration:false, contextIsolation:true, and sandbox:true for security.
    • browserViewRegistry.js: Manages a per-conversation Map of up to 10 WebContentsViews. Views are detached (not destroyed) when switching conversations to keep background pages running.
    • browserIpc.js: The IPC surface handling commands like open-or-navigate, set-active, resize, screenshot, execute, close, and toolbar actions (go-back, go-forward, reload).
    • preload.js: Exposes the window.omnigentDesktop bridge to the renderer, providing access to browser controls and event subscriptions (e.g., onBrowserUrlChanged, onBrowserElementSelected).

    Agent Interaction Flow

    Agents drive the browser via messages over the session stream:

    1. Agent sends browser_* tool request to Omnigent server.
    2. Server sends browser.action_request (via SSE) to the Desktop Renderer.
    3. Renderer claims the action using an atomic token.
    4. Renderer drives the local WebContentsView via IPC.
    5. Result is posted back to the server and returned to the Agent.
  8. Understand Project-level Memory and Context

    main

    Omnigent distinguishes between two types of project-level data, both of which are owner-private and do not travel with shared sessions:

    1. Project-level Memory: Persistent, agent-accumulated learnings scoped to the project. It is stored in a DB (host-agnostic) and is designed to survive host churn and conversation compaction. It is intended to be accessible to the agent via a tool or system context.
    2. Project-level Context: User-curated reference material (pinned docs, links, instructions, files) that seeds every session's context. This is referenced live with a snapshot-at-turn behavior.
  9. Understand the Omnigent PyPI packaging model

    main

    Omnigent releases three PyPI packages that are version-locked together. To ensure compatibility, all three packages must share the exact same version number. When you install omnigent, it pins omnigent-client and omnigent-ui-sdk to the same version using ==.

    PackageDescription
    omnigentCore wheel (includes the web web UI)
    omnigent-clientPython client SDK
    omnigent-ui-sdkTerminal UI SDK
  10. Understand the Client-Side Message Queue and Steer Design

    main

    Omnigent uses a client-side message queue to manage user inputs before they are sent to the server. This allows users to edit, delete, reorder, or 'steer' messages while an agent is busy.

    Key Concepts:

    • Queue (Strip): A pre-POST draft buffer where messages are editable and visible as "⏱ Queued". Messages in the queue are not yet owned by the server.
    • Bubble: Once a message is POSTed (via auto-flush or manual steer), it is promoted from the strip to a chat bubble. Once in a bubble, it can no longer be edited, deleted, or reordered.
    • Steer: An action that immediately POSTs a queued message, attempting to deliver it mid-turn if the harness supports it.
    • Auto-flush: When the agent's sessionStatus becomes idle, the head of the queue (FIFO) is automatically sent as the next turn.

    Message Actions:

    • Edit: Pulls the message back into the composer (client-side only).
    • Delete: Removes the message from the queue.
    • Steer: Immediately POSTs the message to jump the queue.
    • Reorder: Uses a drag handle to change the order of messages within the queue.
  11. Understand the Harness Test Bench design

    main
    The Omnigent Harness Test Bench is an executable conformance suite used to verify the capabilities of AI agent harnesses. Instead of relying on manual spreadsheets, the bench runs live probes to empirically confirm if a harness supports specific dimensions (e.g., model switching, steering, or policy enforcement). It reconciles observed behavior against declared capability flags in the Executor class to detect DRIFT (where a harness claims to support a feature but fails to perform it).
  12. Understand the Omnigent Agent Spec

    main

    The Omnigent Spec is a language-neutral description of an agent's behavior. It serves as a portable contract that defines what an agent is, including its:

    • Capabilities: What the agent is able to do.
    • Tools: The specific functions or interfaces available to the agent.
    • Instructions: The behavioral guidelines and logic for the agent.
    • Configuration: The settings required for the agent to operate.

    Developers use the spec to define agent behavior, while runtimes use it to execute that behavior.