>_ DevTrendsja

言語

ホーム

言語

セクション

フロントエンド バックエンド モバイル DevOps AI / ML ゲーム開発 ブロックチェーン 組み込み セキュリティ
Rust

Why Create an Entire Programming Language for Neural Network Orchestration

When you try to build a complex LLM-based system using Python or TypeScript, the code quickly gets buried under infrastructure boilerplate. You have to manually set up message queues, write retry logic, persist intermediate state to a database, and come up with workarounds for waiting on user responses. General-purpose languages know nothing about the specifics of calling language models or the need to pause a process for a couple of days.

Developers at WeaveMind decided to tackle the problem radically. Instead of another library, they are building Weft — a full-fledged programming language where LLMs, external APIs, databases, and human involvement are first-class elements of the language.

Why a new language is needed

The core idea behind Weft is to free engineers from writing service scaffolding. Connections between models, databases, and logic are validated by the compiler before the program even runs.

The project is currently being actively rewritten to align with the MVP concept, and the official release is scheduled for August 2026. Nevertheless, the source code is open, and you can explore the proposed approach right now.

Main architecture features

Human in the loop without extra services

If the business logic requires manager approval or operator data entry, the process stops at the relevant instruction. There's no need to spin up a database for statuses, configure webhooks, or poll APIs on a timer. A program that waits for a user click for three seconds is written exactly the same way as a scenario with a three-day wait.

Two forms of representation

Weft code is simultaneously a text-based scenario and a visual graph. This isn't just a graphical shell over a configuration file. Changing a node on the diagram modifies the source text, and vice versa. Engineers can work with text while analysts view a clear process diagram.

Reliable execution via Restate

Under the hood, the Restate engine is used. If the server generates an error, reboots, or loses network connectivity during an LLM call, execution resumes from the failure point without losing accumulated context.

End-to-end typing

The compiler checks data types across the entire chain. If one node outputs an object of a specific structure and the next one expects a plain string, the builder immediately flags the error. This helps catch typos in JSON fields during the code writing phase.

What a Weft scenario looks like

The language syntax is declarative and focused on linking blocks:

topic = Text { label: "Topic" value: "the silence between stars" } llm_config = LlmConfig { label: "Config" model: "anthropic/claude-sonnet-4.6" systemPrompt: "Write a short, beautiful poem (4-6 lines) about the given topic." temperature: "0.8" } poet = LlmInference -> (response: String) { label: "Poet" } poet.prompt = topic.value poet.config = llm_config.config output = Debug { label: "Poem" } output.data = poet.response

In this small example, four nodes are declared: text, model configuration, the LLM inference itself, and debug output. Connections between them are established by explicitly passing fields.

What's under the hood

The compiler core, orchestrator, and executor are written in Rust. The dashboard web interface is built with SvelteKit (Svelte 5).

All available blocks live in the catalog/ directory. Each new block is described by two files in a separate folder:

  • backend.rs defines the server-side logic in Rust
  • frontend.ts specifies the node rendering, ports, and configuration fields in the UI

A special script automatically links them to the dashboard and runtime. Adding custom nodes turns out to be quite straightforward.

The current directory already includes blocks for working with LLMs, executing Python code, sending messages to Telegram, Discord, Slack, and WhatsApp, working with Postgres, and web search.

Current state and license

The project is in an early stage of development. The authors openly state in the README that the architecture is still forming, so breaking changes are possible.

Weft is distributed under the O'Saasy license (a modified MIT). It allows free use, modification, and self-hosting, but prohibits running a commercial paid service based on this code that competes with the authors.

Who should follow the project

Weft is interesting as an attempt to rethink the approach to neural network agent orchestration. If you're tired of fighting complex call graphs in general-purpose languages and are looking for a tool with built-in fault tolerance, the repository is definitely worth bookmarking.

関連プロジェクト