docker.recipes

AutoGPT

intermediate

Autonomous AI agent that can perform complex tasks with minimal human intervention

Overview

AutoGPT is an experimental open-source autonomous AI agent that leverages GPT-4's capabilities to perform complex, multi-step tasks without constant human supervision. Developed as one of the first autonomous agent frameworks, AutoGPT can break down high-level goals into subtasks, execute them iteratively, and learn from the results to achieve objectives like research, content creation, and business automation. The agent operates by maintaining memory of previous actions, reasoning about next steps, and utilizing various plugins to interact with external systems. This stack combines AutoGPT with Redis as the memory backend, creating a powerful autonomous agent system where Redis handles short-term memory, task queues, and session persistence. Redis's sub-millisecond response times enable AutoGPT to quickly access its thought processes, previous actions, and contextual information, which is crucial for maintaining coherent autonomous behavior across extended task sequences. The in-memory data structure capabilities of Redis make it ideal for storing the complex nested data AutoGPT generates during its reasoning cycles. This configuration is valuable for researchers exploring autonomous AI capabilities, businesses looking to automate complex workflows, and developers building AI-powered applications that require persistent memory and task execution. The combination provides a production-ready foundation for autonomous agent deployment, with Redis ensuring reliable memory operations that prevent the agent from losing context during long-running tasks or system restarts.

Key Features

  • GPT-4 and GPT-3.5-turbo integration with configurable model selection for different task complexities
  • Redis-backed persistent memory enabling context retention across agent sessions and restarts
  • Web-based interface for goal setting, constraint configuration, and real-time agent monitoring
  • Plugin ecosystem supporting web browsing, code execution, file operations, and API integrations
  • Human-in-the-loop approval system for reviewing and authorizing agent actions before execution
  • Multi-step task decomposition with iterative planning and execution cycles
  • Structured logging system for tracking agent decision-making processes and debugging
  • Redis pub/sub messaging for real-time communication between agent components

Common Use Cases

  • 1Market research automation where the agent gathers competitor data, analyzes trends, and generates reports
  • 2Content pipeline automation for blogs, social media, and marketing materials with fact-checking workflows
  • 3Software development assistance including code review, documentation generation, and testing automation
  • 4Business process automation for tasks like lead qualification, customer onboarding, and data entry
  • 5Research and analysis projects requiring information synthesis from multiple sources
  • 6E-commerce automation including product research, pricing analysis, and inventory management
  • 7Personal productivity enhancement for scheduling, email management, and task prioritization

Prerequisites

  • OpenAI API key with GPT-4 access and sufficient credits for extended autonomous operations
  • Minimum 2GB RAM (4GB+ recommended) to handle GPT model inference and Redis memory operations
  • Port 8000 available for AutoGPT web interface access
  • Basic understanding of AI safety principles and autonomous agent supervision
  • Familiarity with OpenAI API rate limits and cost management for production deployments
  • Understanding of the tasks you want to automate and ability to set clear, achievable goals

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 autogpt:
3 image: significantgravitas/auto-gpt:latest
4 container_name: autogpt
5 restart: unless-stopped
6 ports:
7 - "${AUTOGPT_PORT:-8000}:8000"
8 volumes:
9 - ./data:/app/data
10 - ./logs:/app/logs
11 - ./plugins:/app/plugins
12 environment:
13 - OPENAI_API_KEY=${OPENAI_API_KEY}
14 - SMART_LLM=${SMART_LLM:-gpt-4}
15 - FAST_LLM=${FAST_LLM:-gpt-3.5-turbo}
16 - REDIS_HOST=redis
17 - REDIS_PORT=6379
18 depends_on:
19 - redis
20
21 redis:
22 image: redis:7-alpine
23 container_name: autogpt-redis
24 restart: unless-stopped
25 volumes:
26 - redis_data:/data
27
28volumes:
29 redis_data:

.env Template

.env
1# AutoGPT Configuration
2AUTOGPT_PORT=8000
3
4# OpenAI API Key (required)
5OPENAI_API_KEY=sk-your-openai-api-key
6
7# LLM Model Selection
8SMART_LLM=gpt-4
9FAST_LLM=gpt-3.5-turbo
10
11# Optional: Anthropic API
12# ANTHROPIC_API_KEY=sk-ant-your-key
13
14# Optional: Google API for search
15# GOOGLE_API_KEY=your-google-api-key
16# GOOGLE_CUSTOM_SEARCH_ENGINE_ID=your-cse-id

Usage Notes

  1. 1WebUI available at http://localhost:8000
  2. 2Requires OpenAI API key with GPT-4 access
  3. 3Configure goals and constraints via the interface
  4. 4Monitor agent actions in real-time
  5. 5Review and approve actions for safety
  6. 6Plugins extend functionality (web browse, code exec)

Individual Services(2 services)

Copy individual services to mix and match with your existing compose files.

autogpt
autogpt:
  image: significantgravitas/auto-gpt:latest
  container_name: autogpt
  restart: unless-stopped
  ports:
    - ${AUTOGPT_PORT:-8000}:8000
  volumes:
    - ./data:/app/data
    - ./logs:/app/logs
    - ./plugins:/app/plugins
  environment:
    - OPENAI_API_KEY=${OPENAI_API_KEY}
    - SMART_LLM=${SMART_LLM:-gpt-4}
    - FAST_LLM=${FAST_LLM:-gpt-3.5-turbo}
    - REDIS_HOST=redis
    - REDIS_PORT=6379
  depends_on:
    - redis
redis
redis:
  image: redis:7-alpine
  container_name: autogpt-redis
  restart: unless-stopped
  volumes:
    - redis_data:/data

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 autogpt:
5 image: significantgravitas/auto-gpt:latest
6 container_name: autogpt
7 restart: unless-stopped
8 ports:
9 - "${AUTOGPT_PORT:-8000}:8000"
10 volumes:
11 - ./data:/app/data
12 - ./logs:/app/logs
13 - ./plugins:/app/plugins
14 environment:
15 - OPENAI_API_KEY=${OPENAI_API_KEY}
16 - SMART_LLM=${SMART_LLM:-gpt-4}
17 - FAST_LLM=${FAST_LLM:-gpt-3.5-turbo}
18 - REDIS_HOST=redis
19 - REDIS_PORT=6379
20 depends_on:
21 - redis
22
23 redis:
24 image: redis:7-alpine
25 container_name: autogpt-redis
26 restart: unless-stopped
27 volumes:
28 - redis_data:/data
29
30volumes:
31 redis_data:
32EOF
33
34# 2. Create the .env file
35cat > .env << 'EOF'
36# AutoGPT Configuration
37AUTOGPT_PORT=8000
38
39# OpenAI API Key (required)
40OPENAI_API_KEY=sk-your-openai-api-key
41
42# LLM Model Selection
43SMART_LLM=gpt-4
44FAST_LLM=gpt-3.5-turbo
45
46# Optional: Anthropic API
47# ANTHROPIC_API_KEY=sk-ant-your-key
48
49# Optional: Google API for search
50# GOOGLE_API_KEY=your-google-api-key
51# GOOGLE_CUSTOM_SEARCH_ENGINE_ID=your-cse-id
52EOF
53
54# 3. Start the services
55docker compose up -d
56
57# 4. View logs
58docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/autogpt/run | bash

Troubleshooting

  • OpenAI API rate limit exceeded errors: Implement exponential backoff delays and monitor usage quotas in your OpenAI dashboard
  • Agent getting stuck in reasoning loops: Set more specific constraints and shorter task horizons in the goal configuration
  • Redis connection failures causing memory loss: Verify Redis container health and check network connectivity between services
  • High API costs from inefficient agent behavior: Use GPT-3.5-turbo for simple tasks and implement cost monitoring alerts
  • Plugin execution failures: Check plugin permissions and ensure required dependencies are available in mounted volumes
  • Web interface not loading: Verify port 8000 is properly exposed and check AutoGPT container logs for startup errors

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Ad Space