Thanks to visit codestin.com
Credit goes to github.com

Skip to content

EuniAI/Prometheus

Β 
Β 

Repository files navigation

Logo

Prometheus

Contributors Stargazers MIT License
Credits

Code Coverage

Prometheus

Prometheus is a FastAPI-based backend service designed to perform intelligent codebase-level operations, including answering questions, resolving issues, and reviewing pull requests. At its core, it implements a multi-agent approach governed by a state machine to ensure code quality through automated reviews, build verification, and test execution.

πŸš€ Features

  • Codebase Analysis: Answer questions about your codebase and provide insights.
  • Issue Resolution: Automatically resolve issues in your repository.
  • Pull Request Reviews: Perform intelligent reviews of pull requests to ensure code quality.
  • Multi-Agent System: Uses a state machine to coordinate multiple agents for efficient task execution.
  • Integration with External Services: Seamlessly connects with other services in the Pantheon-temple organization.

πŸ“Š Evaluation Results on SWE-bench Lite

SWE-bench Lite Result

Success Rate Comparison across popular agents. Prometheus achieves 28.67%.

βš™οΈ Quick Start

βœ… Prerequisites

  • Docker
  • Docker Compose
  • API keys (e.g. OpenAI, Anthropic, Google Gemini)

πŸ“¦ Setup

  1. Clone the repository:

    git clone https://github.com/Pantheon-temple/Prometheus.git
    cd Prometheus
  2. Copy the example.env file to .env and update it with your API keys and other required configurations:

    mv example.env .env
  3. Start the services using Docker Compose:

    • Linux (includes PostgreSQL):

      docker-compose up --build
    • macOS / Windows:

      ⚠️ docker-compose.win_mac.yml does not include PostgreSQL.If you don't have PostgreSQL on your device, you may have to start the PostgreSQL container manually before starting services by following the "Database Setup" section below.

      docker-compose -f docker-compose.win_mac.yml up --build
  4. Access Prometheus:


πŸ—„οΈ Database Setup

PostgreSQL

⚠️ If you're using docker-compose.win_mac.yml, you may have to manually start PostgreSQL before launching Prometheus:

Run the following command to start a PostgreSQL container:

docker run -d \
  -p 5432:5432 \
  -e POSTGRES_USER=postgres \
  -e POSTGRES_PASSWORD=password \
  -e POSTGRES_DB=postgres \
  postgres

Neo4j

Run the following command to start a Neo4j container:

docker run -d \
  -p 7474:7474 \
  -p 7687:7687 \
  -e NEO4J_AUTH=neo4j/password \
  -e NEO4J_PLUGINS='["apoc"]' \
  -e NEO4J_dbms_memory_heap_initial__size=4G \
  -e NEO4J_dbms_memory_heap_max__size=8G \
  -e NEO4J_dbms_memory_pagecache_size=4G \
  neo4j

Verify Neo4J at: http://localhost:7474


βš™οΈ Configuration

Set the following variables in your .env file:

πŸ”Ή Neo4j

  • PROMETHEUS_NEO4J_URI
  • PROMETHEUS_NEO4J_USERNAME
  • PROMETHEUS_NEO4J_PASSWORD

πŸ”Ή LLM Models

  • PROMETHEUS_ADVANCED_MODEL

  • PROMETHEUS_BASE_MODEL

  • API Keys:

    • PROMETHEUS_OPENAI_FORMAT_API_KEY
    • PROMETHEUS_ANTHROPIC_API_KEY
    • PROMETHEUS_GEMINI_API_KEY
  • Base URL for LLMs:

    • PROMETHEUS_OPENAI_FORMAT_BASE_URL

πŸ”Ή Other Settings

  • PROMETHEUS_WORKING_DIRECTORY
  • PROMETHEUS_GITHUB_ACCESS_TOKEN
  • PROMETHEUS_KNOWLEDGE_GRAPH_MAX_AST_DEPTH
  • PROMETHEUS_NEO4J_BATCH_SIZE
  • PROMETHEUS_POSTGRES_URL

πŸ§ͺ Development

Requirements

  • Python 3.11+

Steps

  1. Install dependencies:

    pip install hatchling
    pip install .
    pip install .[test]
  2. Run tests:

    coverage run --source=prometheus -m pytest -v -s -m "not git"
  3. Generate coverage report:

    coverage report -m
  4. Generate HTML report:

    coverage html
    open htmlcov/index.html
  5. Start dev server:

    uvicorn prometheus.app.main:app --host 0.0.0.0 --port 9002

πŸ“„ License

Licensed under the Apache License 2.0.


πŸ“¬ Contact

For questions or support, please open an issue in the GitHub repository.

About

🧠 Prometheus: A Knowledge-Graph-Driven πŸ€– AI Agent that maps πŸ—Ί, understands 🧩, and repairs πŸ›  complex codebases β€” not by guessing, but by reasoning. ⚑

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages