WeaveMindAI/weft
A programming language for AI orchestrations
Weft – A Programming Language & Framework for AI Orchestration
What it is Weft is a domain‑specific language (DSL) plus a compiler‑runtime stack that lets you describe AI‑centric workflows as a graph of nodes. Nodes can be LLM calls, agents, human‑in‑the‑loop steps, APIs, databases, containers, etc. The Weft compiler checks the graph for type‑correctness and then emits a Rust crate that builds a native binary. At runtime the graph coordinates execution, persists state, and records a journal of all values that flow between nodes.
Key ideas
- Graph‑first orchestration – you write a concise, readable program that describes how components talk, not what each component does internally.
- Compiled safety – the compiler validates port types, required connections, and overall graph structure before any code runs, and the generated binary inherits Rust’s memory safety and speed.
- Durability & persistence – executions can pause (e.g., waiting for a human or external event), release their worker, and resume later; every run is recorded in a journal you can replay.
- Built‑in infrastructure – declaring a node like
PostgresDatabaseautomatically spins up a container with persistent storage; any containerised service can be turned into an infrastructure node. - AI‑assistant integration (Tangle) – the companion AI “Tangle” knows the language and can guide you step‑by‑step, generate code, and even run automated tests to keep the graph correct.
- Extensible node model – each node is defined by a declaration file and a Rust implementation; shared context supplies credentials, storage, signals, and execution records.
Typical use cases
- Customer‑support bots that call an LLM, rate answer sensitivity, and optionally pause for human approval before replying (see the WhatsApp support‑bot example).
- Multi‑step pipelines that combine LLMs, search APIs, databases, and human review, such as lead‑generation or content‑creation workflows.
- Any production‑grade AI system that needs reliable orchestration, observability, and the ability to survive restarts while waiting for external input.
Getting started
# Clone the repo
git clone https://github.com/WeaveMindAI/weft.git
cd weft
# Run the provided installer (sets up Docker, Rust, the weft CLI and VS Code extension)
./setup.sh
# Create a new project using an assistant (e.g., Claude Code)
weft new hello --assistant claude-code --remember
cd hello
weft run # executes hello/main.weft
You need Docker and a Rust toolchain; the installer will tell you if anything is missing. The CLI also supports weft run --seed, weft freeze <name>, and weft diff for reproducible, versioned runs.
Maturity Weft is early‑stage but functional. You can build and run typed graphs with loops, live channels, infrastructure nodes, and human‑in‑the‑loop waits. The UI shows execution records and node I/O. The roadmap mentions compiler policy flags, coordinated multi‑assistant building, a dedicated Tangle CLI, and cloud deployments (AWS/Azure). Breaking changes are still possible.
Community & resources
- Documentation – a full book site: https://weavemindai.github.io/weft/ (covers language, compiler, runtime, node writing, etc.)
- Discord – https://discord.com/invite/FGwNu6mDkU for help, showcase, and feedback.
- Browser extension – “Weft tasks” (Firefox/Chrome) enables human‑in‑the‑loop steps.
- VS Code extension – provides syntax highlighting, graph view, and integration with coding assistants.
- Examples – WhatsApp support bot, Telegram image bot, and many built‑in nodes under
catalog/.
Bottom line Weft aims to be the glue that lets developers (and AI assistants) focus on what an AI‑augmented system should do, while the language, compiler, and runtime handle how the pieces are wired, persisted, and executed safely. It is a genuine open‑source project targeting AI orchestration, not just a collection of tutorials or demos.
Related
- Project
- Project
- Project
- Project
- Project