Skip to main content

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

custom_react_agent-0.1.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

custom_react_agent-0.1.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file custom_react_agent-0.1.0.tar.gz.

File metadata

  • Download URL: custom_react_agent-0.1.0.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.0

File hashes

Hashes for custom_react_agent-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2ed73308fbea3ebf49d6d0cb02abb798bbebd6ab9a3dc7aacd5d43dec644d9df
MD5 cdee7a652df3255fdc492faf5f6e0e2b
BLAKE2b-256 13b2ec7870b28c91df8079e018530ec1d2bdeb525075f0a2f513e2d511f4d178

See more details on using hashes here.

File details

Details for the file custom_react_agent-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for custom_react_agent-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6833b9bf193f9aea161706b8b4d9288fc467eca4c470a0462e84e4ebeb77ee9e
MD5 bf632249376062314e41afa7335f0579
BLAKE2b-256 dc2e0e1f787466b6f4396dbe57ec0f37c7e98a646d80b61057bded1bcdff4f68

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page