reworkd / AgentGPT

🤖 Assemble, configure, and deploy autonomous AI Agents in your browser.
https://agentgpt.reworkd.ai
GNU General Public License v3.0
31.93k stars 9.25k forks source link

AgentGPT stucked on "Thinking" #968

Open maximedrn opened 1 year ago

maximedrn commented 1 year ago

Please check that this issue hasn't been reported before.

Expected Behavior

AgentGPT should produce results from /api/agent/start/ but does not. Everything else works: login with username, etc.

Current behaviour

When deploying a task, AgentGPT starts to think but absolutely nothing happens. I can't pause the task (it loads indefinitely), I can only stop it.

Steps to reproduce

I'm running in development mode (Manual mode) with version 0.9.0-beta.

Operating system(s): Windows 11 (64-bit) and macOS. Python version: 3.9.13 Node.js version: 16.15.1 Model used: 3.5-turbo I tried with 2 different API keys that work on the online version of AgentGPT.


I'm using this script to run both the frontend and the backend (I don't think this will be a problem):

@echo off

start cmd /K "cd next && npm run dev"
start cmd /K "cd platform && .\env\scripts\activate.bat && poetry run python -m reworkd_platform"

Here's the .env file I use for the ./next/ and ./platform/ folders:

# Deployment Environment:
NODE_ENV=development
NEXT_PUBLIC_VERCEL_ENV=${NODE_ENV}

# NextJS:
NEXT_PUBLIC_BACKEND_URL=http://localhost:3306
NEXT_PUBLIC_MAX_LOOPS=2

# Next Auth config:
NEXTAUTH_SECRET=***
NEXTAUTH_URL=http://localhost:3000

# Auth providers (Use if you want to get out of development mode sign-in):
GOOGLE_CLIENT_ID=***
GOOGLE_CLIENT_SECRET=***
GITHUB_CLIENT_ID=***
GITHUB_CLIENT_SECRET=***
DISCORD_CLIENT_SECRET=***
DISCORD_CLIENT_ID=***

# Backend:
REWORKD_PLATFORM_ENVIRONMENT=${NODE_ENV}
REWORKD_PLATFORM_FF_MOCK_MODE_ENABLED=false
REWORKD_PLATFORM_MAX_LOOPS=${NEXT_PUBLIC_MAX_LOOPS}
REWORKD_PLATFORM_OPENAI_API_KEY=***
REWORKD_PLATFORM_FRONTEND_URL=http://localhost:3000
REWORKD_PLATFORM_RELOAD=true
REWORKD_PLATFORM_OPENAI_API_BASE=https://api.openai.com/v1
REWORKD_PLATFORM_SERP_API_KEY=""
REWORKD_PLATFORM_REPLICATE_API_KEY=""

# Database (Backend):
REWORKD_PLATFORM_DATABASE_USER=reworkd_platform
REWORKD_PLATFORM_DATABASE_PASSWORD=reworkd_platform
REWORKD_PLATFORM_DATABASE_HOST=${db}
REWORKD_PLATFORM_DATABASE_PORT=3306
REWORKD_PLATFORM_DATABASE_NAME=reworkd_platform
REWORKD_PLATFORM_DATABASE_URL=file:../db/db.sqlite

# Database (Frontend):
DATABASE_USER=reworkd_platform
DATABASE_PASSWORD=reworkd_platform
DATABASE_HOST=${db}
DATABASE_PORT=3306
DATABASE_NAME=reworkd_platform
DATABASE_URL=file:../db/db.sqlite

I also edited the lines 33, 34, 60 and 61 of the ./platform/reworkd_platform/settings.py file:

class Settings(BaseSettings):
    """
    Application settings.

    These parameters can be configured
    with environment variables.
    """

    host: str = "127.0.0.1" #33
    port: int = 3306 #34

    # Quantity of workers for uvicorn
    workers_count: int = 1

    # Enable uvicorn reloading
    reload: bool = True

    # Current environment
    environment: str = "development"

    log_level: LogLevel = LogLevel.INFO

    # OpenAI
    openai_api_base: str = "https://api.openai.com/v1"
    openai_api_key: str = "<Should be updated via env>"
    secondary_openai_api_key: Optional[str] = None

    replicate_api_key: Optional[str] = None
    serp_api_key: Optional[str] = None

    # Frontend URL for CORS
    frontend_url: str = "http://localhost:3000"
    allowed_origins_regex: Optional[str] = None

    # Variables for the database
    db_host: str = "127.0.0.1"  # 60
    db_port: int = 3306 #61
    db_user: str = "reworkd_platform"
    db_pass: str = "reworkd_platform"
    db_base: str = "reworkd_platform"
    db_echo: bool = False
    db_ca_path: str = "/etc/ssl/cert.pem"

And here are the console outputs:

npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.

> agent-gpt@0.8.0 dev
> next dev

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info  - Loaded env from C:\Users\maxim\Desktop\AgentGPT-v.0.9.0-beta\next\.env
event - compiled client and server successfully in 825 ms (357 modules)
wait  - compiling / (client and server)...
event - compiled client and server successfully in 1753 ms (1408 modules)
wait  - compiling...
event - compiled successfully in 2.2s (1251 modules)
wait  - compiling...
event - compiled successfully in 368 ms (1251 modules)
wait  - compiling...
event - compiled successfully in 348 ms (1251 modules)
wait  - compiling /api/auth/[...nextauth] (client and server)...
event - compiled successfully in 161 ms (183 modules)
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE (`main`.`Session`.`sessionToken` = ? AND 1=1) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`User`.`id`, `main`.`User`.`name`, `main`.`User`.`email`, `main`.`User`.`emailVerified`, `main`.`User`.`image`, `main`.`User`.`createDate` FROM `main`.`User` WHERE `main`.`User`.`id` IN (?) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE `main`.`Session`.`userId` = ? ORDER BY `main`.`Session`.`expires` DESC LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE (`main`.`Session`.`sessionToken` = ? AND 1=1) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`User`.`id`, `main`.`User`.`name`, `main`.`User`.`email`, `main`.`User`.`emailVerified`, `main`.`User`.`image`, `main`.`User`.`createDate` FROM `main`.`User` WHERE `main`.`User`.`id` IN (?) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE `main`.`Session`.`userId` = ? ORDER BY `main`.`Session`.`expires` DESC LIMIT ? OFFSET ?
wait  - compiling /api/trpc/[trpc] (client and server)...
event - compiled successfully in 109 ms (191 modules)
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE (`main`.`Session`.`sessionToken` = ? AND 1=1) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`User`.`id`, `main`.`User`.`name`, `main`.`User`.`email`, `main`.`User`.`emailVerified`, `main`.`User`.`image`, `main`.`User`.`createDate` FROM `main`.`User` WHERE `main`.`User`.`id` IN (?) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE `main`.`Session`.`userId` = ? ORDER BY `main`.`Session`.`expires` DESC LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Agent`.`id`, `main`.`Agent`.`userId`, `main`.`Agent`.`name`, `main`.`Agent`.`goal`, `main`.`Agent`.`deleteDate`, `main`.`Agent`.`createDate` FROM `main`.`Agent` WHERE (`main`.`Agent`.`userId` = ? AND `main`.`Agent`.`deleteDate` IS NULL) ORDER BY `main`.`Agent`.`createDate` DESC LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE (`main`.`Session`.`sessionToken` = ? AND 1=1) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`User`.`id`, `main`.`User`.`name`, `main`.`User`.`email`, `main`.`User`.`emailVerified`, `main`.`User`.`image`, `main`.`User`.`createDate` FROM `main`.`User` WHERE `main`.`User`.`id` IN (?) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE `main`.`Session`.`userId` = ? ORDER BY `main`.`Session`.`expires` DESC LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Agent`.`id`, `main`.`Agent`.`userId`, `main`.`Agent`.`name`, `main`.`Agent`.`goal`, `main`.`Agent`.`deleteDate`, `main`.`Agent`.`createDate` FROM `main`.`Agent` WHERE (`main`.`Agent`.`userId` = ? AND `main`.`Agent`.`deleteDate` IS NULL) ORDER BY `main`.`Agent`.`createDate` DESC LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE (`main`.`Session`.`sessionToken` = ? AND 1=1) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`User`.`id`, `main`.`User`.`name`, `main`.`User`.`email`, `main`.`User`.`emailVerified`, `main`.`User`.`image`, `main`.`User`.`createDate` FROM `main`.`User` WHERE `main`.`User`.`id` IN (?) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE `main`.`Session`.`userId` = ? ORDER BY `main`.`Session`.`expires` DESC LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Agent`.`id`, `main`.`Agent`.`userId`, `main`.`Agent`.`name`, `main`.`Agent`.`goal`, `main`.`Agent`.`deleteDate`, `main`.`Agent`.`createDate` FROM `main`.`Agent` WHERE (`main`.`Agent`.`userId` = ? AND `main`.`Agent`.`deleteDate` IS NULL) ORDER BY `main`.`Agent`.`createDate` DESC LIMIT ? OFFSET ?
prisma:query SELECT 1
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE (`main`.`Session`.`sessionToken` = ? AND 1=1) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`User`.`id`, `main`.`User`.`name`, `main`.`User`.`email`, `main`.`User`.`emailVerified`, `main`.`User`.`image`, `main`.`User`.`createDate` FROM `main`.`User` WHERE `main`.`User`.`id` IN (?) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE (`main`.`Session`.`sessionToken` = ? AND 1=1) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`User`.`id`, `main`.`User`.`name`, `main`.`User`.`email`, `main`.`User`.`emailVerified`, `main`.`User`.`image`, `main`.`User`.`createDate` FROM `main`.`User` WHERE `main`.`User`.`id` IN (?) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE `main`.`Session`.`userId` = ? ORDER BY `main`.`Session`.`expires` DESC LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE `main`.`Session`.`userId` = ? ORDER BY `main`.`Session`.`expires` DESC LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Agent`.`id`, `main`.`Agent`.`userId`, `main`.`Agent`.`name`, `main`.`Agent`.`goal`, `main`.`Agent`.`deleteDate`, `main`.`Agent`.`createDate` FROM `main`.`Agent` WHERE (`main`.`Agent`.`userId` = ? AND `main`.`Agent`.`deleteDate` IS NULL) ORDER BY `main`.`Agent`.`createDate` DESC LIMIT ? OFFSET ?
prisma:query SELECT 1
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE (`main`.`Session`.`sessionToken` = ? AND 1=1) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`User`.`id`, `main`.`User`.`name`, `main`.`User`.`email`, `main`.`User`.`emailVerified`, `main`.`User`.`image`, `main`.`User`.`createDate` FROM `main`.`User` WHERE `main`.`User`.`id` IN (?) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE `main`.`Session`.`userId` = ? ORDER BY `main`.`Session`.`expires` DESC LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Agent`.`id`, `main`.`Agent`.`userId`, `main`.`Agent`.`name`, `main`.`Agent`.`goal`, `main`.`Agent`.`deleteDate`, `main`.`Agent`.`createDate` FROM `main`.`Agent` WHERE (`main`.`Agent`.`userId` = ? AND `main`.`Agent`.`deleteDate` IS NULL) ORDER BY `main`.`Agent`.`createDate` DESC LIMIT ? OFFSET ?
wait  - compiling /signin (client and server)...
event - compiled client and server successfully in 1219 ms (1439 modules)
prisma:query SELECT 1
prisma:query SELECT `main`.`User`.`id`, `main`.`User`.`name`, `main`.`User`.`email`, `main`.`User`.`emailVerified`, `main`.`User`.`image`, `main`.`User`.`createDate` FROM `main`.`User` WHERE (`main`.`User`.`email` = ? AND 1=1) LIMIT ? OFFSET ?
prisma:query BEGIN
prisma:query INSERT INTO `main`.`User` (`id`, `name`, `email`, `emailVerified`, `createDate`) VALUES (?,?,?,?,?) RETURNING `id` AS `id`
prisma:query SELECT `main`.`User`.`id`, `main`.`User`.`name`, `main`.`User`.`email`, `main`.`User`.`emailVerified`, `main`.`User`.`image`, `main`.`User`.`createDate` FROM `main`.`User` WHERE `main`.`User`.`id` = ? LIMIT ? OFFSET ?
prisma:query COMMIT
prisma:query BEGIN
prisma:query INSERT INTO `main`.`Session` (`id`, `sessionToken`, `userId`, `expires`) VALUES (?,?,?,?) RETURNING `id` AS `id`
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE `main`.`Session`.`id` = ? LIMIT ? OFFSET ?
prisma:query COMMIT
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE (`main`.`Session`.`sessionToken` = ? AND 1=1) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`User`.`id`, `main`.`User`.`name`, `main`.`User`.`email`, `main`.`User`.`emailVerified`, `main`.`User`.`image`, `main`.`User`.`createDate` FROM `main`.`User` WHERE `main`.`User`.`id` IN (?) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE `main`.`Session`.`userId` = ? ORDER BY `main`.`Session`.`expires` DESC LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE (`main`.`Session`.`sessionToken` = ? AND 1=1) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`User`.`id`, `main`.`User`.`name`, `main`.`User`.`email`, `main`.`User`.`emailVerified`, `main`.`User`.`image`, `main`.`User`.`createDate` FROM `main`.`User` WHERE `main`.`User`.`id` IN (?) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE `main`.`Session`.`userId` = ? ORDER BY `main`.`Session`.`expires` DESC LIMIT ? OFFSET ?
wait  - compiling /api/trpc/[trpc] (client and server)...
event - compiled successfully in 162 ms (194 modules)
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE (`main`.`Session`.`sessionToken` = ? AND 1=1) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`User`.`id`, `main`.`User`.`name`, `main`.`User`.`email`, `main`.`User`.`emailVerified`, `main`.`User`.`image`, `main`.`User`.`createDate` FROM `main`.`User` WHERE `main`.`User`.`id` IN (?) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE `main`.`Session`.`userId` = ? ORDER BY `main`.`Session`.`expires` DESC LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Agent`.`id`, `main`.`Agent`.`userId`, `main`.`Agent`.`name`, `main`.`Agent`.`goal`, `main`.`Agent`.`deleteDate`, `main`.`Agent`.`createDate` FROM `main`.`Agent` WHERE (`main`.`Agent`.`userId` = ? AND `main`.`Agent`.`deleteDate` IS NULL) ORDER BY `main`.`Agent`.`createDate` DESC LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE (`main`.`Session`.`sessionToken` = ? AND 1=1) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`User`.`id`, `main`.`User`.`name`, `main`.`User`.`email`, `main`.`User`.`emailVerified`, `main`.`User`.`image`, `main`.`User`.`createDate` FROM `main`.`User` WHERE `main`.`User`.`id` IN (?) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE `main`.`Session`.`userId` = ? ORDER BY `main`.`Session`.`expires` DESC LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Agent`.`id`, `main`.`Agent`.`userId`, `main`.`Agent`.`name`, `main`.`Agent`.`goal`, `main`.`Agent`.`deleteDate`, `main`.`Agent`.`createDate` FROM `main`.`Agent` WHERE (`main`.`Agent`.`userId` = ? AND `main`.`Agent`.`deleteDate` IS NULL) ORDER BY `main`.`Agent`.`createDate` DESC LIMIT ? OFFSET ?
prisma:query SELECT 1
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE (`main`.`Session`.`sessionToken` = ? AND 1=1) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`User`.`id`, `main`.`User`.`name`, `main`.`User`.`email`, `main`.`User`.`emailVerified`, `main`.`User`.`image`, `main`.`User`.`createDate` FROM `main`.`User` WHERE `main`.`User`.`id` IN (?) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE `main`.`Session`.`userId` = ? ORDER BY `main`.`Session`.`expires` DESC LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Agent`.`id`, `main`.`Agent`.`userId`, `main`.`Agent`.`name`, `main`.`Agent`.`goal`, `main`.`Agent`.`deleteDate`, `main`.`Agent`.`createDate` FROM `main`.`Agent` WHERE (`main`.`Agent`.`userId` = ? AND `main`.`Agent`.`deleteDate` IS NULL) ORDER BY `main`.`Agent`.`createDate` DESC LIMIT ? OFFSET ?
prisma:query SELECT 1
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE (`main`.`Session`.`sessionToken` = ? AND 1=1) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`User`.`id`, `main`.`User`.`name`, `main`.`User`.`email`, `main`.`User`.`emailVerified`, `main`.`User`.`image`, `main`.`User`.`createDate` FROM `main`.`User` WHERE `main`.`User`.`id` IN (?) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE `main`.`Session`.`userId` = ? ORDER BY `main`.`Session`.`expires` DESC LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE (`main`.`Session`.`sessionToken` = ? AND 1=1) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`User`.`id`, `main`.`User`.`name`, `main`.`User`.`email`, `main`.`User`.`emailVerified`, `main`.`User`.`image`, `main`.`User`.`createDate` FROM `main`.`User` WHERE `main`.`User`.`id` IN (?) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE `main`.`Session`.`userId` = ? ORDER BY `main`.`Session`.`expires` DESC LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Agent`.`id`, `main`.`Agent`.`userId`, `main`.`Agent`.`name`, `main`.`Agent`.`goal`, `main`.`Agent`.`deleteDate`, `main`.`Agent`.`createDate` FROM `main`.`Agent` WHERE (`main`.`Agent`.`userId` = ? AND `main`.`Agent`.`deleteDate` IS NULL) ORDER BY `main`.`Agent`.`createDate` DESC LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE (`main`.`Session`.`sessionToken` = ? AND 1=1) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`User`.`id`, `main`.`User`.`name`, `main`.`User`.`email`, `main`.`User`.`emailVerified`, `main`.`User`.`image`, `main`.`User`.`createDate` FROM `main`.`User` WHERE `main`.`User`.`id` IN (?) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE `main`.`Session`.`userId` = ? ORDER BY `main`.`Session`.`expires` DESC LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Agent`.`id`, `main`.`Agent`.`userId`, `main`.`Agent`.`name`, `main`.`Agent`.`goal`, `main`.`Agent`.`deleteDate`, `main`.`Agent`.`createDate` FROM `main`.`Agent` WHERE (`main`.`Agent`.`userId` = ? AND `main`.`Agent`.`deleteDate` IS NULL) ORDER BY `main`.`Agent`.`createDate` DESC LIMIT ? OFFSET ?
prisma:query SELECT 1
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE (`main`.`Session`.`sessionToken` = ? AND 1=1) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`User`.`id`, `main`.`User`.`name`, `main`.`User`.`email`, `main`.`User`.`emailVerified`, `main`.`User`.`image`, `main`.`User`.`createDate` FROM `main`.`User` WHERE `main`.`User`.`id` IN (?) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE (`main`.`Session`.`sessionToken` = ? AND 1=1) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`User`.`id`, `main`.`User`.`name`, `main`.`User`.`email`, `main`.`User`.`emailVerified`, `main`.`User`.`image`, `main`.`User`.`createDate` FROM `main`.`User` WHERE `main`.`User`.`id` IN (?) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE `main`.`Session`.`userId` = ? ORDER BY `main`.`Session`.`expires` DESC LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE `main`.`Session`.`userId` = ? ORDER BY `main`.`Session`.`expires` DESC LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Agent`.`id`, `main`.`Agent`.`userId`, `main`.`Agent`.`name`, `main`.`Agent`.`goal`, `main`.`Agent`.`deleteDate`, `main`.`Agent`.`createDate` FROM `main`.`Agent` WHERE (`main`.`Agent`.`userId` = ? AND `main`.`Agent`.`deleteDate` IS NULL) ORDER BY `main`.`Agent`.`createDate` DESC LIMIT ? OFFSET ?
prisma:query SELECT 1
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE (`main`.`Session`.`sessionToken` = ? AND 1=1) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`User`.`id`, `main`.`User`.`name`, `main`.`User`.`email`, `main`.`User`.`emailVerified`, `main`.`User`.`image`, `main`.`User`.`createDate` FROM `main`.`User` WHERE `main`.`User`.`id` IN (?) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE `main`.`Session`.`userId` = ? ORDER BY `main`.`Session`.`expires` DESC LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE (`main`.`Session`.`sessionToken` = ? AND 1=1) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`User`.`id`, `main`.`User`.`name`, `main`.`User`.`email`, `main`.`User`.`emailVerified`, `main`.`User`.`image`, `main`.`User`.`createDate` FROM `main`.`User` WHERE `main`.`User`.`id` IN (?) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE `main`.`Session`.`userId` = ? ORDER BY `main`.`Session`.`expires` DESC LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Agent`.`id`, `main`.`Agent`.`userId`, `main`.`Agent`.`name`, `main`.`Agent`.`goal`, `main`.`Agent`.`deleteDate`, `main`.`Agent`.`createDate` FROM `main`.`Agent` WHERE (`main`.`Agent`.`userId` = ? AND `main`.`Agent`.`deleteDate` IS NULL) ORDER BY `main`.`Agent`.`createDate` DESC LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE (`main`.`Session`.`sessionToken` = ? AND 1=1) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`User`.`id`, `main`.`User`.`name`, `main`.`User`.`email`, `main`.`User`.`emailVerified`, `main`.`User`.`image`, `main`.`User`.`createDate` FROM `main`.`User` WHERE `main`.`User`.`id` IN (?) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE (`main`.`Session`.`sessionToken` = ? AND 1=1) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`User`.`id`, `main`.`User`.`name`, `main`.`User`.`email`, `main`.`User`.`emailVerified`, `main`.`User`.`image`, `main`.`User`.`createDate` FROM `main`.`User` WHERE `main`.`User`.`id` IN (?) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE `main`.`Session`.`userId` = ? ORDER BY `main`.`Session`.`expires` DESC LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE `main`.`Session`.`userId` = ? ORDER BY `main`.`Session`.`expires` DESC LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Agent`.`id`, `main`.`Agent`.`userId`, `main`.`Agent`.`name`, `main`.`Agent`.`goal`, `main`.`Agent`.`deleteDate`, `main`.`Agent`.`createDate` FROM `main`.`Agent` WHERE (`main`.`Agent`.`userId` = ? AND `main`.`Agent`.`deleteDate` IS NULL) ORDER BY `main`.`Agent`.`createDate` DESC LIMIT ? OFFSET ?
prisma:query SELECT 1
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE (`main`.`Session`.`sessionToken` = ? AND 1=1) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`User`.`id`, `main`.`User`.`name`, `main`.`User`.`email`, `main`.`User`.`emailVerified`, `main`.`User`.`image`, `main`.`User`.`createDate` FROM `main`.`User` WHERE `main`.`User`.`id` IN (?) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE `main`.`Session`.`userId` = ? ORDER BY `main`.`Session`.`expires` DESC LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE (`main`.`Session`.`sessionToken` = ? AND 1=1) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`User`.`id`, `main`.`User`.`name`, `main`.`User`.`email`, `main`.`User`.`emailVerified`, `main`.`User`.`image`, `main`.`User`.`createDate` FROM `main`.`User` WHERE `main`.`User`.`id` IN (?) LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Session`.`id`, `main`.`Session`.`sessionToken`, `main`.`Session`.`userId`, `main`.`Session`.`expires` FROM `main`.`Session` WHERE `main`.`Session`.`userId` = ? ORDER BY `main`.`Session`.`expires` DESC LIMIT ? OFFSET ?
prisma:query SELECT `main`.`Agent`.`id`, `main`.`Agent`.`userId`, `main`.`Agent`.`name`, `main`.`Agent`.`goal`, `main`.`Agent`.`deleteDate`, `main`.`Agent`.`createDate` FROM `main`.`Agent` WHERE (`main`.`Agent`.`userId` = ? AND `main`.`Agent`.`deleteDate` IS NULL) ORDER BY `main`.`Agent`.`createDate` DESC LIMIT ? OFFSET ?
INFO:     Will watch for changes in these directories: ['C:\\Users\\maxim\\Desktop\\AgentGPT-v.0.9.0-beta\\platform']
INFO:     Uvicorn running on http://127.0.0.1:3306 (Press CTRL+C to quit)
INFO:     Started reloader process [15160] using WatchFiles
2023-07-04 11:41:06.520 | INFO     | uvicorn.server:serve:76 - Started server process [8400]
2023-07-04 11:41:06.520 | INFO     | uvicorn.lifespan.on:startup:48 - Waiting for application startup.
2023-07-04 11:41:06.816 | INFO     | uvicorn.lifespan.on:startup:62 - Application startup complete.
2023-07-04 11:41:21.020 | INFO     | uvicorn.protocols.http.httptools_impl:send:505 - 127.0.0.1:52583 - "GET /api/agent/tools HTTP/1.1" 200
2023-07-04 11:41:25.189 | INFO     | uvicorn.protocols.http.httptools_impl:send:505 - 127.0.0.1:52583 - "GET /api/agent/tools HTTP/1.1" 200
2023-07-04 11:41:35.014 | INFO     | uvicorn.protocols.http.httptools_impl:send:505 - 127.0.0.1:52584 - "GET /api/agent/tools HTTP/1.1" 200
2023-07-04 11:42:33.990 | INFO     | uvicorn.protocols.http.httptools_impl:send:505 - 127.0.0.1:52626 - "GET /api/agent/tools HTTP/1.1" 200
2023-07-04 11:43:08.049 | INFO     | uvicorn.protocols.http.httptools_impl:send:505 - 127.0.0.1:52646 - "GET /api/agent/tools HTTP/1.1" 200
2023-07-04 11:44:50.626 | INFO     | uvicorn.protocols.http.httptools_impl:send:505 - 127.0.0.1:52741 - "OPTIONS /api/agent/tools HTTP/1.1" 200
2023-07-04 11:44:50.626 | INFO     | uvicorn.protocols.http.httptools_impl:send:505 - 127.0.0.1:52741 - "GET /api/agent/tools HTTP/1.1" 200
2023-07-04 11:44:55.192 | INFO     | uvicorn.protocols.http.httptools_impl:send:505 - 127.0.0.1:52741 - "GET /api/agent/tools HTTP/1.1" 200
2023-07-04 11:45:09.502 | INFO     | uvicorn.protocols.http.httptools_impl:send:505 - 127.0.0.1:52742 - "GET /api/agent/tools HTTP/1.1" 200
2023-07-04 11:45:22.852 | INFO     | uvicorn.protocols.http.httptools_impl:send:505 - 127.0.0.1:52785 - "GET /api/agent/tools HTTP/1.1" 200
2023-07-04 11:45:24.052 | INFO     | uvicorn.protocols.http.httptools_impl:send:505 - 127.0.0.1:52785 - "GET /api/agent/tools HTTP/1.1" 200
2023-07-04 11:45:25.339 | INFO     | uvicorn.protocols.http.httptools_impl:send:505 - 127.0.0.1:52785 - "OPTIONS /api/agent/start HTTP/1.1" 200
2023-07-04 11:45:39.013 | INFO     | uvicorn.protocols.http.httptools_impl:send:505 - 127.0.0.1:52786 - "GET /api/agent/tools HTTP/1.1" 200
2023-07-04 11:46:35.550 | INFO     | uvicorn.protocols.http.httptools_impl:send:505 - 127.0.0.1:53047 - "GET /api/agent/tools HTTP/1.1" 200
2023-07-04 11:46:45.381 | INFO     | uvicorn.protocols.http.httptools_impl:send:505 - 127.0.0.1:53054 - "GET /api/agent/tools HTTP/1.1" 200
2023-07-04 11:48:40.975 | INFO     | uvicorn.protocols.http.httptools_impl:send:505 - 127.0.0.1:53113 - "GET /api/agent/tools HTTP/1.1" 200
2023-07-04 11:49:34.521 | INFO     | uvicorn.protocols.http.httptools_impl:send:505 - 127.0.0.1:53143 - "GET /api/agent/tools HTTP/1.1" 200
2023-07-04 11:49:35.356 | INFO     | uvicorn.protocols.http.httptools_impl:send:505 - 127.0.0.1:53143 - "GET /api/agent/tools HTTP/1.1" 200
2023-07-04 11:51:30.841 | INFO     | uvicorn.protocols.http.httptools_impl:send:505 - 127.0.0.1:53198 - "GET /api/agent/tools HTTP/1.1" 200

The request to /api/agent/start remains "Pending" from the browser. Occasionally, the request is not even displayed on the ./platform/ prompt, even though it has been sent. All communications with the database appear to be correct, at least for "GET /api/agent/tools HTTP/1.1" requests.

Possible solution

I think it has something to do with the changes I've made because the basic settings prevent me from communicating with the database.

Which Operating Systems are you using?

Acknowledgements

maximedrn commented 1 year ago

Edit: this seems to be either an error with all POST requests on the project since the switch to FastAPI (I don't have a problem with version 0.4.0); or a problem with the "typing" of FastAPI as the "Pending" of the request suggests a failure in the function arguments.

jasangill1 commented 1 year ago

Hello @maximedrn have you run it in production? Have you tried to manually punch in your API in the .env file? Are you asking it questions that need the serper key? Would you mind providing frontend end logs?

Looking forward to getting to the bottom of this !!!

maximedrn commented 1 year ago

Hi @jasangill1, thanks for your reply.

I ran it several times in production (master branch and versions 0.9.0 and 0.8.0), I used different browsers in normal and incognito mode. I've also used the /api/docs interface and all POST requests don't work (remain pending).

The API key is present in both .env files, I've also tried adding a second API key from the frontend. I'm only requesting one of the 3 default tasks present in the frontend. ~Aren't the frontend logs the command prompt logs for ./next?~

front-end-console-export-2023-7-2_21-44-1.txt

asim-shrestha commented 1 year ago

Hey thanks @maximedrn! The tools route is not behind an authentication wall so it will always return a result.

Because of this, this feels like maybe a db connection issue but again its hard to know for sure. Can you tell me about your precise setup. Are you running this on a VM, are you running this through docker, etc? Additionally, maybe we can schedule a call or something to walk through this and find the issue once and for all :)

maximedrn commented 1 year ago

I'm not running this on a VM or with Docker (don't wan't to enable Hyper-V and the Linux subsystem). Thus I'm using the manual setup. Here are all the commands I typed:

git clone https://github.com/reworkd/AgentGPT.git
cd AgentGPT
cd cli
npm install
npm run dev

Steps outside the prompt :

First command prompt:

cd next
npm install
cd prisma
.\useSqlite.sh
cd ..
npx prisma db push
npm run dev

Second command prompt:

cd platform
python -m venv env
.\env\scripts\Activate.bat
pip install poetry
pip install charset-normalizer==2.0.12
poetry install
poetry run python -m reworkd_platform

I've tried all versions of AgentGPT, it doesn't work since version 0.7.0. Maybe since FastAPI has been added to the project something has gone wrong with the database during manual configuration.

maximedrn commented 1 year ago

I switched to Docker and the tool now works (after a few small modifications: https://github.com/reworkd/AgentGPT/issues/984) The manual version doesn't work, I think a little more documentation detailing the steps would be nice for such a well-developed project.

However, how do I get out of dev mode with Docker? I'd like to be able to access the connection with Google and Github. I haven't seen anything that explains how to do this, or at least I don't know what to change in the Docker files so that it runs npm run build && npm run start instead of npm run dev.

jasangill1 commented 1 year ago

Hello @maximedrn Navigate to the ./next/dockerfile there will be were you can edit the command you are looking for!! once in there edit the bottom line into this:

# Start the application in production mode CMD ["npm", "run", "build", "&&", "npm", "start"]

Please try it and let me know if it helps!