Show HN: A 100-Line LLM Framework I've seen a lot of comments about how complex frameworks like LangChain can be. Over the holidays, I wanted to see how minimal an LLM framework could get if we stripped away everything non-essential. The result is an LLM framework in just 100 lines of code. These 100 lines capture what I see as the core abstraction of most LLM frameworks: a nested directed graph that breaks down tasks into multiple LLM steps, with branching and recursion to enable agent-like decision-making. From there, you can layer on more advanced features like agents, RAG, task decomposition, and more. I’ve intentionally avoided bundling vendor-specific wrappers (e.g., for OpenAI) into the framework. That kind of lock-in can be brittle and is easy to recreate on the fly—just feed the vendor’s API docs into your favorite LLM to generate a new wrapper. With miniLLMFlow, you only get the fundamentals. It also works nicely with coding assistants like ChatGPT, Claude, and Cursor.ai. Because the code is so minimal, you can quickly share the entire "source code and documentation with an AI assistant, and it can help you build new workflows on the spot. I’m adding more examples (including multi-agent setups) and would love feedback! If there's a feature or use case you’d like to see, please let me know. GitHub: https://ift.tt/lBWau1J https://ift.tt/lBWau1J January 6, 2025 at 09:20PM
Show HN: A 100-Line LLM Framework https://ift.tt/u6dGiD1
Related Articles
Show HN: Upload your photo and generate crazy YouTube Faces for your thumbnail https://ift.tt/m5dAQGaShow HN: Upload your photo and generate crazy YouTube Faces for your t… Read More
Show HN: Perf Sea – performance engineering for everyone https://ift.tt/2qTpWGHShow HN: Perf Sea – performance engineering for everyone I have found … Read More
Show HN: I made an SEO checker to fix frustrating issues in minutes, not hours https://ift.tt/WYCzgRpShow HN: I made an SEO checker to fix frustrating issues in minutes, n… Read More
Show HN: Leaderboard of Top GitHub Repositories Based on Stars https://ift.tt/caKbvGBShow HN: Leaderboard of Top GitHub Repositories Based on Stars I creat… Read More
Show HN: Upload your PDF and get a shareable link https://ift.tt/TZ2FaedShow HN: Upload your PDF and get a shareable link https://doc2.link Ju… Read More
Show HN: Mandala – Automatically save, query and version Python computations https://ift.tt/78O5x2fShow HN: Mandala – Automatically save, query and version Python comput… Read More
Show HN: Windows 9X – Windows 98 but all of the programs are AI generated https://ift.tt/nRHvgQrShow HN: Windows 9X – Windows 98 but all of the programs are AI genera… Read More
Show HN: Eternium.css – minimal CSS lib for layout/styling form elements https://ift.tt/Ots63fuShow HN: Eternium.css – minimal CSS lib for layout/styling form elemen… Read More
0 Comments: