Capstead 0.3.1 — durable execution recorder
Capstead turns ordinary Spring Boot methods into governed, versioned, observable business capabilities — the governance layer around Spring AI / LangChain4j, not another AI framework.
Spring AI tells you about a model call. Capstead tells you about the business capability.
0.3.x — the durable execution recorder
@Capability is no longer just static metadata. Capstead now records every execution over time:
- Per-model invocations — a capability that calls the model several times (retries, multi-step, fan-out) captures each call, so token usage and cost are attributed per model, not just per capability.
- Parent-child execution trees — nested
@Capabilitycalls are linked automatically;GET /actuator/capabilityexecutions/{id}returns the tree. - Durable, cross-instance persistence — add
capstead-jdbcto persist executions to your database (PostgreSQL, MySQL, H2). Scorecards and history survive restarts and aggregate across instances. Capstead creates and owns its tables. - Recording modes —
capstead.executions.recording-mode: best-effort | sync | async(recording never fails your business call). - Privacy by default — inputs/outputs are not stored unless you opt in; pluggable
CapabilityDataRedactor+CapabilityPrincipalProvider. - New endpoint —
GET /actuator/capabilityexecutions(+/{id}for the tree).
Capabilities can be declared by annotation or YAML config (capstead.capabilities), and the two styles coexist.
Install
<dependency>
<groupId>io.capstead</groupId>
<artifactId>capstead-starter</artifactId>
<version>0.3.1</version>
</dependency>Notes
- Use
0.3.1. It supersedes0.3.0, which had a serialization bug that returned HTTP 500 from/actuator/capabilityexecutionsand/actuator/capabilityscorecard/{name}once they held data. 0.3.1adds MySQL support tocapstead-jdbc(vendor-aware schema).
Try it: a clone-and-run demo lives in samples/. Capstead runs in production at engineerprep.io.
All eight modules — capstead-annotations, capstead-core, capstead-runtime, capstead-starter, capstead-spring-ai, capstead-mcp, capstead-mcp-server, capstead-jdbc — are published as io.capstead:*:0.3.1 on Maven Central.