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>
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?
- bind — Establishes an isolated connection context between the host agent and the provider.
- call — Executes a governed out-of-band invocation, evaluating policies before query dispatch.
- candidate — Holds the validated response as quarantined candidate material outside the host agent’s belief base.
- get — Projects and extracts specific structured fields from the quarantined candidate.
- accept — Records the agent’s final decision to adopt the candidate; inserting accepted material into beliefs remains a separate explicit step.