mochi  by mochilang

A statically typed language for agents and data

Created 4 months ago
313 stars

Top 86.1% on SourcePulse

GitHubView on GitHub
Project Summary

Mochi is a statically typed, embeddable programming language designed for agents, data processing, and AI applications. It offers a declarative, functional syntax with stream-first semantics, aiming for clarity, safety, and expressiveness.

How It Works

Mochi compiles to optimized bytecode executed by a built-in virtual machine. Its design emphasizes agent-friendliness, testability with built-in test blocks, and portability as a single, zero-dependency binary. It features native support for datasets with SQL-like querying, graph manipulation, and simulation capabilities, alongside direct integration with generative AI models.

Quick Start & Requirements

  • Installation: Download the prebuilt binary from releases, make it executable (chmod +x mochi), and run with mochi run examples/hello.mochi. Docker is also supported: docker run -i --rm ghcr.io/mochilang/mochi run examples/hello.mochi.
  • Prerequisites: Docker is required for containerized execution. Local LLMs (e.g., via llama.cpp) may be needed for VS Code Agent Mode integration.
  • Resources: Setup is minimal for the native binary.
  • Links: Releases, VS Code Extension, MCP Server Config

Highlighted Details

  • Built-in support for generative AI, including generate blocks for text and structured data, and exposing Mochi functions as LLM tools.
  • SQL-like dataset querying with from, where, select, and various join types.
  • Stream processing capabilities with stream, on, and emit for event-driven architectures.
  • MCP (Multi-Agent Communication Protocol) compatibility for integration with tools like Claude Desktop and VS Code Agent Mode.

Maintenance & Community

The project is actively developed. Community interaction channels are not explicitly listed in the README.

Licensing & Compatibility

Mochi is released under the MIT License, permitting commercial use and integration with closed-source projects.

Limitations & Caveats

Mochi is under active development, with several features not yet implemented across all backends, including error handling (try/catch), logic programming, set collections, generic type parameters, reflection, concurrency primitives, asynchronous functions, and certain advanced language constructs like destructuring bindings and closures.

Health Check
Last Commit

2 weeks ago

Responsiveness

1 day

Pull Requests (30d)
1,689
Issues (30d)
2
Star History
7 stars in the last 30 days

Explore Similar Projects

Starred by Wes McKinney Wes McKinney(Author of Pandas), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
22 more.

autogen by microsoft

0.5%
50k
Agentic framework for multi-agent AI applications
Created 2 years ago
Updated 19 hours ago
Feedback? Help us improve.