Installation

This guide provides step-by-step instructions to install AgenticAPI and its dependencies, enabling you to start building action-oriented APIs for AI agents. AgenticAPI is built on Python, leveraging FastAPI and Pydantic for performance and type safety. Follow these steps to set up your development environment.

Prerequisites #

  • Python: Version 3.8 or higher.
  • pip: Python package manager, included with Python.
  • Virtual Environment (recommended): To isolate dependencies.
  • Operating System: Windows, macOS, or Linux.

Step 1: Set Up a Virtual Environment #

Create and activate a virtual environment to manage dependencies:

Bash
# Navigate to your project directory
cd /path/to/your/project

# Create a virtual environment
python -m venv venv

# Activate the virtual environment
# On Windows
venv\Scripts\activate
# On macOS/Linux
source venv/bin/activate

Step 2: Install Dependencies #

Install AgenticAPI’s core dependencies using pip. These include FastAPI for the API framework, Uvicorn for the server, Pydantic for data validation, and additional libraries for rate limiting and HTTP requests.

Bash
pip install fastapi uvicorn pydantic slowapi httpx

Step 3: Verify Installation #

Confirm the dependencies are installed correctly:

Bash
pip list

Expected output includes:

Plaintext
fastapi     >=0.95.0
uvicorn     >=0.20.0
pydantic    >=1.10.0
slowapi     >=0.1.8
httpx       >=0.23.0

Step 4: Create a Basic FastAPI Application #

Set up a minimal AgenticAPI application to ensure your environment is ready. Create a file named main.py:

Python
from fastapi import FastAPI

app = FastAPI(title="AgenticAPI", version="0.3.0")

@app.get("/health")
async def health_check():
    return {"status": "healthy"}

Run the server to test the setup:

Python
uvicorn main:app --host 0.0.0.0 --port 8000

Open a browser or use curl to verify:

Bash
curl http://localhost:8000/health

Expected response:

JSON
{"status": "healthy"}

Troubleshooting #

  • Port Conflict: If port 8000 is in use, change it (e.g., --port 8001).
  • Missing Dependencies: Run pip install again or check Python version (python --version).
  • Uvicorn Not Found: Ensure uvicorn is installed (pip install uvicorn).

Next Steps #

What are your feelings
Updated on May 29, 2025