A FastAPI-based dynamic tool registry and execution system for intelligent agents. This module allows tools to be added, removed, and configured without code changes, with comprehensive permission and rate limiting support.
- Dynamic tool registry (HTTP and Database tools)
- Role-based permission system
- Rate limiting per tool
- Execution history and analytics
- REST API for all operations
- Python 3.10+
- PostgreSQL 12+
- pip or poetry
-
Clone the repository and navigate to the project directory
-
Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Copy environment file and configure:
cp .env.example .env
# Edit .env with your database credentials and settings- Run the application:
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000The API will be available at:
- API: http://localhost:8000
- Docs: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
GET /- Root endpoint with API informationGET /health- Basic health checkGET /health/ready- Readiness checkGET /health/live- Liveness check
uvicorn app.main:app --reloadpytesttools-module/
├── app/
│ ├── __init__.py
│ ├── main.py # FastAPI app initialization
│ ├── config.py # Configuration settings
│ ├── database/ # Database models and migrations
│ ├── api/ # API routes
│ ├── services/ # Business logic
│ ├── executors/ # Tool execution engines
│ ├── middleware/ # Auth, permissions, rate limiting
│ └── schemas/ # Pydantic models
├── tests/ # Test files
├── requirements.txt
├── .env.example
└── README.md
MIT