A Java framework for building composable, event-driven applications from self-contained functions wired together by YAML-configured event flows.
New here? Getting Started runs a working app in five minutes. Building with an AI agent? Start with the AI Developer Guide.
Prefer Rust? Mercury is also available as an official Rust implementation — the same three layers and the same YAML flow syntax (flow files port unchanged), faithfully following this project's behavior: github.com/Accenture/mercury · documentation.
An application is assembled from independent functions — plain Java classes with no knowledge of one another — that communicate only through events. The flows that sequence them live in YAML, so orchestration is configuration, not code. Everything runs on Java 21 virtual threads, so straightforward blocking code performs like reactive, and each function's immutable input/output makes the design equally friendly to human developers and AI code assistants.
It ascends three layers — adopt only the ones you need:
- Platform Core — an event-driven foundation: functions addressed by route name, exchanging immutable event envelopes over an in-memory event bus.
- Event Script — composable orchestration: a YAML flow sequences functions for a transaction, replacing orchestration code with configuration.
- Active Knowledge Graph — a semantic layer where a knowledge graph is the application.
Three steps: describe the use case as an event flow, configure it in YAML, implement each function. The route name greeting.demo is the only link between the flow and the Java class.
flow:
id: 'greetings'
first.task: 'greeting.demo'
tasks:
- input:
- 'input.path_parameter.user -> user'
process: 'greeting.demo'
output:
- 'text(application/json) -> output.header.content-type'
- 'result -> output.body'
execution: end@PreLoad(route = "greeting.demo", instances = 10)
public class Greetings implements TypedLambdaFunction<Map<String, Object>, Map<String, Object>> {
@Override
public Map<String, Object> handleEvent(Map<String, String> headers, Map<String, Object> input, int instance) {
return Map.of("user", input.get("user"), "message", "Welcome", "time", new Date());
}
}The Getting Started guide walks this end to end — clone, build, and call your first endpoint.
Full documentation: accenture.github.io/mercury-composable. AI agents can use docs/llms.txt as a machine-readable map.
| Start here | Home · Getting Started · AI Developer Guide |
| Layer 1 — Platform Core | Architecture · Methodology · Event-driven Foundation · REST Automation |
| Layer 2 — Event Script | Overview · Syntax · Flow Schema · Build, Test & Deploy |
| Layer 3 — Knowledge Graph | Knowledge Graph as Application |
| Operate & integrate | Observability · Spring Boot · Minimalist Kafka · Sync-over-Async |
| Reference | API Overview · Configuration · Annotations · ADRs |
Contributions are welcome. Please read CONTRIBUTING.md and the CODE_OF_CONDUCT.md before opening a pull request.
Licensed under the Apache License 2.0.