Custom ReAct Agent
A small importable Python package for a Groq-powered ReAct agent with Tavily search, Wikipedia lookup, and calculator tools.
Setup
pip install custom-react-agent
API Keys
This package does not include API keys. Set your own keys before running the agent:
$env:GROQ_API_KEY="your_groq_api_key_here"
$env:TAVILY_API_KEY="your_tavily_api_key_here"
$env:GROQ_MODEL="llama-3.1-8b-instant"
Or create a .env file in the folder where you run the command:
GROQ_API_KEY=your_groq_api_key_here
TAVILY_API_KEY=your_tavily_api_key_here
GROQ_MODEL=llama-3.1-8b-instant
For local development from this repository:
cd "C:\Custom ReAct Agent - Copy"
python -m pip install -e .
Usage
from custom_react_agent import ReActAgent
agent = ReActAgent(verbose=False)
answer = agent.run("What is 25 * 19?")
print(answer)
You can also run it from the command line:
custom-react-agent "Calculate 123 * 456"
or:
python -m custom_react_agent "Search for the latest Python release"
Safe Build
The real .env file is private and should never be uploaded. This project includes .env.example as a safe template.
Build and check the package:
cd "C:\Custom ReAct Agent - Copy"
Remove-Item -Recurse -Force dist, build -ErrorAction SilentlyContinue
python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*
Before uploading, inspect the source archive and confirm .env is not listed:
tar -tf dist\custom_react_agent-0.1.0.tar.gz
Metadata
Release files for custom-react-agent 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| custom_react_agent-0.1.0.tar.gz | 7.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| custom_react_agent-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.9 kB
Release files / custom_react_agent-0.1.0.tar.gz
| Download URL | custom_react_agent-0.1.0.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2ed73308fbea3ebf49d6d0cb02abb798bbebd6ab9a3dc7aacd5d43dec644d9df
|
|
BLAKE2b-256 checksum How to use checksums |
13b2ec7870b28c91df8079e018530ec1d2bdeb525075f0a2f513e2d511f4d178
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.0
|
Release files / custom_react_agent-0.1.0-py3-none-any.whl
| Download URL | custom_react_agent-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6833b9bf193f9aea161706b8b4d9288fc467eca4c470a0462e84e4ebeb77ee9e
|
|
BLAKE2b-256 checksum How to use checksums |
dc2e0e1f787466b6f4396dbe57ec0f37c7e98a646d80b61057bded1bcdff4f68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.0
|