Skip to content
/ daiv Public

AI-driven tool for automating development tasks and improving workflows.

License

Notifications You must be signed in to change notification settings

srtab/daiv

Repository files navigation

DAIV: Development AI Assistant

Python Version GitHub License Actions Status

DAIV is an open-source automation assistant designed to enhance developer productivity. It integrates seamlessly with GitLab repositories to streamline your development process. It uses AI agents and configurable actions to automate common software development tasks such as:

  • Issue Addressing: Planning and executing solutions directly from issue titles and descriptions.
  • Code Review Assistance: Automatically responding to reviewer comments, adjusting code, and improving pull requests.
  • Pipeline Failures: Monitoring CI/CD logs and applying fixes automatically when a pipeline fails.
  • Codebase Chat: A ChatGPT-like experience to chat with your codebase and get answers.

[!WARNING] > Note: DAIV is currently in a beta stage. It is not recommended for production use at this time. Bugs or performance issues are expected, and contributions are welcome!

Key Features

  • 🚀 Automated Issue Resolution: When an issue is created in your repository, DAIV can parse the description, propose a step-by-step plan, and, after human approval, execute code changes and open a merge request for you to review.
  • 💬 Code Review Addressor: Assists with code review comments by providing context-aware answers or directly applying requested changes. This reduces the overhead of going back and forth on merge requests.
  • 🔧 Pipeline Fixing: Identifies failing pipeline jobs, analyzes logs, and attempts auto-remediations (e.g., lint fixes and unit tests) to get the CI/CD pipeline back to green.
  • 🧠 Codebase Chat: Chat with your codebase for context-aware answers. An OpenAI-compatible API is available for easy integration with tools such as Open-WebUI.
  • ⚙️ Configurable Behavior: A .daiv.yml file in your repo's default branch lets you tailor DAIV's features (like toggling auto-issue addressing or pipeline autofix).

Technology Stack

  • Backend Framework: Django for building robust APIs and managing database models.
  • Async Tasks: Celery with Redis, orchestrating indexing, processing merges, and applying code changes in the background.
  • LLM Frameworks: LangChain and LangGraph, integrating various LLM agents for intent understanding, query transformation, and natural language reasoning about code changes.
  • Search Engines:
    • Semantic: PGVector (PostgreSQL extension) for embedding-based semantic retrieval.
    • Lexical: Tantivy for keyword-driven code search.
  • Code Executor: Tools and managers for fetching files from GitLab, applying code changes via merge requests, and running code in a secure sandbox.
  • Observability: Langsmith for tracing and monitoring all the interactions between DAIV and your codebase.
  • AI Providers: OpenAI, Anthropic, and Gemini are the supported LLM providers.

Getting Started

Prerequisites

  • Docker & Docker Compose

Local Development Setup

  1. Clone the repository:

    git clone https://github.com/srtab/daiv.git
    cd daiv
  2. Configure Environment: Copy docker/local/app/config.secrets.example.env to docker/local/app/config.secrets.env and update it with your GitLab token, OpenAI API Key, Anthropic API Key, Gemini API Key, and LangSmith API Key.

    cp docker/local/app/config.secrets.example.env docker/local/app/config.secrets.env
  3. Install Dependencies (optional): We use uv to manage dependencies on DAIV.

    uv sync

    [!NOTE] This will install the project dependencies into a virtual environment. Useful for running linting outside of Docker or enabling autocompletion in VSCode.

  4. Start the Server:

    docker compose up --build

    This will start all needed services locally. You can access them at:

  5. Run the tests (optional): DAIV includes a comprehensive test suite. To run tests with coverage:

    $ docker compose exec -it app bash
    $ make test
  6. Run linting (optional): To ensure code quality:

    $ docker compose exec -it app bash
    $ make lint      # to check for linting issues
    $ make lint-fix  # to automatically fix linting errors

Contributing

We welcome contributions! Whether you want to fix a bug, add a new feature, or improve documentation, please refer to the CONTRIBUTING.md file for more information.

License

This project is licensed under the Apache 2.0 License.

Support & Community

For questions or support, please open an issue in the GitHub repository. Contributions, suggestions, and feedback are greatly appreciated!

Happy Coding!