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: Turn a video of an app into a functional prototype with Claude Opus https://ift.tt/hNCs1l9Show HN: Turn a video of an app into a functional prototype with Claud… Read More
Show HN: DaLMatian – Text2sql that works https://ift.tt/9qRrGASShow HN: DaLMatian – Text2sql that works Hey HN, we've built DaLMatian… Read More
Show HN: Love Ruby but meh Daily Stand-ups (DSU)? You might like my gem:) https://ift.tt/gjbk6tNShow HN: Love Ruby but meh Daily Stand-ups (DSU)? You might like my ge… Read More
Show HN: Personal Knowledge Base Visualization https://ift.tt/nyVj7YOShow HN: Personal Knowledge Base Visualization My personal knowledge b… Read More
Show HN: AskVideos-VideoCLIP: Open-source video-text embedding model https://ift.tt/Y4kLTmyShow HN: AskVideos-VideoCLIP: Open-source video-text embedding model h… Read More
Show HN: AI to Find Local Events https://ift.tt/YOyWjdMShow HN: AI to Find Local Events Just made an AI to help people find l… Read More
Show HN: AI-backed App security for deterministic incident detection/analysis https://ift.tt/8uh1L0QShow HN: AI-backed App security for deterministic incident detection/a… Read More
Show HN: magick.css – Minimalist CSS for Wizards https://ift.tt/sKkcDQ9Show HN: magick.css – Minimalist CSS for Wizards https://ift.tt/LgJzhs… Read More
0 Comments: