Graal Script Agent is an early-preview Java library for adding prompt-authored extensions to Java applications. Developers define where an application can be extended; users prompt for the behavior they need.
Unlike a regular coding agent, it produces reusable JavaScript or Python extensions rather than modifying a source repository. It is designed for bounded application behaviors such as searches, reports, routing rules, validation, and previewable workflows.
The application defines a Java interface describing an extension point and the data and operations available to it. Given a user’s prompt, ScriptAgent guides a language model to implement that contract and returns a typed Script<T> that the application can inspect, store, and reuse.
The application binds the script to its own sandboxed GraalVM context and invokes it through the same Java interface. Execution is local and requires no further model call.
Graal Script Agent artifacts are available from Maven Central. See the latest Getting Started guide for Maven and Gradle dependency setup, including model adapters and guest-language runtimes.
- Getting Started
- User manual
- API reference
- Complete example
- Release announcement: When prompts become plugins
We welcome your code contributions. To get started, you will need to sign the Oracle Contributor Agreement (OCA). Only pull requests from committers that can be verified as having signed the OCA can be accepted.