{"id":31328066,"url":"https://github.com/ddaras/melony","last_synced_at":"2026-04-05T01:32:42.843Z","repository":{"id":314003850,"uuid":"1053767620","full_name":"ddaras/melony","owner":"ddaras","description":"Fast, unopinionated, minimalist event-driven framework","archived":false,"fork":false,"pushed_at":"2026-03-15T22:39:02.000Z","size":5156,"stargazers_count":28,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-16T09:56:07.644Z","etag":null,"topics":["ai","event-driven","event-streaming","generative-ui","genui","react","typescript","vercel-ai-sdk"],"latest_commit_sha":null,"homepage":"https://melony.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ddaras.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"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":null}},"created_at":"2025-09-09T22:50:53.000Z","updated_at":"2026-03-15T22:39:05.000Z","dependencies_parsed_at":"2025-09-10T02:28:17.515Z","dependency_job_id":"72df090e-66eb-41be-a6b4-a881bfb24dbd","html_url":"https://github.com/ddaras/melony","commit_stats":null,"previous_names":["ddaras/melony"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ddaras/melony","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddaras%2Fmelony","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddaras%2Fmelony/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddaras%2Fmelony/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddaras%2Fmelony/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ddaras","download_url":"https://codeload.github.com/ddaras/melony/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddaras%2Fmelony/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31421869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T00:25:07.052Z","status":"ssl_error","status_checked_at":"2026-04-05T00:25:05.923Z","response_time":60,"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","event-driven","event-streaming","generative-ui","genui","react","typescript","vercel-ai-sdk"],"created_at":"2025-09-25T23:50:53.251Z","updated_at":"2026-04-05T01:32:42.832Z","avatar_url":"https://github.com/ddaras.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Melony\n\nFast, unopinionated, minimalist event-based framework for building AI agents.\n\n[![Discord](https://img.shields.io/discord/1331776510344400977?color=7289da\u0026label=discord\u0026logo=discord\u0026logoColor=white)](https://discord.gg/j2uF5n8vJK)\n\nMelony is to AI agents what Express is to web servers — a tiny, flexible orchestration loop: `Event → Handler → Events`.\n\n## What you get\n\n- **Event-first runtime**: a tiny orchestration loop: `Event → Handler → Events`.\n- **Fluent Builder API**: build agents with a simple, type-safe API.\n- **Plugin system**: easily modularize and reuse handlers across agents.\n- **HITL-friendly**: approvals and guardrails belong in **event handlers**.\n- **Frontend-ready**: `@melony/react` provides the glue (providers/hooks) to connect your React app to the Melony stream.\n\n## Getting Started\n\nThe recommended way to start building a Melony app is by cloning our [Next.js Starter](https://github.com/ddaras/melony-nextjs-starter). It comes pre-configured with the core framework, React hooks, and an example agent.\n\n```bash\ngit clone https://github.com/ddaras/melony-nextjs-starter\ncd melony-nextjs-starter\npnpm install\npnpm dev\n```\n\n## Quick start (full stack)\n\n### Backend (Next.js)\n\n```ts\n// app/api/chat/route.ts\nimport { melony } from \"melony\";\n\nconst agent = melony()\n  .on(\"user:text\", async function* (event, { runtime }) {\n    // Simple router: respond with a greeting\n    yield { type: \"assistant:text\", data: { content: \"Hey there!\" } };\n  });\n\nexport async function POST(req: Request) {\n  const { event } = await req.json();\n  return agent.streamResponse(event);\n}\n```\n\n### Frontend (React)\n\n```tsx\nimport { MelonyClient } from \"melony/client\";\nimport { MelonyProvider, useMelony } from \"@melony/react\";\n\nconst client = new MelonyClient({ url: \"/api/chat\" });\n\nfunction Chat() {\n  const { messages, send } = useMelony();\n  \n  return (\n    \u003cdiv\u003e\n      {messages.map(m =\u003e (\n        \u003cdiv key={m.runId}\u003e\n          \u003cstrong\u003e{m.role}:\u003c/strong\u003e {m.content}\n        \u003c/div\u003e\n      ))}\n      \u003cbutton onClick={() =\u003e send({ type: \"user:text\", data: { content: \"Hello!\" } })}\u003e\n        Send\n      \u003c/button\u003e\n    \u003c/div\u003e\n  );\n}\n\nexport default function App() {\n  return (\n    \u003cMelonyProvider client={client}\u003e\n      \u003cChat /\u003e\n    \u003c/MelonyProvider\u003e\n  );\n}\n```\n\n## Packages\n\n- **`melony`**: The core framework: builder, runtime, and streaming utilities.\n- **`melony-react`**: React hooks and providers to connect your app to a Melony stream.\n\n## Apps in this repo\n\n- **`apps/landing`**: Minimal marketing site for Melony (Vite + React).\n- **`apps/studio`**: Interactive UI for working with Melony flows.\n- **`apps/express`**: Backend sandbox for runtime and workflow experiments.\n\n## Why Melony\n\nMost \"agent frameworks\" are heavy and opinionated about how you should build your agent's brain. Melony is different:\n\n**It focuses on the communication protocol.** By treating everything as an event stream, Melony makes it easy to bridge the gap between LLM thoughts and the actual product UX your users need—whether that's text, structured data, or complex interactive flows.\n\n## Community\n\nJoin our Discord to connect with the team and other developers: [https://discord.gg/j2uF5n8vJK](https://discord.gg/j2uF5n8vJK)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddaras%2Fmelony","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fddaras%2Fmelony","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddaras%2Fmelony/lists"}