agent-service-toolkit Docker & Self-Hosted Deployment

GitHub

Full toolkit for running an AI agent service built with LangGraph, FastAPI and Streamlit

4,540 stars Python Python 12 files ยท ~18,651 tokens #agents#langgraph#streamlit
RAW Compose
1. Pull Image (DOCKERHUB) docker pull library/postgres
2. Docker Run (1-Click Launch) docker run -d --name agent-service-toolkit -p 5432:5432 --restart always postgres:16
3. Podman Run podman run -d --name agent-service-toolkit -p 5432:5432 --restart always postgres:16
4. Skopeo Inspect (Zero-Pull Manifest) skopeo inspect docker://docker.io/library/postgres:16
5. ORAS Pull (OCI Artifact) oras pull postgres:16
6. Compose Deployment docker compose up -d
compose.yaml
Download .yml
services:
  postgres:
    image: postgres:16
    ports:
      - "5432:5432"
    environment:
      - POSTGRES_USER=${POSTGRES_USER:-postgres}
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
      - POSTGRES_DB=${POSTGRES_DB:-agent_service}
    volumes:
      - postgres_data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
      interval: 5s
      timeout: 5s
      retries: 5

  agent_service:
    build:
      context: .
      dockerfile: docker/Dockerfile.service
    ports:
      - "8080:8080"
    env_file:
      - .env
    depends_on:
      postgres:
        condition: service_healthy
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8080/info"]
      interval: 5s
      timeout: 5s
      retries: 5
    # Volume mount of development-only credentials since compose watch doesn't sync ignored files and doesn't do initial sync when the service starts
    volumes:
      - ./privatecredentials:/privatecredentials
    develop:
      watch:
        - path: src/agents/
          action: sync+restart
          target: /app/agents/
        - path: src/schema/
          action: sync+restart
          target: /app/schema/
        - path: src/service/
          action: sync+restart
          target: /app/service/
        - path: src/core/
          action: sync+restart
          target: /app/core/
        - path: src/memory/
          action: sync+restart
          target: /app/memory/
  streamlit_app:
    build:
      context: .
      dockerfile: docker/Dockerfile.app
    ports:
      - "8501:8501"
    depends_on:
      - agent_service
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8501/healthz"]
      interval: 5s
      timeout: 5s
      retries: 5
    environment:
      - AGENT_URL=http://agent_service:8080
    develop:
      watch:
        - path: src/client/
          action: sync+restart
          target: /app/client/
        - path: src/schema/
          action: sync+restart
          target: /app/schema/
        - path: src/streamlit_app.py
          action: sync+restart
          target: /app/streamlit_app.py

volumes:
  postgres_data: