
this is f*cking brilliant...
a 16-year-old CS student in China figured out how to run 300 Grok Bots for less than $0.02 per bot per week.
the same swarm could cost $4,500 a week.
he eliminated pointless status checks, stopped rereading entire chat histories, and killed endless retry loops.
now most bots only wake up when there's actual work to do.
Here 20 GitHub repos he used to make the setup cheaper:
01 Crawl4AI → turn web pages into clean Markdown before analysis, reducing the navigation menus and page clutter your bot has to read
02 Firecrawl → collect web content as Markdown or structured data so your workflow can select the fields it actually needs
03 Chonkie → split long documents into manageable chunks so retrieval can select relevant passages instead of attaching the whole document
04 FlagEmbedding → rerank retrieved passages before generation, keeping the strongest evidence and dropping irrelevant matches from the prompt
05 LLMLingua → compress lengthy inputs before the model reads them. preserve the facts, constraints, and qualifications your task depends on
06 RTK → compress common command outputs before they enter the conversation, keeping repetitive logs from swallowing the useful context
07 GPTCache → reuse suitable answers to similar requests instead of generating them again. define matching and freshness rules around the task
08 Portkey Gateway → cache matching API responses behind a shared gateway, letting connected workflows reuse answers across repeated requests
09 Prefect → cache successful task results and reuse them when the configured inputs match, avoiding unnecessary reruns of completed workflow steps
10 Mem0 → store and retrieve relevant facts across runs so each assignment can start with selected memory instead of the entire conversation
11 Graphiti → keep changing facts and relationships in a searchable graph, then retrieve the relevant context instead of replaying the event history
12 requests-cache → keep fetched responses with expiry rules, then let your scripts reuse valid data before asking the bot to investigate again
13 Hishel → add HTTP caching and revalidation to your fetching tools, keeping unchanged responses out of repeated download-and-analysis cycles
14 APScheduler → schedule lightweight checks in Python and batch nonurgent work before handing useful updates to the agent
15 Celery → put background jobs on a worker queue so code handles waiting and dispatch while model calls happen inside the tasks that need them
16 PyBreaker → pause calls to a repeatedly failing service after a configured threshold, stopping one broken dependency from generating endless attempts
17 LiteLLM → track spending and set budgets for connected API calls before one runaway workflow eats the whole allowance
18 RouteLLM → route simpler API requests to a cheaper model and reserve the stronger one for work that needs it
19 Semantic Router → match requests to predefined workflows using local embeddings instead of paying a large model to decide every next step
20 Phoenix → trace your instrumented AI workflow, inspect repeated calls, and compare changes against output quality before keeping an “optimization”
connect the tools your workflow needs through the terminal, MCP, or your own code. route API calls through the gateway or router you choose so its controls actually apply
start with the biggest leak: oversized inputs, repeated research, empty checks, or failed operations that keep restarting
filter before reading → reuse before generating → check for changes → stop failed loops
then measure completed work against total usage, including the tools running around your bot
the full course below shows how to put the workflow together ↓