gneiss
v0.0.2
Published
Distributed, durable agent runtime primitives for long-lived workflows.
Maintainers
Readme
gneiss
gneiss is a distributed, durable agent runtime for long-lived workflows.
The package is intended to provide the core primitives needed to run agents that:
- persist state between invocations
- survive process restarts by swapping in a durable store
- execute work across distributed workers with a shared runtime contract
Current scope
This initial release provides a small runtime surface:
defineAgent(...)to declare an agentcreateRuntime(...)to invoke agents and persist state snapshotscreateMemoryStore()as the default storage adapter for local development
Example
const { createRuntime, defineAgent } = require("gneiss");
const counter = defineAgent({
id: "counter",
initialState: { count: 0 },
async step(input, { state }) {
const count = state.count + (input.increment ?? 1);
return {
output: count,
state: { count }
};
}
});
async function main() {
const runtime = createRuntime();
const result = await runtime.invoke(counter, { increment: 2 });
console.log(result.output); // 2
}
main().catch(console.error);Direction
gneiss is being developed toward a fuller runtime for durable execution, stateful coordination, and distributed agent orchestration.
