{"id":45147482,"url":"https://github.com/synergenius-fw/flow-weaver","last_synced_at":"2026-04-11T20:17:25.205Z","repository":{"id":339469788,"uuid":"1159520952","full_name":"synergenius-fw/flow-weaver","owner":"synergenius-fw","description":"The TypeScript compiler for AI agent workflows","archived":false,"fork":false,"pushed_at":"2026-03-08T00:16:59.000Z","size":2543,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-08T04:51:45.426Z","etag":null,"topics":["ai-agents","code-generation","compiler","devtools","durable-execution","inngest","llm","mcp","node-based","serverless","typescript","visual-programming","workflow","workflow-automation"],"latest_commit_sha":null,"homepage":"https://flowweaver.ai","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/synergenius-fw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":"CLA.md"}},"created_at":"2026-02-16T20:38:53.000Z","updated_at":"2026-03-08T00:15:43.000Z","dependencies_parsed_at":"2026-02-24T23:00:49.674Z","dependency_job_id":null,"html_url":"https://github.com/synergenius-fw/flow-weaver","commit_stats":null,"previous_names":["synergenius-fw/flow-weaver"],"tags_count":90,"template":false,"template_full_name":null,"purl":"pkg:github/synergenius-fw/flow-weaver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synergenius-fw%2Fflow-weaver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synergenius-fw%2Fflow-weaver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synergenius-fw%2Fflow-weaver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synergenius-fw%2Fflow-weaver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/synergenius-fw","download_url":"https://codeload.github.com/synergenius-fw/flow-weaver/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synergenius-fw%2Fflow-weaver/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30314348,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T20:05:46.299Z","status":"ssl_error","status_checked_at":"2026-03-09T19:57:04.425Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agents","code-generation","compiler","devtools","durable-execution","inngest","llm","mcp","node-based","serverless","typescript","visual-programming","workflow","workflow-automation"],"created_at":"2026-02-20T02:06:06.854Z","updated_at":"2026-04-11T20:17:25.194Z","avatar_url":"https://github.com/synergenius-fw.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flow Weaver\n\n[![npm version](https://img.shields.io/npm/v/@synergenius/flow-weaver?style=flat)](https://www.npmjs.com/package/@synergenius/flow-weaver)\n[![npm downloads](https://img.shields.io/npm/dw/@synergenius/flow-weaver?style=flat)](https://www.npmjs.com/package/@synergenius/flow-weaver)\n[![CI](https://img.shields.io/github/actions/workflow/status/synergenius-fw/flow-weaver/ci.yml?branch=main\u0026style=flat)](https://github.com/synergenius-fw/flow-weaver/actions/workflows/ci.yml)\n[![Tests](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/moraispgsi/305430ef59a51d0a58eb61fefdfbe634/raw/flow-weaver-test-count.json\u0026style=flat)](https://github.com/synergenius-fw/flow-weaver/actions/workflows/ci.yml)\n[![Coverage](https://img.shields.io/codecov/c/github/synergenius-fw/flow-weaver?style=flat)](https://codecov.io/gh/synergenius-fw/flow-weaver)\n[![License: Flow Weaver Library License](https://img.shields.io/badge/License-Flow%20Weaver%20Library-blue?style=flat)](./LICENSE)\n[![Node.js](https://img.shields.io/badge/Node.js-%3E%3D22-green?style=flat)](https://nodejs.org)\n\n**Design agent workflows in conversation. The compiled output is yours.**\n\n[**flowweaver.ai**](https://flowweaver.ai) · [**Studio**](https://flowweaver.ai/studio) · [**Features**](https://flowweaver.ai/features) · [**Discord**](https://discord.gg/6Byh3ur2bk) · [**npm**](https://www.npmjs.com/package/@synergenius/flow-weaver)\n\n---\n\nFlow Weaver is a TypeScript workflow compiler. Define workflows with JSDoc annotations in your existing codebase, compile to standalone TypeScript functions with zero runtime dependencies, and deploy to any serverless target. The compiled output has no dependency on Flow Weaver. You own it.\n\nBuild AI agent workflows, data pipelines, or automation scripts through natural language using MCP tools in Claude Code, Cursor, Windsurf, VS Code, JetBrains, Codex, or any MCP-compatible editor. Or write them by hand with annotations the same way you write JSDoc today.\n\n## About me \u0026 my vision\n\nHey, I am [Ricardo Morais](https://linkedin.com/in/moraispgsi), the project's founder and owner. \n\nI have always wondered why Visual Programming never took off. After understanding why I tried to address most of the concerns from the development community:\n  - No lock-in: code is compiled and yours, not dependent on this library. You can remove the annotation after compiling and the file is standalone.\n  - The code is the source of truth, visual part runs on top, this allows you to create your workflows visually in the Studio, at the end of the day it is just plain Typescript code that you or any LLM can understand and iterate.\n  - It being just code opens a lot of doors for you, like using Git for version control, doing all sort of stuff you already do with code like testing, linting, automating, everything.\n  - In the era of LLMs and agents, being able to have that control is crucial, it is not a black box, you can see everything and so can your assistant.\n\nAs of now this is a solo project and I am building it in the open. There is a lot to do and rough edges to smooth out. If you run into issues or have questions, the [Discord](https://discord.gg/6Byh3ur2bk) is the best place to reach out. Every issue and question gets a response. I genuinely want to hear from you.\n\nIf this resonates with what you have been looking for, give it a try and let me know how it goes. Stars, feedback, and honest criticism all help equally.\n\n## Project Status\n\nFlow Weaver is in **beta**. The compiler, validator, CLI, and MCP tools are stable and thoroughly tested. The test suite covers thousands of cases across parsing, compilation, validation, diffing, and deployment. CI runs on every commit.\n\n**Flow Weaver Studio**, the browser-based visual IDE, is the next major milestone and is being actively built. Core editing (canvas, terminal, diagnostics) is live today. The visual debugger, AI chat assistant, version history, and deployment dashboard are in progress. You can follow development on Discord or in the [GitHub releases](https://github.com/synergenius-fw/flow-weaver/releases).\n\nBreaking changes may still occur between minor versions during beta. Pin your version in `package.json` if stability matters for your project.\n\n## Capabilities\n\n**Annotation-driven workflows:** Define node graphs directly in TypeScript using JSDoc annotations. No YAML, no JSON configs, no separate workflow files. Your workflows live in `.ts` files, version-controlled alongside your code.\n\n**Zero-dependency compiled output:** The compiler generates a self-contained TypeScript function. No runtime to install in production, no SDK to import, no vendor lock-in. Delete the package after compiling and the output still runs.\n\n**AI-native editing:** MCP tools expose the full compiler, validator, debugger, and diagram surface to any MCP-compatible editor. Scaffold a project, add nodes, wire connections, validate, compile, run, and diff through conversation.\n\n**Structural validation:** Type checking across port connections, graph topology analysis, agent safety rules, and breaking change detection. Runs in CI, on every save, or on demand. Errors include source locations, fix suggestions, and documentation links.\n\n**Step-through debugging:** Set breakpoints on nodes, step through execution node by node, inspect variables mid-run, and resume from checkpoints. Variable injection available through MCP tools.\n\n**Semantic diffing:** Compare workflow versions at the graph level instead of text diffs. Impact analysis categorizes every change as critical, breaking, minor, or cosmetic. Know exactly what changed and whether it matters.\n\n**Deploy anywhere:** Export to Inngest, AWS Lambda, Vercel, Cloudflare Workers, GitHub Actions, or GitLab CI. Or serve workflows over HTTP with built-in framework adapters for Next.js, Express, Hono, Fastify, and Remix.\n\n**Extensible pack system:** Node types, deploy targets, CLI commands, and MCP tools are contributed by npm packages. Install community packs or build and publish your own.\n\n**OpenClaw integration:** Use Flow Weaver inside [OpenClaw](https://openclaw.ai) with the native plugin. Build deterministic workflows through conversation. [Plugin](https://clawhub.ai/plugins/%40synergenius%2Fflow-weaver-openclaw) | [npm](https://www.npmjs.com/package/@synergenius/flow-weaver-openclaw) 🦞\n\n## Quick Start\n\n```bash\nnpm install @synergenius/flow-weaver\nnpx flow-weaver init my-agent\nnpx flow-weaver compile my-agent.ts\nnpx flow-weaver run my-agent.ts\n```\n\nThe CLI scaffolds a project, compiles annotations into a runnable workflow, and executes it. Run `fw --help` for the full command reference. The example below shows a more complete workflow built through conversation.\n\n## See It in Action\n\nThe conversation below shows [Weaver](https://github.com/synergenius-fw/flow-weaver-pack-weaver), an optional AI bot that drives Flow Weaver through natural language. It handles scaffolding, modification, validation, compilation, execution, and deployment. Install it with `fw market install @synergenius/flow-weaver-pack-weaver`, or use the MCP tools directly from your editor without Weaver.\n\n\u003e **You:** Build a support agent that classifies messages and either auto-replies or escalates.\n\n\u003e **Weaver:** Created `support-agent.ts`. Four nodes, one workflow.\n\u003e\n\u003e ```\n\u003e Workflow: supportAgent\n\u003e\n\u003e Nodes (4):\n\u003e   classify  [classifyIntent]  IN: message  OUT: context\n\u003e   route     [routeAction]     IN: context, execute  OUT: context, onSuccess, onFailure\n\u003e   reply     [llmReply]        IN: context  OUT: reply\n\u003e   esc       [escalate]        IN: context  OUT: ticket, assignee\n\u003e\n\u003e Paths (2):\n\u003e   Start -\u003e classify -\u003e route -\u003e reply -\u003e Exit\n\u003e   Start -\u003e classify -\u003e route -\u003e esc -\u003e Exit\n\u003e ```\n\n\u003e **You:** Show me the graph.\n\n\u003e **Weaver:**\n\u003e\n\u003e ```\n\u003e  ┌───────┐    ┌─────────────────┐    ┌──────────────┐    ┌───────────┐    ┌──────┐\n\u003e  │ Start │━━━▶│ Classify Intent │━━━▶│ Route Action │━━━▶│ LLM Reply │━━━▶│ Exit │\n\u003e  └───────┘    └─────────────────┘    └──────────────┘    └───────────┘    └──────┘\n\u003e\n\u003e  Parallel: Escalate\n\u003e ```\n\n\u003e **You:** Compile it.\n\n\u003e **Weaver:** Done. Zero runtime deps. The output is a standalone TypeScript function you own.\n\n\u003e **You:** Validate.\n\n\u003e **Weaver:**\n\u003e\n\u003e ```\n\u003e ✓ 1 valid, 2 warnings in 312ms\n\u003e ```\n\u003e\n\u003e Structural, agent safety, and CI rules. All checked.\n\n\u003e **You:** Run it with \"I need an urgent refund\".\n\n\u003e **Weaver:**\n\u003e\n\u003e ```\n\u003e classify: → SUCCEEDED (0ms)\n\u003e route:    → SUCCEEDED (0ms)\n\u003e reply:    → CANCELLED\n\u003e esc:      → SUCCEEDED (0ms)\n\u003e ✓ Workflow \"supportAgent\" completed in 2ms\n\u003e\n\u003e Result: { ticket: \"ESC-1773950738529\", assignee: \"support-team\" }\n\u003e ```\n\n\u003e **You:** Commit it.\n\n\u003e **Weaver:** Committed to `main`. It's a `.ts` file in your repo. Version-controlled like everything else.\n\n\u003e **You:** Now add sentiment analysis before routing.\n\n\u003e **Weaver:** Done. Here's what changed:\n\u003e\n\u003e ```\n\u003e [BREAKING] +1 types, ~1 types, +1 nodes, +5 conns, -2 conns\n\u003e\n\u003e + analyzeSentiment\n\u003e ~ routeAction (+inputs: sentiment)\n\u003e + sentiment (instance)\n\u003e + classify.context → sentiment.context\n\u003e + sentiment.sentiment → route.sentiment\n\u003e ```\n\n\u003e **You:** Where does this deploy?\n\n\u003e **Weaver:** Anywhere TypeScript runs. Or generate boilerplate:\n\u003e\n\u003e ```\n\u003e fw export support-agent.ts --target vercel\n\u003e fw export support-agent.ts --target lambda\n\u003e fw export support-agent.ts --target cloudflare\n\u003e fw export support-agent.ts --target inngest\n\u003e ```\n\n## How Workflows Are Defined\n\nWorkflows are TypeScript functions annotated with JSDoc. You write plain functions for each node, and the annotations describe how they connect.\n\nThe function signature is the source of truth. Input parameters become input ports, return object fields become output ports. Every function has an `execute` boolean that controls whether it runs or passes through, and returns `onSuccess`/`onFailure` for branching. Expression nodes (marked with `@expression`) skip the execute/branching pattern and map return fields directly to outputs.\n\nThe `@flowWeaver workflow` block wires node instances together. `@node` creates an instance of a node type, `@connect` wires ports between nodes, and `@path` is shorthand for a linear route. `Start` and `Exit` are virtual nodes representing the workflow's inputs and outputs.\n\nThe compiler reads these annotations, builds the execution graph, and generates the body in place between markers. Everything outside the markers stays untouched. Node type functions are never modified.\n\n```typescript\n/**\n * @flowWeaver nodeType\n * @expression\n * @input message - The support message\n * @output context - Classified context\n */\nfunction classifyIntent(message: string): { context: SupportContext } {\n  const intent = /refund|cancel/i.test(message) ? 'billing' : 'general';\n  return { context: { message, intent, priority: 'normal' } };\n}\n\n// routeAction, llmReply, and escalate are defined the same way:\n// plain functions with @flowWeaver nodeType annotations.\n\n/**\n * @flowWeaver workflow\n * @node classify classifyIntent\n * @node route routeAction\n * @node reply llmReply\n * @node esc escalate\n * @path Start -\u003e classify -\u003e route -\u003e reply -\u003e Exit\n * @path route:fail -\u003e esc -\u003e Exit\n * @connect Start.message -\u003e classify.message\n * @connect classify.context -\u003e route.context\n * @param message - The support message\n * @returns reply - Generated reply\n * @returns ticket - Escalation ticket\n */\nexport async function supportAgent(\n  execute: boolean,\n  params: { message: string },\n): Promise\u003c{\n  onSuccess: boolean;\n  onFailure: boolean;\n  reply: string | null;\n  ticket: string | null;\n}\u003e {\n  // @flow-weaver-body-start\n  // Generated by the compiler. Do not edit.\n  // @flow-weaver-body-end\n}\n```\n\n## CLI Reference\n\n| Command | Description |\n|---------|-------------|\n| `fw init` | Scaffold a new project with presets and templates |\n| `fw compile` | Compile workflow files to standalone TypeScript |\n| `fw validate` | Validate workflows without compiling |\n| `fw run` | Execute a workflow with optional debug mode |\n| `fw watch` | Recompile on file changes |\n| `fw dev` | Watch + compile + run loop |\n| `fw describe` | Output workflow structure as JSON, text, Mermaid, ASCII, or paths |\n| `fw diagram` | Generate SVG, HTML, or ASCII diagrams |\n| `fw diff` | Semantic diff between two workflow versions |\n| `fw export` | Export to a deploy target (Inngest, Lambda, Vercel, Cloudflare, etc.) |\n| `fw serve` | Start an HTTP server exposing workflows as endpoints |\n| `fw modify` | Programmatic graph mutations (addNode, removeNode, connect, etc.) |\n| `fw mcp-server` | Start the MCP server for AI editor integration |\n| `fw mcp-setup` | Auto-configure MCP for Claude, Cursor, VS Code, Windsurf, or Codex |\n| `fw docs` | Browse bundled reference documentation |\n\nRun `fw --help` or `fw \u003ccommand\u003e --help` for full options.\n\n## Flow Weaver Studio (Beta)\n\nA browser-based visual IDE for building workflows. Canvas editor, integrated terminal, real-time diagnostics, and the full CLI available in the cloud.\n\nStudio is in beta. Core editing is live. The visual debugger, AI chat assistant, version history, and deployment dashboard are being actively developed and will ship incrementally. The cloud platform is not yet production-ready, and paid plans are not available yet. Use it to explore and experiment, but expect rough edges.\n\n[Open Studio](https://flowweaver.ai/studio) · [Learn more](https://flowweaver.ai/features)\n\n## Weaver (Experimental)\n\nWeaver is an optional AI bot that automates the full workflow lifecycle. Give it a task in natural language and it plans, scaffolds, compiles, validates, and fixes issues in a loop until the workflow is correct. It connects to Anthropic, Claude CLI, or GitHub Copilot CLI.\n\n- `weaver bot \"create a greeting workflow\"` handles a task end-to-end with plan approval\n- `weaver run workflow.ts` executes a workflow with an AI agent channel attached\n- `weaver session` polls a task queue continuously for automated pipelines\n- `weaver swarm start` runs multiple bot instances in parallel, with an orchestrator dispatching tasks across them\n\nWeaver is itself built as a set of Flow Weaver workflows. Run `weaver eject` to get a local copy you can customize.\n\n```bash\nfw market install @synergenius/flow-weaver-pack-weaver\n```\n\n\u003e **Weaver is experimental.** The bot, session, and swarm modes work and are being used internally, but the APIs and behavior may change between releases. Weaver is not required to use Flow Weaver. The compiler, CLI, and MCP tools are the stable foundation and work independently.\n\n## Documentation\n\nReference documentation is bundled with the CLI. Run `fw docs` to browse topics, or `fw docs \u003ctopic\u003e` to read a specific one:\n\n```bash\nfw docs list                    # List all topics\nfw docs tutorial                # Step-by-step first workflow guide\nfw docs concepts                # Core concepts\nfw docs jsdoc-grammar           # Annotation syntax reference\nfw docs cli-reference           # Full CLI command reference\nfw docs search \u003cquery\u003e          # Search across all docs\n```\n\n**Online resources:**\n\n- [Features](https://flowweaver.ai/features)\n- [Compare with Alternatives](https://flowweaver.ai/compare)\n- [License](https://flowweaver.ai/license)\n\n## Community\n\nFlow Weaver is built and maintained by a solo developer. If you try it, find a bug, or just want to talk about workflows, the [Discord](https://discord.gg/6Byh3ur2bk) is open. Every message gets read and responded to, usually within a day.\n\nIf something breaks, [open an issue](https://github.com/synergenius-fw/flow-weaver/issues). Bug reports with reproduction steps get prioritized. Feature requests are welcome too.\n\n## Contributing\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.\n\n## License\n\nLicensed under the [Flow Weaver Library License](https://flowweaver.ai/license). See [LICENSE](./LICENSE).\n\nThe license is designed to be generous for the vast majority of users while protecting the project's IP. Here is what it means in practice:\n\n**Use freely:**\n- Install, compile, validate, run, and deploy workflows in any project\n- All compiled output is fully yours with no restrictions or attribution required\n- Use in CI/CD pipelines and build systems\n- Host internally for organizations with 15 or fewer people\n- Include as a dependency in larger products where Flow Weaver is not the primary value\n\n**Requires a commercial license:**\n- Internal hosting for organizations with more than 15 people\n- Building a hosted or standalone workflow authoring product\n- Offering Flow Weaver capabilities as a managed service to third parties\n\n**Never permitted:**\n- Using source code, tests, documentation, or outputs as AI/ML training data to replicate the functionality\n- Extracting specifications to build competing software\n\nIf you are unsure whether your use case needs a commercial license, reach out at support@synergenius.pt. The answer is probably \"you're fine.\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynergenius-fw%2Fflow-weaver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsynergenius-fw%2Fflow-weaver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynergenius-fw%2Fflow-weaver/lists"}