> For the complete documentation index, see [llms.txt](https://wiki.brain4j.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.brain4j.org/get-started/installation.md).

# Installation

This page shows how to add Brain4J to your project.

Latest snapshot: [![Snapshot](https://img.shields.io/badge/dynamic/xml?url=https%3A%2F%2Frepo.brain4j.org%2Fsnapshots%2Forg%2Fbrain4j%2Fbrain4j-core%2Fmaven-metadata.xml\&query=%2Fmetadata%2Fversioning%2Flatest\&label=snapshot\&color=blue)](https://repo.brain4j.org/snapshots/org/brain4j/brain4j-core)

### Prerequisites

1. Basic **machine learning** knowledge;
2. Java **22** or later;
3. Gradle or Maven.

### Using Gradle (Groovy)

Add this block to your `build.gradle`:

```groovy
repositories {
    mavenCentral()
    maven { url "https://repo.brain4j.org/releases" }
    maven { url "https://repo.brain4j.org/snapshots" }
}

dependencies {
    implementation "org.brain4j:brain4j-core:$VERSION"
    implementation "org.brain4j:brain4j-math:$VERSION"
}
```

Replace `$VERSION` with the latest version.

### Using Maven

Add this block to your `pom.xml`:

```xml
<repositories>
    <repository>
        <id>brain4j-releases</id>
        <url>https://repo.brain4j.org/releases</url>
    </repository>
    <repository>
        <id>brain4j-snapshots</id>
        <url>https://repo.brain4j.org/snapshots</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>org.brain4j</groupId>
        <artifactId>brain4j-core</artifactId>
        <version>$VERSION</version>
    </dependency>
    <dependency>
        <groupId>org.brain4j</groupId>
        <artifactId>brain4j-math</artifactId>
        <version>$VERSION</version>
    </dependency>
</dependencies>
```

Replace `$VERSION` with the latest version.
