> ## Documentation Index
> Fetch the complete documentation index at: https://docs.a1facts.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Follow these steps to get the a1facts Knowledge Graph running on your local machine.

Before you begin, make sure you have the following installed:

* Python 3.13+
* [uv](https://github.com/astral-sh/uv) - An extremely fast Python package installer.
* Optional: A running Neo4j Database instance.

<Steps>
  <Step title="Clone the Repository">
    Open your terminal and run the following commands to clone the repository and navigate into the library directory:

    ```bash theme={null}
    git clone https://github.com/shadi-fsai/a1facts.git
    cd a1facts/lib
    ```
  </Step>

  <Step title="Install Dependencies">
    Next, create a virtual environment and install the required packages.

    **1. Create the virtual environment:**

    ```bash theme={null}
    uv venv
    ```

    **2. Activate the virtual environment:**

    <Tabs>
      <Tab title="Windows">
        ```powershell theme={null}
        .venv\Scripts\activate
        ```
      </Tab>

      <Tab title="macOS/Linux">
        ```bash theme={null}
        source .venv/bin/activate
        ```
      </Tab>
    </Tabs>

    **3. Install dependencies:**

    ```bash theme={null}
    uv pip install -e .
    ```
  </Step>

  <Step title="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:
       ```dotenv .env theme={null}
       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:
       ```dotenv .env theme={null}
       # Log levels: 0 = off, 1 = user, 2 = system/user
       A1FACTS_LOG_LEVEL="1" 
       A1FACTS_LOG_FILE="a1facts.log"
       ```
  </Step>
</Steps>

<Info>
  **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`.
</Info>
