Skip to content

lkovalevski/first_agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– Simple Python File Agent

A lightweight implementation of a ReAct Agent (Reasoning and Acting) built with Python and LiteLLM.

Project structure

first_agent/ β”œβ”€β”€ main.py # The Agent Loop β”œβ”€β”€ tools.py # File system functions β”œβ”€β”€ requirements.txt # Dependencies └── README.md # Documentation

🌟 Features

  • Recursive Search: Automatically looks for files in current and parent directories if the path isn't provided.
  • Tool Use: Demonstrates how an LLM can interact with a local file system via structured JSON actions.
  • Short-term Memory: The agent remembers previous steps to complete complex tasks.

πŸ› οΈ Tools Included

  • list_files: Inspects directory contents.
  • find_file: Smart search across directory levels.
  • read_and_summarize: Reads local files and generates insights.

πŸš€ Quick Start

  1. Clone the repo.
  2. Install dependencies: pip install litellm openai
  3. Set your API Key: export OPENAI_API_KEY='your_key_here'
  4. Run: python main.py

About

This project is a simple exploration into the world of AI Agents, specifically implementing a ReAct (Reasoning and Acting) loop. It serves as a practical experiment to understand how Large Language Models can autonomously interact with local environments to solve multi-step file system tasks.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages