https://github.com/mizchi/tomate
Multi-agent orchestration engine in MoonBit (native port of takt)
https://github.com/mizchi/tomate
moonbit
Last synced: 5 days ago
JSON representation
Multi-agent orchestration engine in MoonBit (native port of takt)
- Host: GitHub
- URL: https://github.com/mizchi/tomate
- Owner: mizchi
- License: mit
- Created: 2026-02-19T16:58:42.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-02-20T03:57:57.000Z (4 months ago)
- Last Synced: 2026-04-03T07:11:17.822Z (2 months ago)
- Topics: moonbit
- Language: MoonBit
- Size: 27.3 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tomate
Multi-agent orchestration engine in MoonBit. Native port of [takt](https://github.com/nicholasgriffintn/takt).
Tomate models agent workflows as **pieces** composed of **movements** — a state machine where each movement executes an LLM call, evaluates rules against the response, and transitions to the next movement.
## Features
- JSON-driven workflow configuration
- Tag-based and AI-judge rule evaluation
- Loop detection and cycle monitoring
- Parallel, arpeggio, and team-leader execution modes (stubs)
- Claude CLI (`claude -p`) as the default provider
- Mock provider for testing
## Requirements
- [MoonBit](https://www.moonbitlang.com/) toolchain
- [just](https://github.com/casey/just) (task runner)
- `claude` CLI (for Claude provider)
## Quick Start
```bash
# Build
just build
# Run tests
just test
# Validate a config
just run validate examples/simple.json
# Run a workflow with mock provider
just run run examples/simple.json --task "build fibonacci" --provider mock
# Run a workflow with Claude
just run run examples/simple.json --task "build fibonacci"
```
## Config Format
Workflows are defined as JSON. A **piece** contains an array of **movements**, each with an instruction template, persona, and transition rules.
```json
{
"name": "simple-workflow",
"movements": [
{
"name": "plan",
"persona": "You are a software architect.",
"instructionTemplate": "Create a plan for: {task}",
"rules": [
{ "condition": "plan is complete", "next": "implement" }
]
},
{
"name": "implement",
"instructionTemplate": "Implement the plan. Task: {task}",
"edit": true,
"passPreviousResponse": true,
"rules": [
{ "condition": "done", "next": "COMPLETE" }
]
}
],
"initialMovement": "plan",
"maxMovements": 10
}
```
Rules are matched by `` tags in the LLM response. If no tag is detected and `isAiCondition` is set, a judge LLM call evaluates the response against the condition text.
Special `next` values: `"COMPLETE"` finishes the piece, `"ABORT"` aborts it.
## Architecture
```
src/
types/ # Core types (PieceConfig, PieceState, etc.)
config/ # JSON parsing and builder DSL
eval/ # Rule evaluation (tag detection, aggregates)
instruction/ # Prompt template expansion
prompt/ # Faceted prompt composition
loop/ # Loop and cycle detection
provider/ # LLM providers (Claude CLI, Mock)
engine/ # State machine executor
integration/ # Integration tests
cmd/app/ # CLI entry point
```
## License
MIT