Skip to content

gsavla6-hue/react-agent-toolbox

Repository files navigation

🤖 React Agent Toolbox

Production ReAct (Reasoning + Acting) agent framework with 20+ built-in tools — calculator, web search, code executor, file manager, API caller and database query

Python OpenAI License

python langchain openai react-pattern tools agent-framework

🚀 Quick Start

# 1. Clone
git clone https://github.com/gsavla6-hue/react-agent-toolbox.git
cd react-agent-toolbox

# 2. Install
pip install -r requirements.txt

# 3. Configure
cp .env.example .env
# Edit .env — add your OPENAI_API_KEY

# 4. Run
python main.py                    # Interactive CLI
python main.py --task "your task" # Single task
python main.py --api              # REST API

✨ Features

  • Autonomous Execution — Breaks complex tasks into steps and executes them
  • Tool Use — Web search, code execution, file operations
  • Multi-turn Memory — Remembers context across conversation
  • REST API — FastAPI server with /run, /chat, /stats endpoints
  • Streaming — Real-time output streaming support
  • Production Ready — Error handling, retries, logging

🔌 API Usage

# Start API server
python main.py --api

# Run a task
curl -X POST http://localhost:8000/run \
  -H "Content-Type: application/json" \
  -d '{"task": "Research the latest developments in quantum computing"}'

# Chat
curl -X POST http://localhost:8000/chat \
  -H "Content-Type: application/json" \
  -d '{"task": "Explain RAG systems"}'

🐍 Python SDK

from main import ReactAgentToolbox

agent = ReactAgentToolbox()

# Single task
result = agent.run("Write a Python function to parse JSON files recursively")
print(result["output"])

# Interactive chat
while True:
    user_input = input("You: ")
    print(f"Agent: {agent.chat(user_input)}")

🏗️ Architecture

react-agent-toolbox/
├── main.py              # Main agent (entry point)
├── utils/
│   └── helpers.py       # Utility functions
├── tests/
│   └── test_agent.py    # Test suite
├── agent_outputs/       # Files created by the agent
├── .env.example         # Environment template
└── requirements.txt

🧪 Running Tests

pytest tests/ -v

📄 License

MIT — see LICENSE


Built by Gaurav Savla

About

Production ReAct (Reasoning + Acting) agent framework with 20+ built-in tools — calculator, web search, code executor, file manager, API caller and database query

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors