Skip to content

Conversation

@drshika
Copy link
Collaborator

@drshika drshika commented Dec 15, 2025

Sim.ai tools in Illinois Chat

This PR adds Sim.ai support in Illinois Chat.
NOTES:

  • Currently all the sim.ai workflow data is put in localstorage and will need the appropriate connections to backend for the production version.
  • Tool calling only works when you manually put in a description of the workflow. We will want to use MCP or some SDK endpoint that can get tool descriptions for the AI step in the tool calling part.

@vercel
Copy link

vercel bot commented Dec 15, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
uiuc-chat-frontend Error Error Dec 22, 2025 5:05pm

@drshika drshika changed the base branch from main to fix/self-hosted December 15, 2025 21:40
@drshika
Copy link
Collaborator Author

drshika commented Dec 15, 2025

variables to add to .env for the last commit:

NEXT_PUBLIC_SIM_API_KEY=<whatever your api key is>
NEXT_PUBLIC_SIM_BASE_URL="http://localhost:3100"
NEXT_PUBLIC_SIM_WORKFLOW_ID=<whatever the workflow id is>

# Sim Weather Workflow connection params for demo db
NEXT_PUBLIC_SIM_WEATHER_WORKFLOW_HOST="sim-weatherdb-1"
NEXT_PUBLIC_SIM_WEATHER_WORKFLOW_PORT="5432"
NEXT_PUBLIC_SIM_WEATHER_WORKFLOW_DB="weather"
NEXT_PUBLIC_SIM_WEATHER_WORKFLOW_USERNAME="postgres"
NEXT_PUBLIC_SIM_WEATHER_WORKFLOW_PASSWORD="postgres"

@drshika
Copy link
Collaborator Author

drshika commented Dec 15, 2025

docker-compose.local.yml so that illinois chat and sim can run on the same machine.

services:
  simstudio:
    build:
      context: .
      dockerfile: docker/app.Dockerfile
    ports:
      - '3100:3000'
    networks:
      - sim-network
    deploy:
      resources:
        limits:
          memory: 8G
    environment:
      - NODE_ENV=development
      - DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-simstudio}
      - INTERNAL_API_SECRET=${INTERNAL_API_SECRET:-<your internal api secret>}
      - BETTER_AUTH_URL=${NEXT_PUBLIC_APP_URL:-http://localhost:3100}
      - NEXT_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL:-http://localhost:3100}
      - BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET:-<your better auth secret>}
      - ENCRYPTION_KEY=${ENCRYPTION_KEY:-<your encryption key>}
      - COPILOT_API_KEY=${COPILOT_API_KEY}
      - SIM_AGENT_API_URL=${SIM_AGENT_API_URL}
      - OLLAMA_URL=${OLLAMA_URL:-http://host.docker.internal:11434}
      - NEXT_PUBLIC_SOCKET_URL=${NEXT_PUBLIC_SOCKET_URL:-http://localhost:3102}
      - ADMIN_API_KEY=${ADMIN_API_KEY:-08884317d80755fc9e432a40092312c77163b3ece703a10da2fcbffe22deb8ee}
    depends_on:
      db:
        condition: service_healthy
      migrations:
        condition: service_completed_successfully
      realtime:
        condition: service_healthy
    healthcheck:
      test: ['CMD', 'wget', '--spider', '--quiet', 'http://127.0.0.1:3000']
      interval: 90s
      timeout: 5s
      retries: 3
      start_period: 10s


  db:
    image: pgvector/pgvector:pg17
    restart: always
    ports:
      - '5435:5432'
    environment:
      - POSTGRES_USER=${POSTGRES_USER:-postgres}
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
      - POSTGRES_DB=${POSTGRES_DB:-simstudio}
    volumes:
      - postgres_data:/var/lib/postgresql/data
    networks:
      - sim-network
    healthcheck:
      test: ['CMD-SHELL', 'pg_isready -U postgres']
      interval: 5s
      timeout: 5s
      retries: 5

  realtime:
    build:
      context: .
      dockerfile: docker/realtime.Dockerfile
    environment:
      - DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-simstudio}
      - NEXT_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL:-http://localhost:3100}
      - BETTER_AUTH_URL=${BETTER_AUTH_URL:-http://localhost:3100}
      - BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET:-2d985c746ba2fb74ed7546495b185b6f}
    depends_on:
      db:
        condition: service_healthy
    restart: unless-stopped
    ports:
      - '3102:3002'
    networks:
      - sim-network
    deploy:
      resources:
        limits:
          memory: 8G
    healthcheck:
      test: ['CMD', 'wget', '--spider', '--quiet', 'http://127.0.0.1:3002/health']
      interval: 90s
      timeout: 5s
      retries: 3
      start_period: 10s

  migrations:
    build:
      context: .
      dockerfile: docker/db.Dockerfile
    working_dir: /app/packages/db
    environment:
      - DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-simstudio}
    depends_on:
      db:
        condition: service_healthy
    networks:
      - sim-network
    command: ['bun', 'run', 'db:migrate']
    restart: 'no'

volumes:
  postgres_data:

networks:
  sim-network:
    driver: bridge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants