Skip to content

Latest commit

 

History

History
222 lines (165 loc) · 9.39 KB

CONTRIBUTING.md

File metadata and controls

222 lines (165 loc) · 9.39 KB

Contributing to Julep

👋 Welcome! We're excited that you're interested in contributing to Julep. This guide will help you get started.


🚀 Quick Start

  1. Fork the repository
  2. Create a new branch for your changes
  3. Make your changes and test them
  4. Submit a pull request

📝 Ways to Contribute

🐛 Reporting Issues

Found a bug? Have a feature request? Submit an issue with:

  • Steps to reproduce
  • Expected behavior
  • Actual behavior
  • Screenshots (if applicable)

💻 Contributing Code

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/your-feature-name
  3. Make your changes
  4. Write/update tests
  5. Push to your fork
  6. Open a pull request

💡 Tip: Make sure your code follows our style guide and passes all tests.


🏗 Project Architecture

Core Services

Service Description
agents-api Core API service
typespec API specifications
blob-store File storage service
cli Command-line interface
embedding-service Text embedding management
llm-proxy Language model proxy
gateway API gateway & routing
monitoring System metrics & monitoring

Supporting Services

  • integrations-service: External integrations
  • memory-store: Persistent storage
  • scheduler: Task scheduling
  • deploy: Deployment configs
  • documentation: Project docs
  • scripts: Utility scripts
  • cookbooks: Usage examples

Tech Stack

  • FastAPI: Web framework for building APIs
  • TypeSpec: API specification language
  • Timescale: Database system
  • SeadweedFS: Blob storage system
  • Grafana: Monitoring and observability platform
  • Prometheus: Monitoring and observability platform
  • LiteLLM: LLM framework
  • Temporal: Workflow engine
  • Docker: Containerization

To understand the relationships between the components, please refer to the System Architecture section.

Understanding the Codebase

To get a comprehensive understanding of Julep, we recommend exploring the codebase in the following order:

  1. Project Overview

    • Read README.md in the root directory
    • Explore docs/ for detailed documentation
  2. System Architecture

    • Examine docker-compose.yml in the root directory
    • Review deploy/ directory for different deployment configurations
  3. API Specifications

    • Learn about TypeSpec: https://typespec.io/docs/
    • Explore typespec/ directory:
      • Start with common/ folder
      • Review main.tsp
      • Examine each module sequentially
  4. Core API Implementation

    • Learn about FastAPI: https://fastapi.tiangolo.com/
    • Explore agents-api/ directory:
      • Review README.md for an overview
      • Examine routers/ for API endpoints
      • Look into models/ for data models
  5. Database and Storage

  6. Workflow Management

  7. Testing

    • Examine agents-api/tests/ for test cases
  8. Additional Services

    • Explore other service directories (integrations-service/, embedding-service/, etc.) to understand their specific roles and implementations

Contributing Guidelines

  1. Set Up Development Environment

    • Clone the repository
    • Install Docker and Docker Compose
    • Set up necessary API keys and environment variables

    You can check our Local Setup section in the docs for more information.

  2. Choose an Area to Contribute

    • Check the issue tracker for open issues
    • Look for "good first issue" labels for newcomers
  3. Make Changes

    • Create a new branch for your changes
    • Write clean, well-documented code
    • Ensure your changes adhere to the project's coding standards
  4. Test Your Changes

    • Run existing tests
    • Add new tests for new functionality
    • Ensure all tests pass before submitting your changes
  5. Submit a Pull Request

    • Provide a clear description of your changes
    • Reference any related issues
    • Be prepared to respond to feedback and make adjustments
  6. Code Review

    • Address any comments or suggestions from reviewers
    • Make necessary changes and push updates to your branch
  7. Merge

    • Once approved, your changes will be merged into the main branch

Adding a New Integration

The integration service is a crucial part of Julep, and we welcome contributions from the community to enhance its functionality and capabilities.

To contribute to the integration service, you can follow these steps:

  1. Add a new integration provider to our TypeSpec: You can do so by:

    1. Adding the provider name to the integrationProvider alias in typespec/tools/models.tsp

    2. Adding a new file in typespec/tools/ with the provider name. Take a look at the other integration files in the typespec/tools/ directory for examples.

      If the integration needs an API key or other form of authentication, you would have to add a Setup model to the integration definition file, where you would define the authentication parameters (spider.tsp is an example of this). Otherwise, you can omit the Setup model (wikipedia.tsp is an example of this).

  2. Generate the new OpenAPI schema and Pydantic models: You need to cd into the root directory of the project and run ./scripts/generate_openapi_code.sh to generate the new OpenAPI schema along with Pydantic models for the new changes.

    The new OpenAPI schema will be generated in ./openapi.yaml and the Pydantic models will be generated in ./integrations-service/integrations/autogen.

  3. Add the new integration logic in the integration service: You need to add the new integration logic in the integration service by adding a new file in integration-service/integrations/utils/integrations with the provider name. Take a look at the other integration files in the same directory for examples.

  4. Add the new integration provider to the providers registry: You need to add the new integration provider to the providers registry by adding a new entry to the available_providers dictionary in integrations-service/integrations/providers.py.

Documentation Improvements

Improvements to documentation are always appreciated! If you see areas that could be clarified or expanded, feel free to make the changes and submit a pull request.

Sharing Feedback and Ideas

We'd love to hear your feedback and ideas for the project! Feel free to submit an issue or contact the maintainers directly to share your thoughts. Your input is very valuable in shaping the future direction of the project.

Remember, contributions aren't limited to code. Documentation improvements, bug reports, and feature suggestions are also valuable contributions to the project.