weft  by WeaveMindAI

A programming language for orchestrating AI systems

Created 1 month ago
1,351 stars

Top 29.3% on SourcePulse

GitHubView on GitHub
Project Summary

Weft is a novel programming language designed to simplify the development of AI systems by providing a unified way to integrate and orchestrate diverse components like LLMs, databases, human interactions, and web services. It targets developers building complex AI workflows, offering a significant benefit by eliminating the need for manual plumbing and providing compile-time architectural validation.

How It Works

Weft treats LLMs, humans, APIs, and infrastructure as first-class citizens within its language. Its core approach is a node-based architecture where components are represented as nodes that are wired together. A compiler enforces type safety, checks for missing connections, and validates the overall program architecture before execution. Programs benefit from durable execution via Restate, ensuring resilience against crashes and restarts. A key advantage is its dual representation: programs can be viewed and edited as dense code or as a visual graph, with both views staying synchronized.

Quick Start & Requirements

To get started, clone the repository, copy .env.example to .env, and add necessary API keys (e.g., OpenRouter, Tavily). Development requires Docker for PostgreSQL and Node.js. macOS users need brew install bash (Bash 4+). Rust, Restate, and pnpm are installed automatically. Run the backend server with ./dev.sh server and the dashboard with ./dev.sh dashboard. Official documentation is available at weavemind.ai/docs.

Highlighted Details

  • First-class Humans: Programs can pause, interact with humans via forms, and resume seamlessly without webhooks or polling.
  • Recursively Foldable: Any group of nodes can be collapsed into a single, abstract node with a defined interface, simplifying complex systems.
  • Typed End-to-End: Features generics, unions, type variables, and null propagation, with the compiler catching type mismatches.
  • Durable Execution: Leverages Restate to ensure program state persists across crashes and restarts.
  • Dual Native Views: Synchronized code and graph representations cater to both AI builders and human understanding.
  • Extensive Built-in Nodes: Includes nodes for LLM inference, code execution, communication (Discord, Slack, etc.), data handling, web search, and database interaction.

Maintenance & Community

Weft is being developed "in public" and is a young project. Breaking changes are expected and will be announced with migration notes. The primary community hub is a Discord server, accessible via weavemind.ai/docs.

Licensing & Compatibility

The project is released under the OSaasy License. This license permits free use, modification, and self-hosting but prohibits offering Weft as a competing hosted service.

Limitations & Caveats

As a young project ("two months in"), Weft is expected to undergo significant changes, and breaking modifications are likely. The current node catalog is intentionally small and opinionated. The long-term goal of allowing AI to define custom nodes fluently is still under development. Users should consider it a foundation for building upon rather than a finished production-ready product.

Health Check
Last Commit

2 days ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
1
Star History
275 stars in the last 30 days

Explore Similar Projects

Starred by Peter Norvig Peter Norvig(Author of "Artificial Intelligence: A Modern Approach"; Research Director at Google).

codev by cluesmith

1.1%
273
AI-powered OS for human-agent software co-development
Created 8 months ago
Updated 13 hours ago
Feedback? Help us improve.