Getting started with AIWAF

Source and package versions

One AIWAF repository. Python: py/aiwaf/ · Node.js: js/ · Rust/WASM: rust/ · Java: java/. Source and canonical README. Versions shown describe the source checkout; package releases are independent. Current Python/Node source targets are aiwaf 1.1.8 (Python) and aiwaf 1.1.5 (npm), with Rust/Python 0.2.7 and WASM 0.2.5 and Java 1.3.5. Sandbox guides retain their separately pinned builds.

Build a small protected application, see an enforced request boundary, and then learn how middleware, route policy, state, and training fit together.

Start with a complete application

The first-app tutorial uses Flask so every file and command can be shown in full. It needs Python and a terminal; it does not assume an existing project, Redis service or trained model. Python 1.1.4 installs its required Rust runtime.

  1. Prepare your environment — create a workspace and install the Flask extra.
  2. Create your application — understand app.py, registration, and the generated files.
  3. Discover live routes — use module:object imports and inspect the manifest.
  4. Verify a rate limit — observe three 200 responses and a fourth 429.
  5. Add a route policy — exempt one check on one endpoint.
  6. Inspect logs and plan training — distinguish observations, counters, and models.

Integrate an existing application

Each framework guide identifies its prerequisites, the file to edit, the adapter's registration point, the run command, and what to inspect. Use the guide for your framework rather than translating option names between runtimes.

RuntimeFramework guidesConfiguration surface
PythonFlask, Django, FastAPIFlask app.config; Django settings.py; FastAPI nested options
Node.jsExpress, Fastify, Hapi, Koa, NestJS, Next.js API routes, AdonisJS, SailsAdapter options and normalized aliases
JavaSpring, Jakarta ServletTyped fields, JSON/environment settings, Spring properties
Rust/WASMPrimitive bindingsHost adapter configuration and primitive API arguments

Understand what happens to a request

System architecture follows the adapter, policy selection, deterministic controls, runtime state, response observations, and offline training. Continue with Python, Node, Java, or Rust/WASM internals for implementation boundaries.

Look up a specific task

Choose packages deliberately

Python and npm both use the name aiwaf. The required Rust runtime for Python 1.1.4 is aiwaf-rust; WebAssembly primitives are aiwaf-wasm. Java builds under java/ in the same monorepo. See the source-version matrix and installed package metadata before choosing a release. PHP pages are legacy reference.