Arunabh SharmaandArunabh Sharma fe2c7d8d98 feat(ollama): Adding ollama for enabling local model agents (#153)
* feat(ollama): add ollama package dependency, add two separate deployment docker compose files and add a shell script to toggle between the deployment docker compose files

add base ollama.ts implementation

add latest attempt to fetch Ollama models dynamically

fix ollama dynamic model fetching, models now being rendered on GUI

fix package and package-lock.json to remove ollama dependency and add types.ts for ollama

switch MODEL_PROVIDERS to getModelProviders

make dynamic ollama model dropdown change using zustland store

make dynamic ollama model changes to router and evaluator ts too

* feat(ollama): fix evaluated options by de-duplicating it

* feat(ollama): make README.md change to reflect local model workflow

* feat(ollama): add base non-ollama docker compose file, add --local flag to start_simstudio_docker.sh with ollama service

* feat(ollama): fix README.md local model instructions

* feat(ollama): remove de-duplication logic and separate getModelProviders into two

* fix non-local init and translate.ts

* create combined docker-compose file and fix start_simstudio_docker script too

* update package-lock.json

* feat(ollama): fix README.md instructions and docker compose

---------

Co-authored-by: Arunabh Sharma <arunabh.sharma@supernal.aero>
2025-03-29 13:34:44 -07:00
2025-03-14 18:09:10 -07:00
2025-03-18 16:05:30 -07:00
2025-03-19 14:36:14 -07:00

Sim Studio Logo

License: Apache-2.0 Discord Twitter PRs welcome support

Sim Studio is a powerful, user-friendly platform for building, testing, and optimizing agentic workflows.

Run

  1. Run on our cloud-hosted version
  2. Self-host

How to Self-Host

Step 1: Fork the Repository

Important: Start by forking this repository by clicking the "Fork" button at the top right of this page. This creates your own copy of the repository under your GitHub account.

Note: Ensure you have an editor, git, npm, and Docker (if you're not setting up manually) installed on your system.

There are several ways to self-host Sim Studio:

# Clone your forked repository
git clone https://github.com/YOUR_USERNAME/sim.git
cd sim

# Create environment file and update with required environment variables (BETTER_AUTH_SECRET)
cp sim/.env.example sim/.env

# Start Sim Studio using the provided script
docker compose up -d --build

or

./start_simstudio_docker.sh

After running these commands:

  1. Access the Application:

  2. Useful Docker Commands:

    # View application logs
    docker compose logs -f simstudio
    
    # Access PostgreSQL database
    docker compose exec db psql -U postgres -d simstudio
    
    # Stop the environment
    docker compose down
    
    # Rebuild and restart (after code changes)
    docker compose up -d --build
    

Working with Local Models

To use local models with Sim Studio, follow these steps:

  1. Pull Local Models

    # Run the ollama_docker.sh script to pull the required models
    ./sim/scripts/ollama_docker.sh pull <model_name>
    
  2. Start Sim Studio with Local Models

    #Start Sim Studio with local model support
    ./start_simstudio_docker.sh --local
    
    # or
    
    # Start Sim Studio with local model support if you have nvidia GPU
    docker compose up --profile local-gpu -d --build
    
    # or
    
    # Start Sim Studio with local model support if you don't have nvidia GPU
    docker compose up --profile local-cpu -d --build
    

The application will now be configured to use your local models. You can access it at http://localhost:3000/w/.

Option 2: Dev Containers

  1. Open VS Code or your favorite VS Code fork (Cursor, Windsurf, etc.)
  2. Install the Remote - Containers extension
  3. Open the project in your editor
  4. Click "Reopen in Container" when prompted
  5. The environment will automatically be set up in the sim directory
  6. Run npm run dev in the terminal or use the sim-start alias

Option 3: Manual Setup

  1. Install Dependencies
# Clone the repository
git clone https://github.com/YOUR_USERNAME/sim.git
cd sim/sim

# Install dependencies
npm install
  1. Set Up Environment
# Copy .env.example to .env
cp .env.example .env

# Configure your .env file with the required environment variables:
# - Database connection (PostgreSQL)
# - Authentication settings (Better-Auth Secret)

⚠️ Important Notes:

  • If RESEND_API_KEY is not set, verification codes for login/signup will be logged to the console.
  • You can use these logged codes for testing authentication locally.
  • For production environments, you should set up a proper email provider.
  1. Set Up Database
# Push the database schema
npx drizzle-kit push
  1. Start Development Server
# Start the development server
npm run dev
  1. Open http://localhost:3000 in your browser

Tech Stack

Contributing

We welcome contributions! Please see our Contributing Guide for details.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Made with ❤️ by the Sim Studio Team

Languages
TypeScript 77%
MDX 20.8%
JavaScript 1.9%
CSS 0.1%