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: VoidDB –A transactional key-value DB written in Go for 64-bit Macintosh https://ift.tt/bNB4EUYShow HN: VoidDB –A transactional key-value DB written in Go for 64-bit… Read More
Show HN: Iterm-Mcp – AI Terminal/REPL Control for iTerm2 https://ift.tt/iyRzJrjShow HN: Iterm-Mcp – AI Terminal/REPL Control for iTerm2 Hi HN! Ever w… Read More
Show HN: Workflow86 - An AI business analyst and automation engineer https://ift.tt/UysVDmoShow HN: Workflow86 - An AI business analyst and automation engineer H… Read More
Show HN: Simple to build MCP servers that easily connect with custom LLM calls https://ift.tt/2FZ61XrShow HN: Simple to build MCP servers that easily connect with custom L… Read More
Show HN: Audiocube – A 3D DAW for Spatial Audio https://ift.tt/Mc2UzyJShow HN: Audiocube – A 3D DAW for Spatial Audio I’ve recently released… Read More
Show HN: I re-designed interface for HN https://ift.tt/VGmOt1ZShow HN: I re-designed interface for HN Any suggestions are appreciate… Read More
Show HN: Ros2_utils_tool, a powerful GUI toolset for ROS2-based utilities https://ift.tt/wlZ5RIBShow HN: Ros2_utils_tool, a powerful GUI toolset for ROS2-based utilit… Read More
Show HN: Lua-libuv – A Lua with libuv experiments https://ift.tt/tHfwq8UShow HN: Lua-libuv – A Lua with libuv experiments https://ift.tt/I3A2h… Read More
0 Comments: