Skip to content

SquireAI/squire-core

Repository files navigation

Squire Core

Overview

Squire Core is a project designed to implement multiple agentic workflows orchestrated by a single agent.

Prerequisites

Install pyenv

  1. Install dependencies:
    • macOS:
brew install openssl readline sqlite3 xz zlib tcl-tk
  • Ubuntu:
sudo apt-get update && sudo apt-get install -y make build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python-openssl git
  1. Install pyenv:

    brew install pyenv
    
  2. Add pyenv to your shell startup script - https://github.com/pyenv/pyenv?tab=readme-ov-file#set-up-your-shell-environment-for-pyenv

  3. Restart your shell:

    • Ex:
    source ~/.zsh_profile
    
  4. Install Python:

    pyenv install 3.10.6
    pyenv global 3.10.6
    

Install Poetry

curl -sSL https://install.python-poetry.org | python3 -

Setup

  1. Clone the repository:

    git clone https://github.com/squireai/squire-core.git
    cd squire-core
    
  2. Install dependencies:

    poetry install
    
  3. Configuring the environment:

    • At runtime the application will attept to decrypt the config that corresponds to your current environment. The environment is determined by the ENVIRONMENT variable.
    • The default environment is development. To set the environment, create a .env file in the project root and add the following:
     ENVIRONMENT=development
    
    • Once you have set the environment ensure you set the correct ejson keys for the environment.
    • Create a file under /opt/ejson/keys the name if the file will be your public key and the content will be the private key.

Running the Project

poe dev

Running Tests

poetry run pytest tests

Pre-commit Hooks

Setup Pre-commit

  1. Install pre-commit:

    pip install pre-commit
    
  2. Install the hooks:

    pre-commit install
    
  3. Run the hooks on all files:

    pre-commit run --all-files
    

Configuration

Environment Variables

Create a .env file in the project root with your environment variables.

Encrypted JSON Configuration (ejson)

Use ejson for encrypted configuration files. Install ejson:

brew install ejson

Encrypt your configuration and save it as config.ejson in the project root.

Encyrpt & Decrypt Development

poetry run ejson-decrypt config/secrets.development.ejson
poetry run ejson-encrypt config/secrets.development.json

Logging and Tracing

Datadog

  1. Run a Datadog agent (example with Docker):

    docker run -d --name datadog-agent \
       -e DD_API_KEY=<YOUR_DD_API_KEY> \
       -e DD_APM_ENABLED=true \
       -e DD_LOGS_ENABLED=true \
       -e DD_DOGSTATSD_NON_LOCAL_TRAFFIC=true \
       -e DD_PROCESS_AGENT_ENABLED=true \
       -e DD_SYSTEM_PROBE_ENABLED=true \
       -p 8126:8126/tcp \
       datadog/agent:latest
    

Running the Application

PYTHONPATH=. poetry run python squire/main.py

Running Tests

poetry run pytest tests

By following these instructions, you should be able to get the Squire Core project up and running from scratch with all necessary tools and configurations in place.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages