YAML-native agent workflow execution engine, written in Rust
YAML-native agent workflow execution engine, written in Rust
YAML-native agent workflow execution engine, written in Rust.
You describe an agent workflow as a YAML file — nodes, edges, prompts, data sources, MCP tools — and the engine parses it, resolves dependencies, and executes the graph: making LLM calls, running scripts, querying databases, calling MCP tools, iterating over data, and orchestrating multi-agent plans.
This engine powers RicePrompt — the visual agent IDE where you build and run these workflows without writing YAML by hand.
[dependencies]
riceprompt-engine = "0.1"docs/FLOW_SPEC.md
for the authoritative spec.generate, transform (Rhai scripting), iterator,
supervisor (multi-agent routing), subgraph, data_connector,
skill_set (progressive-disclosure knowledge bundles), mcp /
mcp_tools (Model Context Protocol).ExecutionResult can include the source YAML
so downstream tooling renders the topology + per-node results from one file.A minimal three-node workflow:
version: "1.0"
name: "hello_world"
providers:
openai:
api_key: "${OPENAI_API_KEY}"
nodes:
- id: start
type: start
- id: greet
type: generate
config:
provider: openai
model: gpt-4o-mini
template: tpl_greet
variables:
name: "start.name"
- id: response
type: response
config:
output:
greeting: "greet.output"
edges:
- from: start
to: greet
- from: greet
to: response
templates:
tpl_greet:
user_prompt: "Greet {{name}} warmly in one sentence."Run it:
use riceprompt_engine::Engine;
use serde_json::json;
#[tokio::main]
async fn main() -> anyhow::Result {
let yaml = std::fs::read_to_string("hello.yaml")?;
let engine = Engine::builder().build()?;
let result = engine.run_yaml(&yaml, json!({ "name": "Ada" })).await?;
println!("{}", serde_json::to_string_pretty(&result)?);
Ok(())
}More runnable examples live under examples/.
docs/FLOW_SPEC.md — authoritative YAML workflow spec
(node types, fields, providers, data sources, harness, skills, MCP).0.1.x — the API may change between minor versions while the spec
stabilizes. Pin an exact version if you need stability.
Issues and PRs welcome. Please:
cargo fmt and cargo clippy --all-targets before submitting.docs/FLOW_SPEC.md in
the same PR.Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
No open issues yet, or sync has not completed.