Skip to content

apsis-ai/constellation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Constellation

Constellation

Constellation is an orchestration library for multiplexing AI agent CLIs. It publishes under the module path github.com/apsis-ai/constellation and currently keeps the CLI binary name agents-mux.

Features

  • Multi-agent support — Claude, Codex, OpenCode, and Cursor via subprocess spawning
  • Session management — Create, list, delete sessions with SQLite persistence
  • Real-time streaming — SSE broadcasting with ring buffer for reconnection support
  • Queue system — Position-based follow-up queue with pause/resume and atomic processing
  • Conversation persistence — Dual storage via SQLite messages table and JSONL files
  • Lifecycle management — Idle timeouts, handoff on token exhaustion, process group cleanup
  • Attachment handling — File upload, validation, and resolution for agent prompts
  • Agent registry — Static + dynamic agent registration with binary discovery
  • Speech-to-text — Whisper integration for audio transcription
  • Environment isolation — Isolated config directories prevent agent CLI leakage

Installation

The public module path is github.com/apsis-ai/constellation.

go get github.com/apsis-ai/constellation

Requires Go 1.24+.

Quick Start

package main

import (
    "fmt"
    "log"

    mux "github.com/apsis-ai/constellation"
)

func main() {
    mgr, err := mux.NewManager(mux.Config{
        DBPath: "./data/agents.db",
    })
    if err != nil {
        log.Fatal(err)
    }
    defer mgr.Close()

    // Send a prompt to Claude
    result, err := mgr.Send(mux.SendRequest{
        Prompt: "Hello, what can you help me with?",
        Agent:  "claude",
    })
    if err != nil {
        log.Fatal(err)
    }

    // Stream events
    for event := range result.Events {
        switch event.Type {
        case mux.ChanText:
            fmt.Print(event.Text)
        case mux.ChanAction:
            fmt.Printf("\n[Action] %s\n", event.Text)
        case mux.ChanAskUser:
            fmt.Printf("\n[Question] %s\n", event.Text)
        }
    }
}

Documentation

Supported Agents

Agent CLI Binary Default Model Output Format
Claude claude sonnet NDJSON (assistant/result)
Codex codex o4-mini NDJSON (item.completed/turn.completed)
OpenCode opencode NDJSON (text/tool_use/step_finish)
Cursor agent NDJSON (assistant/tool_call/result)

Related Projects

  • Perigee — Apsis remote desktop workspace. This library was extracted from its session management. Both projects are co-developed and may be modified together.

Requirements

  • Go 1.24+
  • At least one agent CLI installed on PATH (claude, codex, opencode, or agent)
  • Optional: whisper.cpp binary for speech-to-text

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages