Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prism Agent

An AI coding agent for macOS and iOS with local inference, graph-backed reasoning, multi-agent orchestration, and collaborative sessions.

Website: prism-agent.butterbase.dev

Products

Product Platform Description
Prism Agent macOS Full-featured coding agent IDE with chat, plan system, tool execution, and collaboration
Prism Agent for iOS iOS Companion app for remote session browsing, chat, and notifications
PrismAgentSDK Swift Package Developer SDK for building on Prism Agent's inference, memory, and orchestration stack

Architecture

```mermaid
flowchart TB
    subgraph Input["Input Layer"]
        Chat["User Chat / IDE"]
        File["File Context"]
        Git["GitHub Events"]
    end

    subgraph Agent["Agent Layer"]
        Obs["AgentObserver"]
        Plan["Plan Document"]
        Sub["SubAgent Pool"]
    end

    subgraph Inference["Inference Layer"]
        Local["vLLM-metal<br/>(Ornith 1.0)"]
        CloudAPI["Cloud API"]
        KVC["KV Cache<br/>(memorySaver)"]
    end

    subgraph Memory["Memory Layer"]
        Valkey["Valkey/RESP<br/>Context Engine"]
        Neo4j["Neo4j Aura<br/>Graph Memory"]
        LMDB["LMDB<br/>Document Cache"]
    end

    subgraph Backend["Backend Layer"]
        BB["Butterbase<br/>Auth + Quota + Deploy"]
        RR["RocketRide<br/>Pipeline Runtime"]
        GH["GitHub REST API<br/>Issues + PRs + Code"]
    end

    Chat --> Obs
    File --> Obs
    Git --> Obs

    Obs --> Neo4j
    Obs --> GH
    Obs --> Plan

    Plan --> Sub
    Sub --> Local
    Sub --> CloudAPI
    Local --> KVC

    Sub --> Valkey
    Obs --> Valkey

    Chat --> BB
    Plan --> RR --> BB

    style Input fill:#1a1a3e,stroke:#33d9d9
    style Agent fill:#1a1a3e,stroke:#4d33d9
    style Inference fill:#1a1a3e,stroke:#d93380
    style Memory fill:#1a1a3e,stroke:#33d9d9
    style Backend fill:#1a1a3e,stroke:#4d33d9

Data Flow: Agent-Observer Query

sequenceDiagram
    participant U as User
    participant OA as AgentObserver
    participant N as Neo4j
    participant G as GitHub
    participant V as Valkey
    participant L as LLM (vLLM)

    U->>OA: Ask question / paste error
    Note over OA: Build context from all sources
    OA->>N: Query graph (file/symbol relationships)
    N-->>OA: Graph context subgraph
    OA->>G: Fetch open issues, PRs
    G-->>OA: Issue/PR summaries
    OA->>V: Get conversation history
    V-->>OA: Recent chat context
    Note over OA: Refine plan with evidence
    OA->>L: Generate plan with context
    L-->>OA: Structured PlanDocument
    OA-->>U: Present plan + projections
Loading

Module Hierarchy

flowchart LR
    subgraph PrismCore["PrismCore"]
        PC_API["OpenAI Client"]
        PC_P2P["P2P / CloudKit"]
        PC_Types["Chat / Plan Types"]
    end

    subgraph SDK["PrismAgentSDK"]
        SDK_BB["Butterbase Client"]
        SDK_N4["Neo4j Client"]
        SDK_GH["GitHub Client"]
        SDK_VK["Valkey Context Engine"]
        SDK_LLM["LLM / KV Cache Config"]
        SDK_OBS["AgentObserver"]
        SDK_PLAN["Plan / Projection Engine"]
        SDK_UI["Shared SwiftUI Views"]
    end

    subgraph Mac["PrismAgent (macOS App)"]
        MAC_Nav["Nav Bar / Auth Pills"]
        MAC_Chat["Conversation View"]
        MAC_Tools["Tool Visualizers"]
        MAC_Collab["Collaboration UI"]
        MAC_Plan["Plan Panel"]
    end

    subgraph iOS["PrismAgentiOS"]
        IOS_Chat["Chat View"]
        IOS_Nav["Nav Bar"]
        IOS_Bridge["Remote View Bridge"]
    end

    subgraph Daemon["PrismAgentDaemon"]
        D_Valkey["Valkey Subprocess"]
        D_Health["Health Monitor"]
    end

    SDK --> PrismCore
    Mac --> SDK
    iOS --> SDK
    Daemon --> SDK

    style PrismCore fill:#1a1a3e,stroke:#33d9d9
    style SDK fill:#1a1a3e,stroke:#4d33d9
    style Mac fill:#1a1a3e,stroke:#d93380
    style iOS fill:#1a1a3e,stroke:#33d9d9
    style Daemon fill:#1a1a3e,stroke:#d93380
Loading

Key Components

  • PrismCore (Packages/PrismCore/) — Shared types, OpenAI-compatible client, P2P networking, CloudKit relay, license router
  • PrismAgentSDK (Sources/PrismAgentSDK/) — Inference providers, Butterbase auth, Neo4j client, GitHub client, AgentObserver, plan system, tool dispatchers
  • PrismAgent (PrismAgent/) — macOS app with SwiftUI chat, nav bar integrations, tool visualizers, collaboration UI, plan panel
  • PrismAgentiOS (PrismAgentiOS/) — iOS companion app with remote view bridge, chat, conversation management
  • PrismAgentDaemon (PrismAgentDaemon/) — LaunchAgent managing Valkey subprocess with health monitoring and crash recovery

Prerequisites

  • macOS 15+ (Sequoia) with Apple Silicon (M-series)
  • Xcode 16+
  • Swift 6.0+

Build

# All macOS targets
swift build --target PrismCore --target PrismAgentSDK --target PrismAgent --target PrismAgentDaemon

# Just the SDK (for library consumers)
swift build --target PrismAgentSDK

# iOS companion (requires Xcode for iOS target)
open PrismAgentiOS/PrismAgentiOS.xcodeproj

Quick Start

  1. Launch the app: open PrismAgent.app or build from source
  2. Sign in: Click the auth pill in the nav bar to sign in with Butterbase (free tier: 3 analyses)
  3. Start a session: Ask a question or paste code — the AgentObserver refines plans with graph context
  4. Collaborate: Enable LAN sessions to share your agent with teammates
  5. Use cloud inference: Toggle the cloud pill in the nav bar to route through RocketRide Cloud

Integrations

Prism Agent has first-class integrations with:

Platform Integration API Depth
Butterbase JWT auth, workspace quota, Stripe upgrade, MCP deployment Direct REST + MCP
Neo4j Graph memory via Query API v2, Cypher reasoning in AgentObserver Direct Query API v2
RocketRide Pipeline deployment, multi-agent orchestration Full pipeline SDK
GitHub OAuth, issue/PR/repo queries, code search, plan context REST API v3
Valkey/Redis Context engine, pub/sub, messaging, KV store RESP over NWConnection

Model Support

Local inference runs via vLLM-metal. Supported models:

Model Size Use Case
Ornith 1.0 9B (Q4_K_M GGUF) 5.6 GB Primary text model
Ornith 1.0 35B (Q4_K_M GGUF) 21 GB Heavy reasoning, multimodal

Models are auto-downloaded from Hugging Face on first launch. KV cache presets optimize for 16 GB Macs.

Development

Project Structure

PrismAgent/
├── Packages/PrismCore/        # Shared types and networking
├── Sources/PrismAgentSDK/     # SDK — the reusable layer
│   ├── Auth/                  # Butterbase auth client
│   ├── Client/                # PrismAgentClient, session management
│   ├── LocalInference/        # vLLM-metal manager, KV cache config
│   ├── Observer/              # AgentObserver plan refinement
│   ├── Providers/             # Inference providers (cloud, mock, local)
│   ├── Protocols/             # Provider protocols, error types
│   └── UI/                    # Shared SwiftUI views across platforms
├── PrismAgent/                # macOS app
├── PrismAgentiOS/             # iOS companion app
├── PrismAgentDaemon/          # macOS LaunchAgent
└── samples/                   # Demo scripts, pipeline JSONs, Cypher seeds

Adding a New Integration

  1. Add client code in Sources/PrismAgentSDK/
  2. Wire into PrismServiceConfig (singleton observable object)
  3. Add SwiftUI views in the app target (PrismAgent/ or PrismAgentiOS/)
  4. Wire into AgentObserver.refinePlan() for autonomous context

License

AGPL-3.0 with Commercial Dual License — see LICENSE and COMMERCIAL_LICENSE.md for details.

The Prism Agent SDK is dual-licensed under the GNU Affero General Public License v3.0 (AGPL-3.0) and a Commercial License.

  • AGPL-3.0: Free to use for open-source projects that comply with AGPL terms, including network use disclosure.
  • Commercial License: For proprietary use without AGPL obligations — contact julian@tribunus.dev for pricing.

Built by Julian Torres for HackwithBay 3.0.

About

An AI coding agent for macOS and iOS with local inference, graph-backed reasoning, multi-agent orchestration, and collaborative sessions.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages