Skip to content

semtexzv/genagent

Repository files navigation

GenAgent

GenAgent Screenshot

A taskbar AI assistant for macOS/iOS that can be invoked anytime to help with programming tasks and general assistance.

What it does

GenAgent runs in your taskbar and provides instant AI assistance through:

  • Multiple AI agents that can work on different tasks simultaneously
  • File operations, command execution, and git integration
  • Web search and content fetching
  • Persistent memory and conversation history
  • Voice input/output capabilities

Tech Stack

Backend (Rust)

  • tokio - Async runtime
  • nom - Parser combinators
  • serde + Protocol Buffers - Serialization
  • uniffi - Rust-Swift FFI bridge
  • Custom fork of genai crate for multi-provider AI support

Frontend (Swift)

  • SwiftUI + Combine
  • Native macOS/iOS integration
  • Real-time streaming UI updates

AI Providers

  • OpenAI, Anthropic (Claude), Google (Gemini)
  • Groq, Cohere, Ollama (local models)

Audio

  • Deepgram (transcription)
  • OpenAI (text-to-speech)
  • Hotword detection

Architecture Highlights

  • Tool-based system: Extensible architecture where agents use tools (read, write, exec, git, search, memory, thought) to accomplish tasks
  • Custom protocol: Delimiter-based message protocol using ◊tool markers for reliable parsing
  • Sandboxed execution: Working directory isolation for security
  • Cross-platform FFI: Universal binary support for Apple Silicon/Intel, iOS devices/simulators
  • Streaming responses: Real-time response handling with backpressure management
  • Persistent state: Crash-resistant agent and conversation storage

Project Structure

genagent/
├── src/                    # Rust core
│   ├── agent/             # Agent management
│   ├── tools/             # Tool implementations  
│   ├── audio/             # Audio processing
│   └── proto/             # Protocol buffers
├── AgentUI/               # Swift UI
├── Generated/             # FFI bindings
└── pkg/rust-genai/        # AI providers

Key Features

  • Multi-agent task management with independent execution contexts
  • Parser combinator-based command parsing for reliability
  • Protocol buffer serialization for efficient storage
  • Exponential backoff retry logic for API resilience
  • Weak reference management to prevent UI memory cycles
  • State machine-based agent lifecycle management

Use Cases

Originally designed as a general-purpose AI assistant that lives in your taskbar, GenAgent can:

  • Write and modify code
  • Execute shell commands
  • Search documentation
  • Manage git repositories
  • Fetch web content
  • Remember context across sessions
  • Handle voice commands

The architecture makes it suitable for any task that benefits from AI assistance with system-level access.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published