Skip to content

Latest commit

 

History

History
80 lines (61 loc) · 2.08 KB

DEVELOPMENT.md

File metadata and controls

80 lines (61 loc) · 2.08 KB

Development

Quick Start

Docker (Recommended)

  1. Install Docker.

  2. Create a new directory and navigate into it:

mkdir intentkit && cd intentkit
  1. Download the required files:
# Download docker-compose.yml
curl -O https://raw.githubusercontent.com/crestalnetwork/intentkit/main/docker-compose.yml

# Download example environment file
curl -O https://raw.githubusercontent.com/crestalnetwork/intentkit/main/example.env
  1. Set up environment:
# Rename example.env to .env
mv example.env .env

# Edit .env file and add your configuration
# Make sure to set OPENAI_API_KEY
  1. Start the services:
docker compose up
  1. To create your first agent, check out the agent creation guide for development.

  2. Try it out:

curl "http://127.0.0.1:8000/admin/chat?q=Hello"

In terminal, curl cannot auto escape special characters, so you can use browser to test. Just copy the URL to your browser, replace "Hello" with your words.

Local Development

  1. Python 3.11-3.12 are supported versions, and it's recommended to use 3.12.

  2. Clone the repository:

git clone https://github.com/crestalnetwork/intentkit.git
cd intentkit
  1. Set up your environment:

If you haven't installed poetry, please install it first. We recommend manually creating a venv; otherwise, the venv created automatically by Poetry may not meet your needs.

python3.12 -m venv .venv
source .venv/bin/activate
poetry install --with dev
  1. Configure your environment:

Read Configuration for detailed settings. Then create your local .env file.

cp example.env .env
# Edit .env with your configuration
  1. Run the application:
# Run the API server in development mode
uvicorn app.api:app --reload

# Run the autonomous agent scheduler
python -m app.autonomous

Refer to "To create your first agent" and "Try it out" in the Docker section.