Getting Started

Install Generative Layers from Maven Central and start integrating LLMs into your BDI agents in minutes.

Install

Generative Layers is available on Maven Central. Add it to your project with one dependency.

<dependency>
    <groupId>com.generativelayers</groupId>
    <artifactId>generative-layers-core</artifactId>
    <version></version>
</dependency>
View on Maven Central | Source on GitHub

Prerequisites

Java 17+ JDK 17 or higher required.
API Key From any supported provider — Cerebras, Groq, Gemini, OpenAI, or DeepSeek.
Target Platform ASTRA, Jason, or JaCaMo.

What it looks like

A governed invocation with the canonical lifecycle. See the full lifecycle across all three platforms in the Platform syntax comparison.

// Jason — bind, call, validate, adopt
!start.
+!start
   <- gl.bind("agent1", "gemini", "gemini-2.5-flash", "", Bid);
      gl.call(Bid, "classify", "llm.answer", "ANSWER", "Classify: apple", "label,confidence", "", Rid);
      !decided(Rid).
+!decided(Rid)
   :  gl.candidate(Rid, Cid) & gl.get(Cid, "label", Label)
   <- gl.accept(Cid, "valid classification", _);
      .println("Acceptance recorded: ", Label);
      .stopMAS.
What just happened?
  1. bind — Establishes an isolated connection context between the host agent and the provider.
  2. call — Executes a governed out-of-band invocation, evaluating policies before query dispatch.
  3. candidate — Holds the validated response as quarantined candidate material outside the host agent’s belief base.
  4. get — Projects and extracts specific structured fields from the quarantined candidate.
  5. accept — Records the agent’s final decision to adopt the candidate; inserting accepted material into beliefs remains a separate explicit step.

Next steps

Framework reference
Architecture, core concepts, the 13-command lifecycle, and platform syntax comparison.
Browse full examples
30 complete projects across ASTRA, Jason, and JaCaMo.