{"slug": "from-docker-compose-up-to-your-first-custom-agent", "title": "From docker compose up to Your First Custom Agent", "summary": "A developer behind the open-source Auto Learning Agents project published a walkthrough for self-hosting an AI agent platform using a single Docker image that bundles an Elixir/OTP supervisor, PHP tool layer, Python embedding model, Playwright/Chromium browser automation, and an Apache web UI. The guide covers three-step deployment via docker compose, persistent volumes for memories and queues, and a three-layer live-reload configuration system, then shows how a custom agent is defined as a single agents.json entry with tick_minutes scheduling and an instructions file. Optional pre_command and gate_command fields let agents ingest fresh data each tick and skip model calls when idle.", "body_md": "If you have ever wanted to run an AI agent platform on your own box instead of renting someone else's, this is a walkthrough of what that looks like from the first command to a custom agent running on a schedule. It is based on Auto Learning Agents, the free open source platform we build, but most of the patterns carry over to any self hosted agent stack.\n\nSelf hosting used to mean a weekend of wiring services together, a vector database here, a queue there, a Python service that only worked on one machine. The setup below is three steps, and each one is small enough to understand completely before moving to the next.\n\nThe platform ships as a single Docker image. It bundles the Elixir/OTP release that supervises every agent, PHP for the tool layer, Python with a local embedding model, Playwright with Chromium for browser automation, and Apache serving the web UI. One start script brings all of it up, so the host only needs Docker.\n\n```\ngit clone https://github.com/AIAppsAPI/auto-learning-agents\ncd auto-learning-agents\ncp .env.example .env\ndocker compose up -d\n```\n\nThe first run takes a few minutes while the release compiles and the Python dependencies install. After that it starts in seconds and restarts with the host. Two ports are published, 80 for the web UI and 9500 for the memory bank socket the tools use. If port 80 is taken, change the mapping to something like 8080:80.\n\nThe part worth understanding is the volumes. The SQLite database with memories, conversations and knowledge bases, the markdown memory files, the work queues, the logs and even your Claude login each live in a persistent volume, so you can rebuild or upgrade the container freely. Backing up the system means backing up the volumes and nothing else. The [Docker install guide](https://www.autolearningagents.com/docs/docker-install.php) covers each volume and the upgrade path.\n\nConfiguration is split into three layers, and every one of them applies live. The system rereads it while it runs, so most changes need no restart.\n\nsettings.txt holds the runtime config as one JSON object: the install path, the ports for the two always on Python services (9500 for embeddings and storage, 9510 for topic classification), which model families the install can use, and the memory backend. Setting the memory backend to local gives you local embeddings with SQLite vector search and zero setup. On Docker you rarely touch this file directly, because the values in .env are applied into it on every container start.\n\nThe config directory holds one watched JSON file per area: agents.json for your agents, chatbot.json for Discord, Slack, WhatsApp and Telegram, plus files for marketing, customer service, social media and website reporting. Edits reconcile while agents are running.\n\nThe third layer is plain markdown in memory/system: brand voice, product descriptions, support policies, coding standards. Agents read these files every time they work, so a one paragraph edit to the voice file changes the tone of every outgoing message. The [configuration reference](https://www.autolearningagents.com/docs/configuration.php) maps out what lives where.\n\nA custom agent is one entry in agents.json:\n\n```\n{\n  \"id\": \"reviewwatcher\",\n  \"type\": \"custom\",\n  \"enabled\": true,\n  \"tick_minutes\": 120,\n  \"model\": \"claude-sonnet\",\n  \"instructions_file\": \"memory/agent_systems/custom/reviewwatcher.md\"\n}\n```\n\ntick_minutes is the schedule, model is the brain, and the instructions file is the job description. Write it the way you would brief a contractor: the role, what to do each tick, and when to raise a flag instead of deciding alone. Every agent ships disabled until you flip enabled on.\n\nTwo optional fields do a lot of practical work. pre_command runs a command at the start of each tick and feeds its output into the prompt, which is the clean way to hand an agent fresh rows or log lines without making it fetch them. gate_command skips the model call entirely when there is nothing to do, so an idle agent costs nothing.\n\nWhat makes a short brief produce competent work is everything the agent inherits: its recent conversation, a memory query before it acts and a save after, and the full tool layer for email, browsing, scraping and terminal sessions. The [guide to creating agents](https://www.autolearningagents.com/docs/creating-agents.php) walks through tuning the tick and the model once the first runs are in.\n\nPick one small recurring job you already do by hand, write a five line brief for it, set the tick to a couple of hours and watch the first few runs in the activity feed. Too cautious means the brief can grant more, too eager means it needs one more boundary. Everything you need to get the platform running is on the [get started page](https://www.autolearningagents.com/get-started/).", "url": "https://wpnews.pro/news/from-docker-compose-up-to-your-first-custom-agent", "canonical_source": "https://dev.to/paulcrinigan/from-docker-compose-up-to-your-first-custom-agent-4ed4", "published_at": "2026-10-01 23:03:45+00:00", "updated_at": "2026-10-01 23:14:33.434471+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "ai-infrastructure"], "entities": ["Auto Learning Agents", "Docker", "Elixir", "OTP", "PHP", "Python", "Playwright", "Claude"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/from-docker-compose-up-to-your-first-custom-agent", "markdown": "https://wpnews.pro/news/from-docker-compose-up-to-your-first-custom-agent.md", "text": "https://wpnews.pro/news/from-docker-compose-up-to-your-first-custom-agent.txt", "jsonld": "https://wpnews.pro/news/from-docker-compose-up-to-your-first-custom-agent.jsonld"}}