Page cover

Local Development Setup

Overview

Local Development Setup

  1. Clone the Repository

    Copy

    bashgit clone https://github.com/username/zyro.git
    cd zyro
  2. Install Dependencies

    Copy

    bashpoetry install --with dev
    poetry shell
  3. Environment Configuration

    Copy

    bashcp example.env .env
    # Edit .env to add your API keys and other config
  4. Run Zyro

    • API Server:

      Copy

      bashuvicorn app.entrypoints.api:app --reload
    • Autonomous Agent Scheduler:

      Copy

      bashpython -m app.entrypoints.autonomous

Configuration Details

Environment Variables

Zyro relies heavily on environment variables to manage both internal settings and external integrations. Some critical variables include:

  • General

    • ENV: Sets the runtime environment (e.g., local, production).

    • DEBUG: Enables debug mode if set to “true”.

  • Database

    • DB_HOST, DB_PORT, DB_USERNAME, DB_PASSWORD, DB_NAME: Standard Postgres parameters.

    • DB_AUTO_MIGRATE: Determines if migrations run automatically.

  • API Keys

    • OPENAI_API_KEY: For text generation and summarization tasks (if using language-based generation).

    • CDP_API_KEY_NAME, CDP_API_KEY_PRIVATE_KEY: For Coinbase Developer Platform (CDP) blockchain integration.

  • Messaging/Alerts

    • TG_TOKEN_GOD_BOT: Telegram bot token.

    • SLACK_ALERT_TOKEN, SLACK_ALERT_CHANNEL: Slack keys for sending notifications.

  • Security

    • Variables for AWS Secrets Manager usage (AWS_SECRET_NAME, etc.) if needed.

Editing .env

  1. Open .env in a text editor.

  2. Populate each variable with the appropriate value.

  3. Confirm that confidential keys are either stored here only for local dev or retrieved securely with AWS Secrets Manager in production contexts.

AWS Secrets Manager

Optionally, you can store secrets like database credentials and API keys in AWS Secrets Manager rather than a local .env file. This can be configured by:

  1. Setting up AWS credentials in your environment (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY).

  2. Specifying the secret names in .env, for example:

    Copy

    bashAWS_SECRET_NAME=zyro_app_secrets
    AWS_DB_SECRET_NAME=zyro_db_secrets
  3. Zyro's config will then fetch these from AWS at startup, caching them for performance.

Last updated