Before you begin, make sure you have the following installed:
  • Python 3.13+
  • uv - An extremely fast Python package installer.
  • Optional: A running Neo4j Database instance.
1

Clone the Repository

Open your terminal and run the following commands to clone the repository and navigate into the library directory:
git clone https://github.com/shadi-fsai/a1facts.git
cd a1facts/lib
2

Install Dependencies

Next, create a virtual environment and install the required packages.1. Create the virtual environment:
uv venv
2. Activate the virtual environment:
.venv\Scripts\activate
3. Install dependencies:
uv pip install -e .
3

Configure Your Environment

You’ll need to provide credentials to connect to your Neo4j database and other services.
  1. Create a .env file in the a1facts/lib directory.
  2. Add your API keys and, optionally, your Neo4j credentials to the file:
    .env
    OPENAI_API_KEY="your_openai_api_key"
    EXA_API_KEY="your_exa_api_key"
    
    # Optional: Add if you want to use Neo4j
    NEO4J_URI="bolt://localhost:7687"
    NEO4J_AUTH="your_neo4j_password"
    
  3. (Optional) Configure logging by adding the following environment variables:
    .env
    # Log levels: 0 = off, 1 = user, 2 = system/user
    A1FACTS_LOG_LEVEL="1" 
    A1FACTS_LOG_FILE="a1facts.log"
    
Privacy Notice: We collect minimal usage statistics (number of times the library is run) to help improve the project. You can opt-out by setting the environment variable A1FACTS_TELEMETRY_DISABLED=1.