diff --git a/libs/.docker/.env.example b/libs/.docker/.env.example index 1bc0e5d84..061eb781e 100644 --- a/libs/.docker/.env.example +++ b/libs/.docker/.env.example @@ -16,6 +16,7 @@ PGADMIN_DEFAULT_PASSWORD=local123 # Base (mandatory) SUPERAGENT_API_URL=https://api.beta.superagent.sh +SUPERRAG_API_URL="https://rag.beta.superagent.sh/api/v1" OPENAI_API_KEY= DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_DB_HOST}:${POSTGRES_DB_PORT}/superagent DATABASE_MIGRATION_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_DB_HOST}:${POSTGRES_DB_PORT}/superagent @@ -25,7 +26,11 @@ OPENROUTER_API_KEY= # Mandatory for Neon DB DATABASE_SHADOW_URL= # Memory (mandatory) +MEMORY=motorhead MEMORY_API_URL=http://motorhead:8081 +# Redis memory +REDIS_MEMORY_URL=redis://localhost:6379/0 +REDIS_MEMORY_WINDOW=10 # NOTE: Vectorstores (one is mandatory if you plan on loading datasources) VECTORSTORE=pinecone # `qdrant`, `weaviate` etc. # Qdrant vars diff --git a/libs/.docker/docker-compose.yml b/libs/.docker/docker-compose.yml index 4a069194f..2da2187d6 100644 --- a/libs/.docker/docker-compose.yml +++ b/libs/.docker/docker-compose.yml @@ -11,6 +11,7 @@ services: environment: - PORT=8080 - SUPERAGENT_API_URL=${SUPERAGENT_API_URL} + - SUPERRAG_API_URL=${SUPERRAG_API_URL} - STRIPE_SECRET_KEY=${STRIPE_SECRET_KEY} - POSTGRES_DB_HOST=${POSTGRES_DB_HOST} - POSTGRES_DB_PORT=${POSTGRES_DB_PORT} @@ -20,7 +21,10 @@ services: - JWT_SECRET=${JWT_SECRET} - OPENROUTER_API_KEY=${OPENROUTER_API_KEY} - DATABASE_SHADOW_URL=${DATABASE_SHADOW_URL} + - MEMORY=${MEMORY} - MEMORY_API_URL=${MEMORY_API_URL} + - REDIS_MEMORY_URL=${REDIS_MEMORY_URL} + - REDIS_MEMORY_WINDOW=${REDIS_MEMORY_WINDOW} - VECTORSTORE=${VECTORSTORE} - QDRANT_API_KEY=${QDRANT_API_KEY} - QDRANT_HOST=${QDRANT_HOST} diff --git a/libs/superagent/.env.example b/libs/superagent/.env.example index 3e02966e0..148f3b4b8 100644 --- a/libs/superagent/.env.example +++ b/libs/superagent/.env.example @@ -8,10 +8,10 @@ OPENROUTER_API_KEY= # Mandatory for Neon DB DATABASE_SHADOW_URL= # Memory (mandatory) -MEMORY= +MEMORY=motorhead # Redis Memory -REDIS_URL= -REDIS_MEMORY_WINDOW= +REDIS_MEMORY_URL=redis://localhost:6379/0 +REDIS_MEMORY_WINDOW=10 # Motorhead Memory MEMORY_API_URL=https://memory.superagent.sh # NOTE: Vectorstores (one is mandatory if you plan on loading datasources) diff --git a/libs/superagent/app/agents/langchain.py b/libs/superagent/app/agents/langchain.py index fc605beb1..8d004f8a5 100644 --- a/libs/superagent/app/agents/langchain.py +++ b/libs/superagent/app/agents/langchain.py @@ -194,7 +194,7 @@ async def _get_memory(self) -> List: if self.session_id else f"{self.agent_id}" ), - url=config("REDIS_URL", "redis://localhost:6379/0"), + url=config("REDIS_MEMORY_URL", "redis://localhost:6379/0"), key_prefix="superagent:", ), memory_key="chat_history",