feat: add psagentai agent with deployment and configuration

Initial project setup including the main agent script, configuration
files, profile JSON state, systemd service unit, startup script,
deployment documentation, and Python dependencies.

Includes .env, venv/, and __pycache__/ which should likely be
excluded via .gitignore to avoid committing secrets and artifacts.
This commit is contained in:
2026-10-25 17:05:13 -03:00
commit 6b3b6541a7
3792 changed files with 805563 additions and 0 deletions
Executable
+85
View File
@@ -0,0 +1,85 @@
#!/bin/bash
set -e
echo "=========================================="
echo " PsAgentAI - Personal Agent AI Conversacional"
echo "=========================================="
echo ""
# Check Python 3
if ! command -v python3 &> /dev/null; then
echo "❌ Python 3 não encontrado. Instale com: sudo apt install python3 python3-venv python3-pip"
exit 1
fi
PYTHON_VERSION=$(python3 --version | cut -d' ' -f2)
echo "✅ Python $PYTHON_VERSION encontrado"
# Create virtual environment
VENV_DIR="venv"
if [ ! -d "$VENV_DIR" ]; then
echo ""
echo "📦 Criando ambiente virtual Python..."
python3 -m venv "$VENV_DIR"
echo "✅ Ambiente virtual criado em ./$VENV_DIR"
else
echo "✅ Ambiente virtual já existe em ./$VENV_DIR"
fi
# Activate virtual environment
echo ""
echo "🔄 Ativando ambiente virtual..."
source "$VENV_DIR/bin/activate"
# Upgrade pip
echo ""
echo "⬆️ Atualizando pip..."
pip install --upgrade pip -q
# Install dependencies
echo ""
echo "📥 Instalando dependências..."
pip install -r requirements.txt -q
echo "✅ Dependências instaladas"
# Check .env file
echo ""
if [ ! -f ".env" ]; then
echo "⚠️ Arquivo .env não encontrado!"
echo "📝 Copie o arquivo .env.example para .env e configure suas chaves API."
if [ -f ".env.example" ]; then
cp .env.example .env
echo "✅ Arquivo .env criado a partir de .env.example"
echo "⚠️ Por favor, edite o arquivo .env com suas configurações antes de continuar."
else
echo "❌ Arquivo .env.example não encontrado. Crie o arquivo .env manualmente."
exit 1
fi
else
echo "✅ Arquivo .env encontrado"
fi
# Check required env vars
echo ""
echo "🔍 Verificando configurações..."
check_env_var() {
if [ -z "$1" ] || [ "$1" = " " ]; then
echo "⚠️ $2 não configurado no .env"
else
echo "✅ $2 configurado"
fi
}
check_env_var "$(grep -E '^TELEGRAM_BOT_TOKEN=' .env | cut -d'=' -f2-)" "TELEGRAM_BOT_TOKEN"
check_env_var "$(grep -E '^TELEGRAM_CHAT_ID=' .env | cut -d'=' -f2-)" "TELEGRAM_CHAT_ID"
check_env_var "$(grep -E '^(OPENROUTER_API_KEY|STEPFUN_API_KEY|QWENCLOUD_API_KEY)=' .env | cut -d'=' -f2- | head -1)" "Pelo menos uma chave de API de IA"
echo ""
echo "=========================================="
echo " Iniciando PsAgentAI..."
echo "=========================================="
echo ""
# Run the agent
python3 psagentai_agent.py