JVM-native runtime
jamjet-runtime-java, the JVM-native agent runtime. Checkpointed steps, native MCP, Spring Boot starter.
jamjet-runtime-java is the JVM-native agent runtime. Its runtime modules are on Maven Central (0.4.0) and run agents directly on the JVM, with no Rust runtime, REST sidecar or gRPC bridge.
Use this when:
- Your application is Spring Boot, Quarkus, plain Java, or Kotlin.
- You want checkpointed agent steps without a sidecar process.
- You're targeting Java 21+ and want virtual threads, not green threads.
Use the Java SDK instead if you want to author agents in Java that compile to the shared IR and run on the JamJet engine.
Install
Requires Java 21+.
Spring Boot (recommended)
<dependency>
<groupId>dev.jamjet</groupId>
<artifactId>jamjet-runtime-spring-boot-starter</artifactId>
<version>0.4.0</version>
</dependency>The artifact is jamjet-runtime-spring-boot-starter. jamjet-spring-boot-starter is a different starter that records Spring AI calls on the JamJet runtime (see Spring Boot).
Auto-registers DurableAgentBeanPostProcessor. Minimal application.yml:
jamjet:
storage: in-memoryPlain Java (no Spring)
<dependency>
<groupId>dev.jamjet</groupId>
<artifactId>jamjet-runtime-core</artifactId>
<version>0.4.0</version>
</dependency>
<dependency>
<groupId>dev.jamjet</groupId>
<artifactId>jamjet-runtime-instrument</artifactId>
<version>0.4.0</version>
</dependency>Authoring a durable agent
Annotate the class with @DurableAgent, the methods with @Checkpoint, and wrap side-effecting work in DurabilityContext.replayOrExecute:
import dev.jamjet.runtime.instrument.DurabilityContext;
import dev.jamjet.runtime.instrument.annotations.Checkpoint;
import dev.jamjet.runtime.instrument.annotations.DurableAgent;
@DurableAgent("research-pipeline")
public class ResearchAgent {
@Checkpoint("search")
public String search(String topic) {
return DurabilityContext.current().replayOrExecute("search", () -> callSearchApi(topic));
}
@Checkpoint("analyze")
public String analyze(String sources) {
return DurabilityContext.current().replayOrExecute("analyze", () -> callModel(sources));
}
private String callSearchApi(String topic) {
return "sources for " + topic; // your search client here
}
private String callModel(String sources) {
return "analysis of " + sources; // your LLM call here
}
}replayOrExecute records each step's result under its checkpoint id. When the context is in replay mode, a step that already has a recorded result returns it without running again, and only the remaining steps execute. Checkpoints are kept in memory. To resume after a process restart, persist the recorded results and load them into a new DurabilityContext in replay mode, as the crash-recovery example does.
DurabilityContext.current() returns null until you bind a context: create one with DurabilityContext.create() and call DurabilityContext.setCurrent(ctx) on the thread that runs the agent. Neither starter does this for you. Run without the -javaagent flag: in 0.4.0 the agent's @Checkpoint advice throws IllegalAccessError for classes outside the library's own package, and the explicit replayOrExecute calls above do not need it.
Spring Boot integration
Adding @Service (or any Spring stereotype) on top of @DurableAgent registers the agent as a normal Spring bean. The DurableAgentBeanPostProcessor discovers it at startup:
@DurableAgent("research-pipeline")
@Service
public class ResearchAgent {
// …
}Inject it the way you'd inject any Spring service.
Modules
| Module | Purpose |
|---|---|
jamjet-runtime-core | Scheduler, work item leasing, execution state |
jamjet-runtime-instrument | @DurableAgent, @Checkpoint, DurabilityContext |
jamjet-runtime-protocols | MCP server + client + tool executor |
jamjet-runtime-plugins | Plugin SPI for runtime extensions |
jamjet-runtime-server | HTTP server for inspection + control |
jamjet-runtime-spring-boot-starter | Spring Boot auto-config |
jamjet-cloud-sdk | AgentBoundary v0.1 receipt types + cloud client |
jamjet-cloud-spring-boot-starter | Spring Boot wiring for the cloud SDK |
MCP protocols
jamjet-runtime-protocols ships native MCP server and client adapters. Tools defined on the runtime are exposed as MCP tools without writing protocol glue; remote MCP servers can be added as callable tools the same way.
AgentBoundary receipts
Emit Action Receipts by pairing jamjet-cloud-sdk with the runtime. Receipts conform to the open AgentBoundary v0.1 spec and validate against the canonical JSON Schema.
Examples
Four runnable examples ship in the repo:
- crash-recovery: run two steps, exit, then load the saved checkpoints in a new process and run only the last step.
- real-agent: OpenAI-backed agent with checkpointed steps.
- spring-boot-comparison: manual durability next to
@DurableAgent. - latency-comparison: measures the overhead of the durability layer.
Browse them at jamjet-runtime-java/examples.
Storage backends
0.4.0 supports an in-memory store (jamjet.storage: in-memory, the only supported value), suitable for single-process deployments and development.
Reference
- GitHub: jamjet-labs/jamjet-runtime-java
- Maven Central: dev.jamjet namespace
- Public landing: jamjet.dev/runtime