Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# API Configuration
API_HOST=0.0.0.0
API_PORT=8000
SECRET_KEY=dev-change-me-in-production-use-openssl-rand-hex-32
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=30

# Database
DB_URL=postgresql+psycopg://postgres:postgres@db:5432/agents
DB_URL_SQLITE=sqlite:///./agents.db

# Redis
REDIS_URL=redis://redis:6379/0

# LLM Provider
LLM_PROVIDER=openai
OPENAI_API_KEY=sk-your-key-here
OLLAMA_BASE_URL=http://ollama:11434
DEFAULT_MODEL=gpt-4o-mini
DEFAULT_TEMPERATURE=0.2

# Pricing (USD per 1K tokens)
PRICE_PROMPT_USD_PER_1K=0.00015
PRICE_COMPLETION_USD_PER_1K=0.0006

# Frontend
NEXT_PUBLIC_API_URL=http://localhost:8000

# Environment
ENVIRONMENT=development
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ __pycache__/
*.pyo
*.pyd
.env
.env.local
.env.*.local
.poetry
*.sqlite3
*.db
Expand All @@ -19,3 +21,24 @@ htmlcov/
*.log
/.idea/
/.vscode/

# Generated agents
generated/agents/*
!generated/agents/.gitkeep

# Docker
docker-compose.override.yml

# Python
*.egg-info/
.eggs/
*.egg
.ruff_cache/

# OS
Thumbs.db

# Next.js
out/
*.tsbuildinfo
next-env.d.ts
53 changes: 53 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
.PHONY: help setup up down logs migrate seed test clean shell-api shell-web ollama

help:
@echo "Smartr Agent Studio - Makefile Commands"
@echo ""
@echo " make setup - Initial setup (copy .env)"
@echo " make up - Start all services"
@echo " make down - Stop all services"
@echo " make logs - View logs (append ARGS='api' for specific service)"
@echo " make migrate - Run database migrations"
@echo " make seed - Seed database with demo data"
@echo " make test - Run tests"
@echo " make clean - Clean all data and containers"
@echo " make shell-api - Open shell in API container"
@echo " make shell-web - Open shell in web container"
@echo " make ollama - Start with Ollama support"
@echo ""

setup:
@cp .env.example .env
@echo "✓ Created .env file"
@echo "⚠ Please edit .env with your configuration (especially OPENAI_API_KEY)"

up:
docker compose up -d --build

down:
docker compose down

logs:
docker compose logs -f $(ARGS)

migrate:
docker compose exec api alembic upgrade head

seed:
docker compose exec api python -m app.seed

test:
docker compose exec api pytest

clean:
docker compose down -v
rm -rf generated/agents/*

shell-api:
docker compose exec api /bin/bash

shell-web:
docker compose exec web /bin/sh

ollama:
docker compose --profile ollama up -d --build
Loading