Setup
Here is how you can set the environment to build an AI Agent:
Step 1: Clone the Repository
git clone https://github.com/hivenetwork-ai/ethcc7.git
Step 2: Hive Agent Server
Create a new file called .env
API keys for third-party tools are not provided.
OPENAI_API_KEY
from OpenAI
You can use other LLMs, in which case you can add a corresponding API key
ANTHROPIC_API_KEY
from Anthropic
MISTRAL_API_KEY
from Mistral
Step 3: Create a virtual Python environment
python -m venv ./venv
i. Activate the Python virtual env.
In Windows cmd.exe: venv\Scripts\activate.bat
In Windows PowerShell: venv\Scripts\Activate.ps1
Unix: source venv/bin/activate
ii. Install dependencies.
pip install -r requirements.txt
Step 4: Hive Agent UI
Run the Agent
Step 5: Usage
i. Run it
(venv) python main.py
ii. Test your agent by calling it Chat API endpoint, /api/chat
to see the result:
curl --location 'localhost:8000/api/v1/chat' \
--header 'Content-Type: application/json' \
--data '{
"user_id": "user123",
"session_id": "session123",
"chat_data": {
"messages": [
{ "role": "user", "content": "What's going on in Canada right now?" }
]
}
}'