{"id":51909023,"url":"https://github.com/monkfromearth/monkway","last_synced_at":"2026-07-27T02:01:57.514Z","repository":{"id":367366050,"uuid":"1280475128","full_name":"monkfromearth/monkway","owner":"monkfromearth","description":"Monk LLM Gateway: one API in front of every model. An LLM gateway and router built from scratch (proxy, routing, retry/fallback, caching, budgets), with an interactive course.","archived":false,"fork":false,"pushed_at":"2026-06-25T16:38:51.000Z","size":366,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-25T18:20:51.170Z","etag":null,"topics":["ai-gateway","api-gateway","caching","educational","fallback","fastapi","from-scratch","litellm","llm","llm-gateway","llm-router","openrouter","proxy","python","rate-limiting"],"latest_commit_sha":null,"homepage":null,"language":"Astro","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/monkfromearth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"docs/roadmap/index.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-25T16:09:57.000Z","updated_at":"2026-06-25T16:39:22.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/monkfromearth/monkway","commit_stats":null,"previous_names":["monkfromearth/monkway"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/monkfromearth/monkway","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkfromearth%2Fmonkway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkfromearth%2Fmonkway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkfromearth%2Fmonkway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkfromearth%2Fmonkway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/monkfromearth","download_url":"https://codeload.github.com/monkfromearth/monkway/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkfromearth%2Fmonkway/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35933751,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-27T02:00:06.776Z","response_time":101,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-gateway","api-gateway","caching","educational","fallback","fastapi","from-scratch","litellm","llm","llm-gateway","llm-router","openrouter","proxy","python","rate-limiting"],"created_at":"2026-07-27T02:01:56.783Z","updated_at":"2026-07-27T02:01:57.505Z","avatar_url":"https://github.com/monkfromearth.png","language":"Astro","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"./public/logo-wordmark-dark.svg\" /\u003e\n    \u003cimg src=\"./public/logo-wordmark.svg\" alt=\"monkway\" width=\"420\" /\u003e\n  \u003c/picture\u003e\n\n  \u003cp\u003e\u003cstrong\u003eMonk LLM Gateway \u0026mdash; one API in front of every model.\u003c/strong\u003e\u003c/p\u003e\n\n  \u003cp\u003eAn LLM gateway and router, built from scratch: it takes one request, routes it to the right provider, retries and falls back on failure, caches answers, and tracks cost and limits.\u003c/p\u003e\n\n  \u003cp\u003e\n    \u003ca href=\"https://monkfromearth.github.io/monkway/\"\u003eCourse\u003c/a\u003e \u0026middot;\n    \u003ca href=\"./docs/roadmap/index.md\"\u003eRoadmap\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n---\n\n## What this is\n\nmonkway is an LLM gateway and router built from the ground up to make one thing concrete: what actually\nhappens between your app and a language model. Every gateway (OpenRouter, LiteLLM, Cloudflare AI Gateway) is\nthe same machine \u0026mdash; it takes one request, picks a provider, forwards it, and handles everything that\ngoes wrong on the way: a provider rate-limits you, times out, or costs too much. monkway builds that machine\none piece at a time, starting from a plain proxy you can read end to end.\n\nThink of a **gatekeeper monk** at the monastery gate. Every traveler (request) arrives at one door. The\ngatekeeper greets them, decides which path to send them down (routing), quietly reroutes when a door is\nclosed (retry and fallback), recognizes travelers he has seen before (caching), and keeps the ledger of who\ncame and what it cost (cost and rate-limit tracking). That one monk *is* the gateway.\n\n## What's different\n\n- **No magic proxy.** v1 is a gateway you can read in one sitting: request in, provider out, retry on\n  failure, every call logged. Nothing hidden behind a framework.\n- **Taught, not just shipped.** An interactive course ships *with* the code. It teaches the concepts \u0026mdash;\n  proxying, retries and backoff, routing policy, caching, budgets \u0026mdash; and leaves the implementation to\n  you, which is where the understanding sticks.\n- **A real path to a real gateway.** v1 is a single-provider proxy with retry and logging. v2 climbs to\n  multi-provider routing, a semantic cache, cross-provider fallback, and per-key budgets \u0026mdash; the parts\n  that make it a system, not a script.\n- **Built to a senior bar.** Tests, a load/latency story, and honest docs \u0026mdash; not a notebook that runs\n  once.\n\n## The two stages\n\n| Stage                | What it is                                                                                                                                  | Status      |\n| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------- |\n| **v1 — Proxy**       | A single-provider proxy with retry, backoff, and structured request logging (tokens, latency, cost). Small in lines, the floor under it all. | In progress |\n| **v2 — Router**      | Multi-provider routing (cost vs latency vs quality), a semantic cache, cross-provider fallback, and per-key budgets and rate limits.        | Planned     |\n\nFull detail: [docs/roadmap/](./docs/roadmap/index.md).\n\n## Tech stack\n\n| Part                 | Stack                                                                                                                                          |\n| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |\n| **`monkway` (v1)**   | Python (FastAPI + httpx) for the proxy, with retry/backoff and structured logging. Dev tooling: [uv](https://docs.astral.sh/uv/), pytest, ruff. _(Starting choice; v2 may revisit the hot path for performance.)_ |\n| **`monkway` (v2)**   | Adds a routing layer, a semantic cache (embeddings + vector lookup), provider fallback, and a per-key budget/rate-limit store.                  |\n| **Knowledge course** | [Astro](https://astro.build) + [Tailwind CSS](https://tailwindcss.com) + [GSAP](https://gsap.com) for the demos, built with [bun](https://bun.sh). Deployed to GitHub Pages. |\n\n## Learn it: the course\n\nThe [`knowledge/`](./knowledge) folder is an interactive course that teaches the concepts behind monkway:\nwhat a proxy is, why retries need backoff, how a router weighs cost against latency, what a semantic cache\nbuys you, and how budgets are enforced. It is live at\n**[monkfromearth.github.io/monkway](https://monkfromearth.github.io/monkway/)**.\n\nRun it locally:\n\n```bash\ncd knowledge\nbun install\nbun run dev      # http://localhost:4321/monkway/\n```\n\nAuthoring the course follows [`knowledge/AUTHORING.md`](./knowledge/AUTHORING.md) (voice, structure, and the\nanimation policy).\n\n## Repository layout\n\n```\nmonkway/\n├── src/monkway/       the gateway (written by hand; starts as the v1 proxy)\n├── tests/             tests for the gateway\n├── knowledge/         the interactive course (Astro site) — concepts, not implementation\n├── docs/roadmap/      phased plan: index + per-phase files\n├── public/            brand assets (logo, wordmark, light + dark)\n└── pyproject.toml     project + shared dev tooling (pytest, ruff)\n```\n\n## Status\n\nEarly. The brand and the course shell are up; v1 (the proxy) is next. Structure and docs grow with the\nproject.\n\n## License\n\nMIT (see [`LICENSE`](./LICENSE)).\n\n---\n\n\u003cdiv align=\"center\"\u003e\n  \u003csub\u003eBuilt by \u003ca href=\"https://monkfrom.earth\"\u003eSameer Khan (@monkfromearth)\u003c/a\u003e \u0026middot; part of the \u003ca href=\"https://github.com/monkfromearth\"\u003emonk\u003c/a\u003e family \u0026middot; \u003ca href=\"https://github.com/monkfromearth/monkway\"\u003esource\u003c/a\u003e\u003c/sub\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonkfromearth%2Fmonkway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonkfromearth%2Fmonkway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonkfromearth%2Fmonkway/lists"}