Skip to content

procome/smarter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5,859 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

The Smarter Project

Latest Release Build Status Release Status Documentation Status Docker Pulls Artifact Hub
Docs Website License: GNU AGPL v3
Python Django Pydantic Django Rest Framework
hack.d Lawrence McDaniel

This repo contains source code for the Smarter REST API and the web based authoring platform.

Smarter is a declarative extensible AI authoring and resource management system. It is used as an instructional tool at University of British Columbia for teaching cloud computing at scale, and generative AI prompt engineering techniques including advanced use of LLM tool calling involving secure integrations to remote data sources like Sql databases and remote APIs.

At a Glance

  • 1-click Quickstart deployment with Docker.
  • declarative manifest based resource management
  • no-code LLM tool call extensibility that facilitates integrations to remote data sources like Sql databases and remote APIs
  • command-line interface for Windows, macOS, Linux and Docker
  • rest api
  • web console / prompt engineer workbench
  • robust developer ecosystem: PyPi, NPM, VS Code Extension and more
  • publicly accessible online documentation and self onboarding resources
  • open source UI components for jump starting projects

Quickstart

This setup uses Docker and takes around 20 minutes for first time installations.

  1. Verify project requirements:

  2. Add your credentials to .env in the root of this repo. See the inline documentation for details on the minimum environment variables that you will need to set.

  3. Initialize, build and run the application locally.

git clone https://github.com/smarter-sh/smarter
make help           # scaffolds a .env file in the root of the repo
                    #
                    # ****************************
                    # STOP HERE!
                    # ****************************
                    # Add your credentials to .env located in the project root folder.
                    #
make init           # pulls Docker containers, creates a Python virtual environment,
                    # installs all packages, creates and initializes a
                    # local MySql database, preloads example AI resources
make run            # runs all docker containers and starts a
                    # local web server http://localhost:9357/
  1. Login at http://localhost:9357/login/ with user admin@smarter.sh and password smarter.

See these onboarding videos:

Key Features

Smarter implements a yaml manifest-based approach to managing AI resources that is inspired by the Kubernetes project.

It provides a unified, declarative way to define, configure, and orchestrate the disparate resources that are required for creating and managing AI resources that integrate to other enterprise resources like REST API's and Sql databases. And it gives prompt engineering teams an intuitive workbench approach to designing, prototyping, testing, deploying and managing powerful AI resources for common corporate use cases including agentic workflows, customer facing chat solutions, and more. It includes a separately managed React-based chat UI that is compatible with a wide variety of front end ecosystems including NPM, Wordpress, Squarespace, Drupal, Office 365, Sharepoint, .Net, Netsuite, salesforce.com, and SAP. There is a Golang command-line interface, and a PyPi package for integrating the API functions into your own Python projects. It is developed to support prompt engineering teams working in large organizations. Accordingly, Smarter provides common enterprise features such as credentials management, team workgroup management, role-based security, accounting cost codes, and logging and audit capabilities.

Smarter provides seamless integration and interoperation between LLMs from DeepSeek, Google AI, Meta AI and OpenAI. It is LLM provider-agnostic, and provides seamless integrations to a continuously evolving list of value added services for security management, prompt content moderation, audit, cost accounting, and workflow management. Smarter is cloud native and runs on Kubernetes, on-site in your data center or in the cloud.

Smarter is cost effective when running at scale. It is extensible and architected on the philosophy of a compact core that does not require customization nor forking. It is horizontally scalable. It is natively multi-tenant, and can be installed alongside your existing systems. ## Quickstart

Smarter Helm Chart

Deploy Smarter API and web console to Kubernetes using the public Helm chart, available at ghcr.io/smarter-sh/charts/smarter or Artifact Hub.

Quick Install

Pull the chart:

helm pull oci://ghcr.io/smarter-sh/charts/smarter --version 0.7.6

Install to Kubernetes:

helm upgrade --install smarter oci://ghcr.io/smarter-sh/charts/smarter \
  --namespace smarter \
  --create-namespace \
  --timeout 900s \
  --values values.yaml

Configuration

See the chart values.yaml for all available parameters, or view the chart README for detailed configuration examples.

Minimum required configuration in your values.yaml:

env:
  MYSQL_HOST: "your-mysql-host"
  MYSQL_DATABASE: "smarter"
  MYSQL_USER: "smarter_user"
  MYSQL_PASSWORD: "your-secure-password"
  OPENAI_API_KEY: "sk-..."
  SECRET_KEY: "your-django-secret-key"

  # Deployment
  DJANGO_SETTINGS_MODULE: "${{ env.DJANGO_SETTINGS_MODULE }}"
  ENVIRONMENT: "${{ inputs.environment }}"
  NAMESPACE: "${{ env.NAMESPACE }}"
  SMARTER_DOCKER_IMAGE: "${{ env.SMARTER_DOCKER_IMAGE }}"

  # AWS
  AWS_REGION: "${{ inputs.aws-region }}"
  AWS_ACCESS_KEY_ID: "${{ inputs.aws-access-key-id }}"
  AWS_SECRET_ACCESS_KEY: "${{ inputs.aws-secret-access-key }}"

  # Security
  FERNET_ENCRYPTION_KEY: "${{ inputs.fernet-encryption-key }}"
  SECRET_KEY: "${{ env.SECRET_KEY }}"

  # AI APIs
  OPENAI_API_KEY: "${{ inputs.openai-api-key }}"
  GOOGLE_MAPS_API_KEY: "${{ inputs.google-maps-api-key }}"
  GEMINI_API_KEY: "${{ inputs.gemini-api-key }}"
  LLAMA_API_KEY: "${{ inputs.llama-api-key }}"

  # Database
  MYSQL_HOST: "${{ env.MYSQL_HOST }}"
  MYSQL_PORT: "${{ env.MYSQL_PORT }}"
  MYSQL_DATABASE: "${{ env.SMARTER_MYSQL_DATABASE }}"
  MYSQL_USER: "${{ env.SMARTER_MYSQL_USERNAME }}"
  MYSQL_PASSWORD: "${{ env.SMARTER_MYSQL_PASSWORD }}"
  MYSQL_ROOT_USERNAME: "${{ env.MYSQL_ROOT_USERNAME }}"
  MYSQL_ROOT_PASSWORD: "${{ env.MYSQL_ROOT_PASSWORD }}"
  SMARTER_MYSQL_TEST_DATABASE_PASSWORD: "${{ inputs.smarter-mysql-test_database_password }}"

  # Admin
  SMARTER_LOGIN_URL: "${{ env.SMARTER_LOGIN_URL }}"
  SMARTER_ADMIN_PASSWORD: "${{ env.SMARTER_ADMIN_PASSWORD }}"
  SMARTER_ADMIN_USERNAME: "${{ env.SMARTER_ADMIN_USERNAME }}"
  SMARTER_ADMIN_EMAIL: "${{ env.SMARTER_ADMIN_EMAIL }}"

  # SMTP
  SMTP_HOST: "${{ env.SMTP_HOST }}"
  SMTP_PORT: "${{ env.SMTP_PORT }}"
  SMTP_USE_SSL: "${{ env.SMTP_USE_SSL }}"
  SMTP_USE_TLS: "${{ env.SMTP_USE_TLS }}"
  SMTP_USERNAME: "${{ env.SMTP_USERNAME }}"
  SMTP_PASSWORD: "${{ env.SMTP_PASSWORD }}"

Documentation

Detailed documentation for this repo is available here: docs.smarter.sh

Support

Please report bugs to the GitHub Issues Page for this project.

Contributing

Please see the CONTRIBUTING.

About

Smarter is an extensible AI resource management system

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 53.4%
  • Python 26.8%
  • CSS 16.7%
  • HTML 2.9%
  • Makefile 0.1%
  • Dockerfile 0.1%