llm_agents  by mpaepper

Small library for building LLM-controlled agents

created 2 years ago
1,004 stars

Top 37.8% on sourcepulse

GitHubView on GitHub
Project Summary

This library provides a minimal framework for building LLM-controlled agents, inspired by Langchain but with fewer abstractions. It's designed for developers and researchers who want a clear, concise understanding of agent mechanics and the ability to experiment with custom agent logic. The core benefit is a simplified, from-scratch implementation of agent functionality.

How It Works

The agent operates on a loop of Thought, Action, and Observation. An LLM generates the Thought and Action based on a prompt and available tools. The Observation is the result of executing the chosen tool (e.g., Python REPL, Google Search, Hacker News search). The LLM receives the Observation, appends it to its context, and iterates until a final answer is produced. This approach offers a transparent view into agent decision-making.

Quick Start & Requirements

  • Install locally: pip install -r requirements.txt followed by pip install -e .
  • Environment variables required: OPENAI_API_KEY, SERPAPI_API_KEY (for Google Search).
  • Run example: python run_agent.py
  • More details: Hacker News discussion, blog post

Highlighted Details

  • Implements core agent loop: Thought, Action, Observation.
  • Includes built-in tools: Python REPL, Google Search (via SerpAPI), Hacker News Search.
  • Allows custom tool creation and omission of existing tools.
  • Designed for minimal code and clear understanding of agent mechanics.

Maintenance & Community

  • Project appears to be a personal project by mpaepper.
  • No explicit community channels (Discord/Slack) or roadmap mentioned in the README.

Licensing & Compatibility

  • License not explicitly stated in the README.
  • Compatibility for commercial use or closed-source linking is undetermined without a license.

Limitations & Caveats

The library is described as "small" and "from scratch," suggesting it may lack the robustness, extensive toolset, or advanced features of more mature frameworks like Langchain. The absence of a stated license raises concerns for commercial adoption.

Health Check
Last commit

1 month ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
1
Star History
25 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Steven Hao Steven Hao(Cofounder of Cognition), and
6 more.

openai-agents-python by openai

1.5%
13k
Python SDK for multi-agent workflows
created 4 months ago
updated 1 day ago
Feedback? Help us improve.