Work in progress. This documentation is being actively written. Some pages are incomplete or missing. Check back soon.

Weft

A programming language for AI systems.

Two native views

Weft has two views of the same program. The code view is optimized for AI: dense, structured, fast to read and write. The graph view is optimized for humans: visual, zoomable, click to inspect any node. Edit either one, the other updates instantly. The AI writes code. You see the architecture.

Loading playground...

Live playground. Click on nodes, zoom, pan.

Recursively abstractable

AI systems grow fast. Without a way to compress complexity, everything becomes unmanageable. In Weft, any piece of logic can become a block with a clear interface. Blocks nest inside blocks. Collapse to see the big picture, expand to see the details. That's how humans stay in control, and how AI agents will work on different parts independently.

Loading playground...

Try collapsing and expanding the groups in the graph to see how complexity compresses.

AI, humans, and services are first-class citizens

Most languages were designed for math and logic. LLMs, APIs, human decisions? Bolted on with libraries. In Weft, these are the primitives. An LLM call, a human approval, a database: all typed blocks that you connect like building blocks. Some are pre-built. Some you write yourself in any language. Weft is the coordination layer that makes sure everything fits together.

Loading playground...

If it compiles, it runs

The compiler catches the bugs: wrong types, missing connections, broken logic. If your code compiles, it works. At runtime, when something goes wrong (a service fails, data is missing), the system handles it gracefully instead of crashing. The only failures are external. Your logic is guaranteed correct.

Loading playground...