Overview
Initializing an Agent Project sets up the foundation for building your AI agent. This process involves creating a virtual environment, installing the Upsonic CLI, and generating the project structure with template files.If you don’t have
uv installed, you can install it by following the instructions at this link.Creating Virtual Environment
Before installing Upsonic, create a virtual environment to isolate your project dependencies:Installing Upsonic CLI
Install Upsonic using pip:upsonic command-line tool globally or within your virtual environment. Verify the installation:
Initialize your Agent Project
Navigate to your project directory and run:agent.py: Template agent file with a basicmain()functionupsonic_config.json: Configuration file with your agent’s metadata, schemas, and dependencies
agent.py includes a simple example that uses Upsonic’s Agent class to process questions. You can customize this file to implement your agent’s specific logic.
Run your Agent Project
After initialization, install the required dependencies:api section of upsonic_config.json, including FastAPI and uvicorn.
Then start your agent as a FastAPI server:
http://localhost:8000. You can customize the host and port:
http://localhost:8000/docs to test your agent’s endpoint.
