Installation

Installation

Core Features

To get started with SymbolicAI, you can install it using pip:

pip install symbolicai

Alternatively, clone the repository and set up a Python virtual environment using uv:

git clone git@github.com:ExtensityAI/symbolicai.git
cd symbolicai
uv sync --python x.xx
source ./.venv/bin/activate

Running symconfig will now use this Python environment.

Optional Features

SymbolicAI uses multiple engines to process text, speech and images. We also include search engine access to retrieve information from the web. To use all of them, you will need to also install the following dependencies and assign the API keys to the respective engines. E.g.:

pip install "symbolicai[hf]",
pip install "symbolicai[llamacpp]",
pip install "symbolicai[bitsandbytes]",
pip install "symbolicai[wolframalpha]",
pip install "symbolicai[whisper]",
pip install "symbolicai[scrape]",
pip install "symbolicai[serpapi]",
pip install "symbolicai[services]",
pip install "symbolicai[solver]"

Or, install all optional dependencies at once:

To install dependencies exactly as locked in the provided lock file:

To install optional extras via uv:

❗️NOTE❗️Please note that some of these optional dependencies may require additional installation steps. Additionally, some are only experimentally supported now and may not work as expected. If a feature is extremely important to you, please consider contributing to the project or reaching out to us.

Configuration Management

SymbolicAI now features a configuration management system with priority-based loading. The configuration system looks for settings in three different locations, in order of priority:

  1. Debug Mode (Current Working Directory)

    • Highest priority

    • Only applies to symai.config.json

    • Useful for development and testing

  2. Environment-Specific Config (Python Environment)

    • Second priority

    • Located in {python_env}/.symai/

    • Ideal for project-specific settings

  3. Global Config (Home Directory)

    • Lowest priority

    • Located in ~/.symai/

    • Default fallback for all settings

Configuration Files

The system manages three main configuration files:

  • symai.config.json: Main SymbolicAI configuration

  • symsh.config.json: Shell configuration

  • symserver.config.json: Server configuration

Viewing Your Configuration

Before using the symai, we recommend inspecting your current configuration setup using the command below. It will start the initial packages caching and initializing the symbolicai configuration files.

You then must edit the symai.config.json file. A neurosymbolic engine is required to use the symai package. Read more about how to use a neuro-symbolic engine herearrow-up-right.

This command will show:

  • All configuration locations

  • Active configuration paths

  • Current settings (with sensitive data truncated)

Configuration Priority Example

If a configuration file exists in multiple locations, the system will use the highest-priority version. If the environment-specific configuration is missing or invalid, the system will automatically fall back to the global configuration in the home directory.

Best Practices

  • Use the global config (~/.symai/) for your default settings

  • Use environment-specific configs for project-specific settings

  • Use debug mode (current directory) for development and testing

  • Run symconfig to inspect your current configuration setup

Configuration File

You can specify engine properties in a symai.config.json file in your project path. This will replace the environment variables. Example of a configuration file with all engines enabled:

With these steps completed, you should be ready to start using SymbolicAI in your projects.

❗️NOTE❗️By default, the user warnings are enabled. To disable them, export SYMAI_WARNINGS=0 in your environment variables.

Running tests

Some examples of running tests locally:

Be sure to have your configuration set up correctly before running the tests. You can also run the tests with coverage to see how much of the code is covered by tests:

Last updated