Introduction
The TypeScript Framework for AI Applications
Melony is a comprehensive toolkit for building production-grade AI applications. It provides a runtime engine, agent abstractions, and a server-driven UI system that works seamlessly with React.
Architecture
Melony is designed as a modular framework composed of 5 core packages that can be used together or independently.
@melony/core
The foundation of the framework. Contains shared types, event definitions, and the protocol specification.
@melony/runtime
The execution engine. Handles action definitions, async generators, and human-in-the-loop approval flows.
@melony/agents
High-level abstractions. Implements the "Brain" pattern and provides standard HTTP handlers for your API routes.
@melony/client
Framework-agnostic client. Connects to your Melony runtime from any JavaScript environment.
@melony/react
React integration. Provides the `MelonyProvider`, hooks, and the Server-Driven UI renderer for instant interfaces.