MooseStack Documentation

repository·main·Indexed 20 days ago

https://github.com/514-labs/moosestack

A developer agent harness for ClickHouse and real-time analytical infrastructure, designed to provide AI agents with tools and context for managing OLAP, streaming, and workflows. The repository includes MooseJS, an open-source framework for data and analytics applications, as well as the Fiveonefour VS Code extension for managing the moose and 514 CLIs.

Tokens
428.9K
Snippets
1.4K
Records
1.8K
Agent score
69%

What's inside MooseStack

  1. Overview of agent-contracts

    main

    The agent-contracts package provides shared TypeScript contracts used to ensure type safety between the web application and the Moose service. It is designed to be a lightweight, stable package containing only data structures and constants, avoiding any runtime logic or environment dependencies.

    What to include in this package:

    • DTOs (Data Transfer Objects): Shared interfaces used across package boundaries.
    • Stable path constants: Definitions for API routes and other fixed paths.

    What to avoid:

    • Environment variable loading.
    • Network clients.
    • Provider-specific runtime logic.
  2. Overview of moosestack-service

    main
    The moosestack-service package serves as the MooseStack backend for the template. It is responsible for managing organization-scoped data models, JWT claim parsing, request-level authorization, and JWT-backed row-level security. It also provides Moose semantic/query models, app-facing HTTP APIs, custom MCP (Model Context Protocol) tools, and readonly ClickHouse helpers for semantic reads and tool execution.
  3. Overview of MooseStack

    main

    MooseStack is a developer agent harness designed for ClickHouse and real-time analytical infrastructure. It provides AI coding agents with the interfaces, context, and skills required to build applications using:

    • ClickHouse: Real-time OLAP
    • Redpanda: Streaming
    • Temporal: Workflow orchestration
    • Redis: Internal state

    It is designed to help agents handle specialized tasks like optimizing OLAP data models, managing schema migrations, building streaming ETL/ELT pipelines, and integrating analytics into frontend layers.

    IMPORTANT: MooseStack has reached end of life and is no longer actively maintained. The developers recommend using the Agent Experience Platform (AXP) instead.

  4. Overview of Moose Streams capabilities

    main

    Moose Streams provides several patterns for handling continuous data flows:

    Sending Records

    • Internal Producers: Use Stream.send() if the producer runs inside your Moose project and can import the Stream object.
    • External Producers: Use the Ingest API to send JSON over HTTP from systems outside your Moose project.
    • Schema Management: Use the Schema registry for payloads requiring Confluent Schema Registry support.

    Processing Records

    • Consumer Functions: Trigger side effects based on incoming records.
    • Transform Functions: Filter, enrich, or rewrite records into other streams.
    • Stream Patterns: Implement fan-in, fan-out, and chained processing flows.

    Storage and Reliability

    • ClickHouse Integration: Sync stream records directly into Moose OLAP tables.
    • Failure Recovery: Use dead letter queues to retain failed records for later recovery.
  5. Overview of agent-observability-langfuse

    main

    The agent-observability-langfuse package is a Langfuse adapter designed for the shared agent-runtime tracing contract. It allows developers to implement Langfuse observability while keeping the core agent-runtime vendor-neutral.

    Responsibilities:

    • Constructing the Langfuse client.
    • Mapping agent-runtime traces and steps into Langfuse-compatible records.
    • Flushing traces at the end of a request.

    Constraints: This package is strictly an adapter. It does not handle web application environment variable loading, runtime orchestration, or Moose service APIs.

  6. Manage ClickHouse schemas with Moose OLAP

    main

    Moose OLAP provides several workflows for schema management:

    • Modeling: Define tables, views, and materialized views in code.
    • Evolving Schemas: Use schema migrations to carry local changes to staging/production, or use planned migrations for remote environments.
    • External Integration: Work with existing ClickHouse tables that are not managed by Moose, or pull those existing schemas into your project.
    • Data Operations: Query data through typed objects or perform ingestion, backfills, and batch writes using the provided insert methods.