GitHub
FreeBuild agents which are controlled by LLMs
FreeFree tier
Inputs: textOutputs: text
About GitHub
A minimal, educational Python library for building agents that are controlled by large language models (LLMs), heavily inspired by Langchain. Designed to be simple and transparent, it implements an agent loop of Thought, Action, and Observation using only a few lines of code. Includes built-in tools for executing Python code (REPL), performing Google searches (via SERPAPI), and searching Hacker News. The agent uses the OpenAI API to generate responses and can be easily extended with custom tools. Ideal for learning how LLM-based agents work under the hood.
Key Features
Simple agent loop: Thought, Action, Observation
Built-in tools: Python REPL, Google Search (via SERPAPI), Hacker News Search
Extensible with custom tools
Minimal codebase, easy to understand and modify
Uses OpenAI API for LLM responses
Inspired by Langchain but far simpler
Pros & Cons
Pros
- Very minimal and easy to understand
- Transparent implementation of agent loop
- Lightweight and extensible
- Good for learning and experimentation
- Includes practical tools out of the box
Cons
- Requires OpenAI API key for LLM access
- Limited built-in tools (only three)
- Google Search tool requires additional SERPAPI key
- No advanced features like memory, multi-agent, or streaming
- Not intended for production use, more educational
Best For
Learning how LLM-based agents workBuilding simple task-driven agents with tool usePrototyping agents that can execute code and search the webEducational projects and agent architecture experiments
FAQ
How does the agent work?
The agent is instructed by a prompt and uses tools (like Python REPL or Google Search) to solve tasks. It runs in a loop of Thought (LLM-generated reasoning), Action (tool usage), and Observation (tool output). The LLM sees the new information appended to the prompt each cycle until it can produce a final answer.
What tools are included?
The library currently includes tools for executing Python code in a REPL, performing Google searches (via SERPAPI), and searching Hacker News.
What environment variables are needed?
You need to set OPENAI_API_KEY for the OpenAI API. If you use the Google Search tool, you also need SERPAPI_API_KEY.
Is this suitable for production use?
The library is primarily educational—it is minimal and lacks many production features. It is best suited for learning, experimentation, and prototyping.