Skip to content

Releases

Graphrt 0.6.2

Choose a tag to compare

@BimaPangestu28 BimaPangestu28 released this 24 Nov 11:51
9f1c970

WebAssembly plugins can now send and receive binary HTTP bodies (body_base64, "response_encoding": "base64"). This unblocks the supabase WebAssembly build's upload_object, so graphrt-plugins now ships WebAssembly builds of every supabase agent tool and, on its new declarative rest-kit runtime, of open-meteo, currency-rates, wikipedia and web-search. Those builds start several times faster and use a fraction of the memory of the Node.js plugins (numbers below). One Rust API change for embedders: graphrt-wasm's request and response bodies are now bytes, while plugins and the CLI are unaffected.

Added

  • WebAssembly plugins can send and receive binary HTTP bodies: graphrt::http takes body_base64 and, with "response_encoding": "base64", answers with body_base64 (guest SDK: HttpRequest::body_base64, HttpRequest::response_encoding, HttpResponse::body_base64).
    • Text bodies work as before.
    • Used by the supabase WebAssembly build's upload_object.
  • Measured in graphrt-plugins against the Node.js plugins (Linux aarch64, 4-vCPU VM, mock upstream, min-size musl build):
    • A cold graphrt run of supabase select_rows takes 23.5 instead of 116.6 ms (p50), and serve plus plugin hold 10.2 instead of 129.3 MiB after the runs.
    • open-meteo, currency-rates and web-search run cold in 16.3–18.1 instead of 102.9–106.3 ms (p50, as workflow nodes) and hold 9.3–10.1 instead of 112.2–126.4 MiB.
    • A warm call is 1–3 ms slower than on Node.js (a fresh module instance per call).

Changed

  • graphrt-wasm: HttpRequest::body is Option<Vec<u8>> and HttpResponse::body is Vec<u8>, so an embedder's HttpEgress passes bytes and no longer checks UTF-8 (the host does, for guests that ask for text).

Install

# agent build (run, serve, eval)
curl -fsSL https://github.com/Graphrt/graphrt/releases/download/v0.6.2/install.sh | sh
# gateway build (the same CLI plus `graphrt gateway` and `graphrt deploy`, every provider)
curl -fsSL https://github.com/Graphrt/graphrt/releases/download/v0.6.2/install.sh | sh -s -- --gateway
brew install graphrt/graphrt/graphrt
cargo install graphrt-cli                          # add --features gateway-all for the gateway
docker pull ghcr.io/bimapangestu28/graphrt:0.6.2

The container image of this release was published at ghcr.io/bimapangestu28/graphrt and stays there. Starting with the next release, images are published at ghcr.io/graphrt/graphrt.

  • Assets: graphrt-<target> is the agent build. graphrt-gateway-<target> (features gateway-all,eval,online-eval, with mimalloc) is the gateway build for Linux (static musl, x86_64 and aarch64) and macOS (x86_64 and aarch64). The gateway is Unix-only, so there is no Windows gateway archive.
  • Gateway providers: Kubernetes is measured on a local kind cluster. Cloud Run, ECS Fargate, Lambda, Fly and Azure Container Apps are tested against API fakes (conformance suite). Real cloud verification is pending.
  • Windows (experimental): cross-compiled (MSVC, static C runtime), not yet run on Windows.

Full changelog: CHANGELOG.md · v0.6.1...v0.6.2

Graphrt 0.6.1

Choose a tag to compare

@BimaPangestu28 BimaPangestu28 released this 24 Nov 04:51
0bc2180

WebAssembly plugins can now offer tools to the agent node and make outbound HTTP requests through the same SSRF safe egress as http-request (additions to plugin ABI version 1). The supabase user_rpc tool of graphrt-plugins needs this release, and against the Node.js plugin it cuts a cold graphrt run from 118.8 to 18.4 ms p50. graphrt gateway now holds 1,000 concurrent SSE streams in ~45 MiB instead of ~76 MiB, and child processes no longer inherit an AppImage's environment. No breaking changes.

Added

  • WebAssembly plugins can offer agent tools and make outbound HTTP requests.
    • A module lists tools in its manifest and exports graphrt_tool_call.
    • The agent's per-call tool_context (e.g. an end user's JWT) reaches it only when the plugin has permissions.secrets and is trusted, and the host scrubs context values from tool results and errors.
    • graphrt::http (plugins with permissions.network, builds with http) goes through the same SSRF-safe egress as http-request: public addresses unless --allow-private-network, no redirects, host-owned framing headers, at most 16 requests per call, a 30 s timeout cap and body caps (new WasmLimits fields).
    • permissions.env variables are handed to the guest as env.
    • The Rust guest SDK gains Manifest::tool, Plugin::call_tool, export_plugin!(P, tools) and http().
    • From Rust: WasmPlugin::load_with_host(.., WasmHost), WasmPlugin::tools(), the HttpEgress trait.
    • Additions to ABI version 1.
    • docs/wasm-plugins.md.
    • Cost: +57.7 KiB (aarch64 musl serve,llm,wasm,trust-gateway).
    • The pilot port, the supabase user_rpc tool in graphrt-plugins wasm/supabase-rpc, cuts a cold graphrt run from 118.8 to 18.4 ms p50 and the agent's RSS after runs from 127.0 to 9.2 MiB against the Node.js plugin (Linux aarch64).
  • Optional profile in bench/budgets.toml: agent-slim-wasm, agent-slim-gateway-wasm, agent-slim-gateway-wasm-net (wasm +848.9 KiB, +http +1022.6 KiB on aarch64 musl), gated with scripts/budget-gate.py --optional (bench/targets.sh passes it).
    • bench/wasm-plugin/supabase_tool.py compares a Node.js and a WebAssembly plugin through a real agent.
  • examples/supabase-chatbot/tests take SERVE_EXTRA_ARGS (e.g. --allow-private-network for the WebAssembly plugin). Both tests pass with it.

Changed

  • graphrt gateway holds 1,000 concurrent SSE streams in ~45 MiB instead of ~76 MiB (Linux aarch64, peak RSS, plan §4.2 target 64 MiB, now the gate of bench/budgets.toml).
    • Run streams from Unix-socket and http:// agents go through a lean HTTP/1.1 client (graphrt_gateway::stream_conn, httparse only, already in the tree): one 2 KiB adaptive read buffer per stream instead of ~34 KiB of hyper and reqwest state (read, write and head buffers, the dispatch channel), agent frames parsed straight out of it, keep-alive reuse of finished streams' connections.
    • The per-run supervisor future is 3.5 KiB instead of 7.9 KiB (no doubly stored async fn arguments).
    • Warm TTFB overhead is unchanged or lower (Unix socket p50 0.247 vs 0.257 ms, loopback TCP p95 0.29 ms for both), gateway CPU per streamed chunk 8–10 % lower.
    • Binary +18 KiB (gateway-core, aarch64, +28 KiB on x86_64, 7.98 of 8 MiB).
    • https:// agents and the control calls keep using reqwest.

Fixed

  • --plugins <dir> pointing at a WebAssembly plugin's own directory no longer also loads its .wasm as a bare module (which lost the manifest's permissions).
  • Programs graphrt starts no longer get an AppImage's environment.
    • An application packaged as a Linux AppImage (e.g. the Graphrt desktop app) runs with the bundle's folders in front of LD_LIBRARY_PATH, PATH, PYTHONPATH, … and PYTHONHOME, GTK_PATH, … pointing into it.
    • Plugin processes and stdio MCP servers (inherit_env: true, and the PATH / HOME … of the minimal environment), the kill of a plugin's process group and git clone of install_from_git inherited them, so the computer's own programs loaded the bundle's older libraries and failed (libsystemd.so.0: version `LIBSYSTEMD_254' not found).
    • When the running binary is inside $APPDIR, every entry inside it is dropped for children.
    • Elsewhere nothing changes.
    • New in graphrt_core::child_env: apply_host_env, set_child_env, host_var, host_vars, host_env_fixes and the *_with / apply_env_fixes variants taking explicit fixes.

Install

# agent build (run, serve, eval)
curl -fsSL https://github.com/Graphrt/graphrt/releases/download/v0.6.1/install.sh | sh
# gateway build (the same CLI plus `graphrt gateway` and `graphrt deploy`, every provider)
curl -fsSL https://github.com/Graphrt/graphrt/releases/download/v0.6.1/install.sh | sh -s -- --gateway
brew install graphrt/graphrt/graphrt
cargo install graphrt-cli                          # add --features gateway-all for the gateway
docker pull ghcr.io/bimapangestu28/graphrt:0.6.1

The container image of this release was published at ghcr.io/bimapangestu28/graphrt and stays there. Starting with the next release, images are published at ghcr.io/graphrt/graphrt.

  • Assets: graphrt-<target> is the agent build. graphrt-gateway-<target> (features gateway-all,eval,online-eval, with mimalloc) is the gateway build for Linux (static musl, x86_64 and aarch64) and macOS (x86_64 and aarch64). The gateway is Unix-only, so there is no Windows gateway archive.
  • Gateway providers: Kubernetes is measured on a local kind cluster. Cloud Run, ECS Fargate, Lambda, Fly and Azure Container Apps are tested against API fakes (conformance suite). Real cloud verification is pending.
  • Windows (experimental): cross-compiled (MSVC, static C runtime), not yet run on Windows.

Full changelog: CHANGELOG.md · v0.6.0...v0.6.1

Graphrt 0.6.0

Choose a tag to compare

@BimaPangestu28 BimaPangestu28 released this 24 Nov 02:49

Plugin cold starts get faster: graphrt serve can keep a warm pool of plugin processes (--plugin-pool, --plugin-idle), the gateway sends warm hints, and the WebAssembly cold start path is quicker. graphrt deploy --target fly --direct (preview) puts one agent online on Fly.io with no gateway. This release also adds the Linux budget checks of the gateway plan (bench/targets.sh) with the fixes they found, and fixes a crash on crafted redirects (RUSTSEC-2026-0592). No breaking changes.

Added

  • graphrt deploy --target fly --direct (preview, in the default build: feature deploy-fly): puts one agent online at https://<app>.fly.dev with no gateway.
    • Creates the Fly app and its public IPs, writes --secret NAME values and a generated API key as Fly secrets (the key is printed once), and runs the published graphrt image with the .grt bundle or workflow file delivered in the Machine's config.files, a /readyz readiness check and always-on or scale-to-zero (Fly proxy autostop) mode.
    • A version becomes current only once healthy.
    • Older versions stay as stopped standby Machines without services.
    • graphrt deploy status | list-versions | rollback <v> | pause | resume | remove --direct manage it.
    • --json prints JSON Lines (step events, then one result or error) specified by docs/schemas/deploy-direct.schema.json.
    • See docs/deploy-direct.md.
    • status reports status (online/paused/deploying/failed/offline), current_version, last_deployed_at and the Machines.
    • list-versions reports versions[{label, deployed_at, current, …}].
    • A deploy that fails after storing a new API key prints it once in a {"type":"api_key"} line before the error, never in the error line.
    • Tested against a fake Machines API, not yet on real Fly.
  • graphrt-provider-fly: direct feature (FlyDirect), Machines API calls for machine update, metadata, IP assignments and app deletion, and the fake Machines API as the fake feature for tests of other crates.
  • graphrt serve --plugin-pool <n> keeps n processes of each process plugin (up to 32) started from startup and replaces one that exits in the background, so no run on a running agent waits for a plugin to start (a Node.js host takes ~50 ms)
    • Requests spread over the processes, and a timeout restarts only the process that served it.
    • --plugin-idle <d> stops an idle pool's processes (agent + Node.js plugin 73.5 MiB -> 5.9 MiB) until the next request or warm hint.
    • Default 0: unchanged (one process, started at its first node).
    • From Rust: PluginHost::with_pool(PoolConfig), ProcessPool, PluginHost::warm_plugins().
    • Measured on Linux aarch64: a run on a warm pool p95 3.9 ms, 300 ms after a warm hint p95 10.5 ms, vs. 96 ms when the run has to start Node.js after an idle stop.
    • Agent serve,llm,plugins,trust-gateway +27.1 KiB (aarch64 musl).
    • The cold wake of a new agent is unchanged (Node.js's own start, ~51 ms, is its floor)
    • See docs/plugins.md for that limit and docs/wasm-plugins.md for the WebAssembly path (cold wake p95 15 ms).
  • Agent POST /internal/v1/warm (warm hint). The gateway sends it to the replicas a prewarm (POST …/warm, cron, predictive) finds already up (gateway core +3.1 KiB). hello's warm_plugins now lists the plugins whose process is up instead of every loaded plugin.
  • bench/gateway/gwbench.py scenarios plugin-pool (RSS per pool size, warm, cold and hinted runs, gated: p95 ≤ 15 ms) and wake-wasm (cold wake with the WebAssembly example plugin, reference). bench/targets.sh builds the serve,llm,wasm,trust-gateway agent for it.
  • bench/targets.sh checks every measurable target of the gateway plan on Linux against bench/budgets.toml and exits 1 on a miss: sizes and idle RSS of the agent and gateway builds (budget-gate.py now runs graphrt gateway too), gateway TTFB overhead over a Unix socket and loopback TCP, 1,000 concurrent SSE streams, cold wake with and without a Node.js plugin, webhook ack, cron lag (bench/gateway/gwbench.py), an RS256 JWT microbench and the SIGTERM drain of graphrt as PID 1 of a real container (scripts/test-pid1-container.sh).
    • Manual CI workflow Bench targets.
  • graphrt serve --trust-gateway starts process and HTTP plugins with the agent instead of at their first node (PluginHost::prewarm): a cold wake with a Node.js plugin no longer waits for the host after the dispatch.

Fixed

  • release.yml no longer tries to build the gateway archive for Windows: the gateway is Unix-only and does not compile there, so a tag build would have failed. Windows gets the agent archive only, as in the 0.5.0 release.
  • graphrt gateway: warm first-byte overhead down from ~1.5 ms to ~0.25 ms (p50, Linux aarch64).
    • Each client stream's first frame waited up to 1 ms for the heartbeat timer.
    • A fresh run's stream read the store before its first frame.
    • start_run made two store round trips it does not need (a duplicate read for a random id, a separate dispatch claim for an interactive run)
    • SQLite statements were parsed again on every call.
  • graphrt gateway started one blocking thread per store operation waiting for the SQLite connection (176 threads, 180 MiB RSS with 200 streams)
    • Operations now queue for it.
    • With mimalloc built without transparent huge pages, a 32-frame broadcast per live run (a lagging stream catches up from the ring) and a smaller supervisor future, the gateway idles at 7 MiB instead of 20 MiB and holds 1,000 streams in ~76 MiB.
  • graphrt gateway: a version's min_replicas prewarm that raced its first cold request was dropped as "in flight" and the pool stayed at one replica. Background prewarms (min_replicas, cron, predictive) now wait for the in-flight wake and top up.

Security

  • Dependencies: url 2.5.8 -> 2.5.9 (RUSTSEC-2026-0592: stack overflow in Url::origin() on nested blob: URLs). The http-request node compares the origin of each redirect target, which a remote server chooses, so a crafted Location header could crash the process. Affects 0.5.0 and earlier.

Install

# agent build (run, serve, eval)
curl -fsSL https://github.com/Graphrt/graphrt/releases/download/v0.6.0/install.sh | sh
# gateway build (the same CLI plus `graphrt gateway` and `graphrt deploy`, every provider)
curl -fsSL https://github.com/Graphrt/graphrt/releases/download/v0.6.0/install.sh | sh -s -- --gateway
brew install graphrt/graphrt/graphrt
cargo install graphrt-cli                          # add --features gateway-all for the gateway
docker pull ghcr.io/bimapangestu28/graphrt:0.6.0

The container image of this release was published at ghcr.io/bimapangestu28/graphrt and stays there. Starting with the next release, images are published at ghcr.io/graphrt/graphrt.

  • Assets: graphrt-<target> is the agent build. graphrt-gateway-<target> (features gateway-all,eval,online-eval, with mimalloc) is the gateway build for Linux (static musl, x86_64 and aarch64) and macOS (x86_64 and aarch64). The gateway is Unix-only, so there is no Windows gateway archive.
  • Gateway providers: Kubernetes is measured on a local kind cluster. Cloud Run, ECS Fargate, Lambda, Fly and Azure Container Apps are tested against API fakes (conformance suite). Real cloud verification is pending.
  • Windows (experimental): cross-compiled (MSVC, static C runtime), not yet run on Windows.

Full changelog: CHANGELOG.md · v0.5.0...v0.6.0

Graphrt 0.5.0

Choose a tag to compare

@BimaPangestu28 BimaPangestu28 released this 23 Nov 04:40
37c7078

Scale to zero, everywhere. graphrt gateway (preview) is an always on front for scale to zero agents: it owns the run store, holds every run's stream, wakes agents on demand and dispatches runs again after drains, lost replicas and its own restarts. It ships providers for local processes, Kubernetes, Cloud Run, ECS Fargate, Lambda, Fly and Azure Container Apps, and graphrt deploy ships immutable versions to them. Releases now include a second build per platform (graphrt-gateway-<target>) and a :gateway image, while the agent build stays as slim as before. Contains breaking changes, see Changed (Breaking).

Changed (Breaking)

  • gateway.yaml values are typed as YAML resolves them: a string setting given an unquoted number (name: 2024) is refused with its path and line (deployments[0].name (line 3, column 11): invalid type: integer 2024, expected a string). Quote it. Errors in the file now name the setting's path and line.
  • graphrt serve: a bad query parameter is answered 400 Failed to deserialize query string: <field>: <reason>. Request bodies keep axum's statuses and texts (415, 400, 422 with the field path).
  • graphrt serve --verify-jwt refuses to start without an API key on every address, loopback included.
    • A reverse proxy on the same host forwards the internet to a loopback port (and one that rewrites Host also passes the DNS-rebinding check), which made run lists, events and resume of every user public.
    • Migration: set GRAPHRT_API_KEY (or --api-key-env VAR) next to --verify-jwt.
    • User tokens keep working without it on the client side.
  • graphrt serve --verify-jwt: a run started with a user token streams only response (answer) events, run_started and the terminal event, and its blocking result only run_id, status, outputs, answer, usage, reasons, error_type, reason and elapsed_ms.
    • Node events (inputs, outputs, tool results, retrieved documents, rendered prompts when capture is on), run_failed's error text and the pause snapshot are no longer sent to end users.
    • API-key callers are unchanged.
    • Resume and run reads still take only the API key.
    • Migration: clients that read node_chunk should read response events instead.
    • To keep the old behaviour for trusted clients, pass --user-events all.
  • OpenTelemetry presets (--otel-preset, GRAPHRT_OTEL_PRESET) refuse to start when the preset's credential header (Authorization, x-api-key) would go to a host other than the preset's, because an explicit OTEL_EXPORTER_OTLP_TRACES_ENDPOINT or a pushed OTEL_EXPORTER_OTLP_METRICS_ENDPOINT points elsewhere, or over plain http:// to a non-loopback host.
    • --langfuse-scores refuses plain http:// to a non-loopback host too.
    • Migration: point the preset at its backend with its base URL variable (LANGFUSE_BASE_URL, PHOENIX_COLLECTOR_ENDPOINT, ...), use https:// for a self-hosted backend on another machine, or set the credentials yourself in OTEL_EXPORTER_OTLP_HEADERS when exporting through a collector.
  • POST /v1/runs/{id}/feedback with a user token (--verify-jwt) accepts only runs started with a token of the same user.
    • Run records gain user_verified (true when user_id is a verified sub, kept on resume, false for records written before this release).
    • A run started with the API key and a body user_id is no longer rateable by that user's token: the body value is an unverified label, so a key holder could make any run rateable by anyone.
    • Migration: let end users start the runs they rate with their own token.
    • API-key callers can still post feedback for any run, with user in the body.

Added

  • Release assets: every platform gets a second archive, graphrt-gateway-<target> (features gateway-all,eval,online-eval: the same CLI plus graphrt gateway and graphrt deploy with every provider, it links mimalloc, the agent archive graphrt-<target> does not), with its checksum in SHA256SUMS and the same smoke test plus gateway --help / deploy --help.
    • The container image gains ghcr.io/bimapangestu28/graphrt:<version>-gateway (also <major.minor>-gateway and gateway).
    • install.sh --gateway installs the gateway build.
    • release.yml builds both.
  • graphrt gateway warm-up and cost guards (plan F4), all off or bounded by default (docs): POST /v1/deployments/{d}/warm prewarms the current version ahead of traffic.
    • warm.predictive learns per-deployment arrival patterns (288 five-minute slots, weekdays and weekends apart, 2.3 KiB) and prewarms lead_secs before expected traffic (hit rate 81–84 % in the seeded simulation, target ≥ 70 %)
    • warm.max_warm_replica_secs_per_day caps the idle replica-seconds kept warm per UTC day (prewarms refused, idle replicas released at once, runs still wake on demand)
    • wake_storm.max_parallel_wakes (default 16) bounds provider wakes in flight gateway-wide and prewarm_jitter_ms (default 1000) spreads prewarms.
    • Cron prewarms are jittered and no longer delay the fire.
    • New metrics: graphrt_gateway_prewarm_{started,hits,misses}_total{source}, …_warm_replica_seconds, …_warm_budget_replica_seconds, …_wakes_in_flight, …_wakes_gated_total.
    • Binary (min-size, --features gateway): +60.8 KiB x86_64 musl (9,441,208 -> 9,503,416 B), +48.2 KiB aarch64 musl (8,074,536 -> 8,123,944 B), +48.6 KiB macOS arm64 (7,011,360 -> 7,061,136 B).
  • graphrt gateway preempts runs shortly before a platform's request cap (Cloud Run 60 min, Container Apps standard ingress 240 s) and re-dispatches them, so long runs continue across the cap: the gateway sends preempt_after_ms and serve --trust-gateway preempts the execution itself.
    • Versions past the 7-day pool are retired on the platform too (Cloud Run traffic tags, Container Apps revisions, Fly Machine pools), with retry.
  • The kubeconfig feature of graphrt-provider-k8s reads kubeconfig files without per-struct deserializers, so gw-k8s-kubeconfig is smaller.
  • graphrt gateway runs deployments on Kubernetes, Cloud Run, ECS Fargate, Lambda, Fly and Azure Container Apps, besides local processes: cargo features gateway-k8s (gateway-k8s-in-cluster without kubeconfig), gateway-cloud-run, gateway-ecs, gateway-lambda, gateway-fly, gateway-aca and gateway-all of graphrt-cli (gw-* / deploy-* of graphrt-gateway).
    • Providers are named under providers: in gateway.yaml and picked per deployment (provider:)
    • Endpoints and credentials come only from that operator configuration.
    • Cloud Run requests carry the invoker ID token (X-Serverless-Authorization)
    • Lambda runs go through InvokeWithResponseStream.
    • graphrt deploy --target k8s|cloud-run|ecs|lambda|fly|aca applies a version with the provider's deploy driver and registers it with the gateway.
    • See docs/gateway.md.
  • Idempotency-Key for side effects, since execution is at-least-once per node (retries, and the re-run of an in-flight node when a preempted run resumes).
    • http-request sends Idempotency-Key: <run_id>:<exec_id> on POST, PUT, PATCH and DELETE: the same for every attempt and re-execution of a node execution, different for any other.
    • A workflow-set header wins and idempotency_key: false turns it off.
    • Plugins receive the key as idempotency_key in node.run (process and WebAssembly), exposed by the Rust, Python, TypeScript and WebAssembly guest SDKs.
    • NodeContext::idempotency_key() in graphrt-core builds it.
    • See docs/workflow-format.md.
  • graphrt serve --deployment NAME (or $GRAPHRT_DEPLOYMENT), now a flag of serve itself (it was part of --trust-gateway): webhook idempotency run ids include the deployment, derived exactly as graphrt gateway derives them (hook- + first 32 hex digits of sha256("hook|<deployment>|<hook>|<key>")), so servers of different deployments can share a store and a delivery maps to one run whichever of the two receives it.
  • graphrt-provider-fly (feature provider-fly): the Fly Machines provider of the upcoming graphrt gateway.
    • A deployment version is a pool of pre-created Machines, woken with start (suspended snapshots first), released with suspend falling back to stop, addressed over 6PN.
    • Its deploy driver (graphrt deploy --target fly) creates the app, writes Fly app secrets from env:/fly: references and creates the stopped pool with kill_timeout = grace_secs (≤ 300 s).
    • Hand-rolled Machines REST client, no Fly SDK.
    • Passes the provider conformance suite against a fake Machines API.
    • Not wired into a binary yet.
    • See docs/gateway-fly.md.
  • graphrt-provider-api crate: the Provider / DeployDriver traits, capabilities and error kinds of the upcoming graphrt gateway, the shared provider HTTP layer (token bucket per provider API, jittered retry, token cache with one refresh on 401) and the C1–C13 provider conformance harness with a scripted fake HTTP server.
    • Provider::invoke lets a platform without an HTTP address (Lambda) carry the gateway's requests, and max_grace_secs = 0 marks a platform where no preemption is possible.
    • ProviderErrorKind is #[non_exhaustive] and has a PlatformTimeout kind for a run cut at such a platform's time cap (Lambda), recorded as failed{platform_timeout} and never retried.
    • No user-visible change yet.
  • graphrt-gcp crate (gateway plan F2, GCP family), each part behind its own cargo feature and without a Google SDK.
    • auth-gcp: access and ID tokens from the metadata server or a service-account key (RS256 JWT signed with ring, exchanged at the OAuth 2.0 token endpoint), cached until exp - 5 min, one shared fetch per token, one refresh aft...
Read more

Graphrt 0.4.0

Choose a tag to compare

@BimaPangestu28 BimaPangestu28 released this 20 Nov 22:49

Evaluation lands: graphrt eval runs datasets against a workflow with deterministic, trajectory, retrieval and judge assertions, where a judge is an ordinary graphrt workflow. graphrt serve can score sampled production runs online, take human feedback and export scores as OpenTelemetry events, and spans now follow the OpenTelemetry GenAI semantic conventions with presets for Langfuse, LangSmith, Braintrust, Opik, Phoenix and MLflow. Also new: end user JWT verification and per user rate limits for serve. Contains breaking changes, see Changed (Breaking).

Changed (Breaking)

  • OpenTelemetry span names: the run span is invoke_workflow {workflow} (was workflow {workflow}) with gen_ai.operation.name=invoke_workflow, and is kind INTERNAL unless it continues a caller's traceparent (then SERVER, as before)
    • Model nodes are chat {model} (was the node title, now in graphrt.node.title)
    • Agents are invoke_agent {title} with gen_ai.operation.name=invoke_agent (was chat).
  • system-one spans report gen_ai.operation.name=chat (was the non-standard classify, now graphrt.operation.kind=classify).
  • gen_ai.system is deprecated in favor of gen_ai.provider.name. Both are emitted for this release, gen_ai.system will be removed in the next.
  • tool_call / tool_result progress no longer appear as span events on the agent span (they are execute_tool spans). model_request progress never becomes a span event.
  • graphrt-otel API: OtelConfig::capture_content: bool is replaced by OtelConfig::capture: CaptureMode. AttrValue is #[non_exhaustive]. RunRecord and the CLI's ServiceOptions have new public fields (construct them with RunRecord::running / ..Default::default()).

Added

  • Online evaluation: graphrt serve --evaluators <file> (cargo feature online-eval, on by default, not in the IoT build) scores a deterministic sample of finished runs with the assertions of graphrt eval that need no expected answer (judge workflows, regex, contains*, starts-with, is-json, json-schema, latency, tokens, trajectory:*), validated at startup.
    • Evaluators filter on workflow, run status, tags and metadata.
    • Sampling hashes the run id with the evaluator name.
    • Runs are queued after their response to a bounded pool (concurrency, queue)
    • A full queue drops and counts (graphrt.eval.dropped).
    • Without --evaluators nothing runs and runs pay only an empty Option check (serve throughput within noise).
    • Scores, online evaluation, presets and the uploader add about 98 KiB to the default min-size binary and nothing to the IoT build.
    • graphrt_eval::online holds the config, sampling and evaluation.
    • examples/evals/online replays the reference judges offline.
    • See docs/evals.md#online-evaluation.
  • Run scores (cargo feature scores): GET /v1/runs/{id}/scores, and POST /v1/runs/{id}/feedback for human feedback {name, value, comment?, user?} (number, boolean or text values).
    • Scores are stored next to the run (runs/<id>/scores.json, or in memory, bounded by --max-runs and the TTL) with deterministic ids, so a repeated score replaces the earlier one.
    • With --verify-jwt, an end user's token may give feedback on the user's own runs only, as that user.
  • evaluate {name} spans: every score (online, human, and each assertion of graphrt eval) becomes a span in the evaluated run's trace, under its root span, with a gen_ai.evaluation.result event (gen_ai.evaluation.name, .score.value, .score.label, .explanation), plus a graphrt.eval.score histogram by evaluator.
    • Names live in graphrt_otel::semconv.
  • Vendor presets: --otel-preset <name> (or GRAPHRT_OTEL_PRESET) for langfuse, langsmith, braintrust, opik, phoenix and mlflow fills the traces endpoint, auth and routing headers (Langfuse Basic auth and x-langfuse-ingestion-version: 4, x-bt-parent, x-mlflow-experiment-id...) and resource attributes (opik.project_name, openinference.project.name) from each vendor's own environment variables, and turns the metrics push off.
    • Small static tables in graphrt_otel::preset.
  • graphrt serve --langfuse-scores (cargo feature langfuse) uploads online and human scores to Langfuse's /api/public/scores with the run's trace and root observation ids and the score's deterministic id, through the egress policy, with retries.
  • graphrt eval --otel exports one trace per test run with langfuse.experiment.* attributes (a Langfuse experiment over OTLP, with the Braintrust preset and BRAINTRUST_PARENT=experiment_id:<id>, a Braintrust experiment) and an evaluate span per assertion. It used to ignore --otel.
  • graphrt-otel: EventTracer::with_span_attributes, with_root_attributes and with_root_span_id. TraceId::from_hex / SpanId::from_hex. OtelConfig::export_metrics and preset. graphrt-eval: EngineTarget::engine and env.
  • graphrt serve --verify-jwt INPUT (cargo feature jwt, on by default) verifies the token of a header-mapped input as a JWT: ES256 / RS256 keys from a JWKS (--jwt-jwks-url, refreshed in the background and on unknown kid) and/or an HS256 secret (--jwt-secret-env), with exp, nbf, --jwt-issuer and --jwt-audience checks and a required sub.
    • A valid token may start runs (POST /v1/workflows/{name}/runs only, of workflows that declare the input, others are 403) without the API key and sets sys.user_id.
    • An invalid one is 401.
    • --user-rate-limit N allows N runs per minute per sub (429 with Retry-After).
    • The server refuses --verify-jwt on a non-loopback address without an API key.
    • No new crates.
    • About 33 KiB of binary.
  • examples/supabase-chatbot: a multi-user chatbot backend for apps signed in with Supabase Auth: agent with the supabase plugin in user_rpc mode and tool_context, memory from sys.history, a sample schema with RLS and an isolation test, a distroless container and Fly.io / Cloud Run / VPS notes.
  • graphrt serve --input-header INPUT=HEADER maps a request header (leading Bearer stripped) to a secret start input of new, streamed and resumed runs, so an app can send a user's JWT next to the serve API key.
    • The value is masked everywhere and never stored.
    • Resumes must send the header again.
    • A missing header for a required input is 401, the same input in the body 400, and a non-secret declaration fails at startup.
  • agent_thought progress events carry streamed (whether the turn's text was streamed).
  • docs/serving.md documents the SSE format, the response event and how retry / on_error policies hold back live answer text.
  • agent node tool_context: per-run values (e.g. the end user's JWT) sent to one provider's tools beside the arguments, as a new context field of the plugin protocol's tool.call ({"secrets": {name: string}}).
    • Only plugins with permissions.secrets that the operator trusts receive it.
    • Other providers fail the node with tool_context_denied.
    • The values are never shown to the model or recorded, and are masked in tool results, logged arguments and node errors.
    • Hosts announce the tool_context feature in initialize.
  • Plugin SDKs pass the context as the tool handler's second argument (TypeScript (args, context), Python (args, context) for two-parameter handlers, Rust ToolCall::context). Existing handlers keep working.
  • NodeContext::observe_secret lets a node register plaintext it handles as a run secret, so later node error messages are scrubbed.
  • OpenTelemetry: agent tool calls are execute_tool {tool} child spans (gen_ai.tool.name, gen_ai.tool.call.id, error status for failed or denied calls). knowledge-retrieval nodes are retrieval spans with gen_ai.retrieval.top_k. gen_ai.provider.name, gen_ai.agent.name and gen_ai.response.finish_reasons.
  • OpenTelemetry content capture follows OTEL_INSTRUMENTATION_GENAI_CAPTURE_CONTENT (NO_CONTENT default, SPAN_ONLY, EVENT_ONLY, SPAN_AND_EVENT).
    • With it on, the run span carries the run input and output (graphrt.run.input / output and langfuse.observation.input / output), model spans gen_ai.system_instructions and gen_ai.input.messages / gen_ai.output.messages as structured values, tool spans their arguments and result, retrieval spans the query and document ids.
    • Values stay masked and capped at 4 KB.
  • graphrt_core::node::CaptureContent service: when registered (the CLI does so while content capture is on), llm nodes report their rendered messages as model_request progress, agents add result text to tool_result progress and knowledge-retrieval adds its query to the node metadata. Nothing extra is built without it.
  • POST /v1/workflows/{name}/runs accepts metadata, session_id, user_id and tags.
    • They are stored on the run record and stamped on every span (session.id, user.id, gen_ai.conversation.id, langfuse.session.id, langfuse.user.id, langfuse.trace.tags, langfuse.trace.metadata.*).
    • graphrt run gets --session-id, --user-id, --tag and --metadata.
  • RunRecord gains trace_id and span_id (root span of the latest traced execution), metadata, session_id, user_id, tags, and inputs, kept (secrets masked) only with the new graphrt serve --store-inputs.
  • graphrt-otel: semconv module with every attribute name, CaptureMode, RunContext, EventTracer::{capture, with_context, content_limit, root_span_id}, Span::is_run_root, AttrValue::Structured.
  • docs/observability.md: setups for Langfuse v4, Phoenix, Opik, MLflow, LangSmith and Braintrust.
  • graphrt eval <file.eval.yaml>: evaluate a workflow against test cases and gate CI on the pass rate.
    • Eval files use Promptfoo's tests / assert / defaultTest shape plus JSONL datasets.
    • Assertions cover outputs (equals, contains and its variants, regex, starts-with, `is...
Read more

Graphrt 0.3.2

Choose a tag to compare

@BimaPangestu28 BimaPangestu28 released this 20 Nov 05:54

A telemetry fix: short commands such as graphrt run now deliver their daily report. Release builds also point at the project's collector endpoint. Telemetry stays opt in and off by default.

Changed

  • Release binaries, the Homebrew formula and the container image report to the project's collector (graphrt-telemetry.bimapangestu280.workers.dev) once a user opts in with graphrt telemetry enable. Still off by default.

Fixed

  • Telemetry: the daily report of a short command such as graphrt run was lost.
    • The background thread claimed the day and removed its counts, then the process exited before the request finished, so nothing arrived and nothing was retried (only long-running serve delivered reports).
    • A finishing process now waits for that once-a-day report, at most the 5-second send timeout.
    • Telemetry is opt-in and no released binary had an endpoint, so no user data was affected.

Install

curl -fsSL https://github.com/Graphrt/graphrt/releases/download/v0.3.2/install.sh | sh
brew install graphrt/graphrt/graphrt
cargo install graphrt-cli
docker pull ghcr.io/bimapangestu28/graphrt:0.3.2

The container image of this release was published at ghcr.io/bimapangestu28/graphrt and stays there. Starting with the next release, images are published at ghcr.io/graphrt/graphrt.

  • Windows (experimental): cross-compiled, not yet run on Windows.

Full changelog: CHANGELOG.md · v0.3.1...v0.3.2

Graphrt 0.3.1

Choose a tag to compare

@BimaPangestu28 BimaPangestu28 released this 20 Nov 02:14

Loading large workflows is fast again. 0.3.0's strict validation did redundant work, so graphrt run / validate on a 1,000-node workflow took ~54 ms instead of 0.2.0's ~14 ms. No behaviour changes, and errors are reported exactly as in 0.3.0.

Added

  • The iOS sample app is verified on a physical iPhone (iOS 18.3). Its README has the device build, install and launch steps.
  • Plugin SDKs 0.2.0 on PyPI and npm (graphrt-plugin): tool handlers can return images (tool_images), as shipped in graphrt 0.3.0.

Changed

  • Every crate now declares Rust 1.89 as its MSRV (was 1.85 for most).
    • The declaration was wrong, not the code: graphrt-core's default yaml feature has needed 1.89 since 0.2.0 through serde-saphyr 2, and the CLI, FFI and RAG crates already declared it.
    • The MSRV CI job (and scripts/ci-local.sh) now checks the whole workspace on 1.89.

Performance

  • Validation compiles a clean document from the nodes it already built and checked, instead of building and checking them again in Graph::build.
  • Source positions are computed only when there is something to report.
  • Graph::fingerprint is computed on first use and cached: only snapshots, run records and traces need it. Values are unchanged.
  • graphrt run on a 1,000-node chain (macOS arm64, min-size build): 0.3.0 55 ms, 0.3.1 16 ms, 0.2.0 15 ms.

Install

curl -fsSL https://github.com/Graphrt/graphrt/releases/download/v0.3.1/install.sh | sh
brew install graphrt/graphrt/graphrt
cargo install graphrt-cli
docker pull ghcr.io/bimapangestu28/graphrt:0.3.1

The container image of this release was published at ghcr.io/bimapangestu28/graphrt and stays there. Starting with the next release, images are published at ghcr.io/graphrt/graphrt.

  • Windows (experimental): graphrt-x86_64-pc-windows-gnu.zip is cross-compiled and has not been run on Windows yet.

Full changelog: CHANGELOG.md · v0.3.0...v0.3.1

Graphrt 0.3.0

Choose a tag to compare

@BimaPangestu28 BimaPangestu28 released this 19 Nov 12:12

Workflow format v1 is frozen with a JSON Schema, and validation now collects every error with its location. Also new: webhook triggers, opt in anonymous telemetry, plugins installable by name from the plugin catalog, Android and iOS sample apps, a comparison against LangGraph, and another round of engine, LLM path and server speedups. A security review brought fixes, most of which also shipped as 0.2.1. Contains breaking changes to the workflow format and the Rust API, see Changed (Breaking).

Changed (Breaking)

  • Unknown fields are errors in v1 documents: at the document, graph, node, edge, retry, on_error and variable-declaration level, and in node configs whose catalog schema is closed (additionalProperties: false, all built-in kinds, as catalog::schema::object now produces).
    • Plugin configs with open schemas are unaffected.
    • schema::open_object builds one.
    • Required config fields from the catalog schema are enforced (for example a template-transform without template).
    • The import layout (top-level workflow/app, data-wrapped nodes) stays lenient.
    • Migration: run graphrt validate and fix what it reports.
    • Move tool metadata to x- keys.
  • version must be "1" (or 1) or absent. Migration: set version: "1".
  • Edge handles are checked: an edge must use a handle the source node can select (source for non-branch nodes, case ids and false for if-else, class ids, action ids, a plugin's fixed handles).
    • Non-branch nodes used to follow edges with any handle.
    • fail-branch edges on nodes without that strategy are a warning (never taken).
    • Migration: use source or the node's handle.
  • Reserved names: top-level imports, inputs, outputs, triggers, metadata, requires, subgraphs. Node-level disabled, cache, metadata (plugin configs cannot use them either).
  • human-input: the request expiry is expire_after_ms (pause data still reports timeout_ms). A config timeout_ms was always taken as the node's per-attempt timeout and never reached the node. Migration: rename it.
  • Loop variables are {name, type, input_type, value}. label, var_type and value_type (which meant the input source, unlike every other value_type) still work as deprecated aliases.
  • Deprecated, still accepted with a warning: environment_variables, conversation_variables, declaration value_type, node parentId / container_id / iteration_id / loop_id, error_strategy / default_value, retry_config, edge sourceHandle / source_handle.
  • API: NodeDoc has a strict field. ConfigError has a field field. DocumentError::Field. GraphError::{MissingNode, MissingParent, UnknownReference} carry a suggestion, new GraphError::{InvalidField, UnknownHandle}. graphrt validate takes --format. CliError has preformatted.
  • Breaking (graphrt-core): Event::NodeChunk::field is an Arc<str> instead of a String, so a streamed chunk no longer allocates its field name.
    • Serialized events are unchanged.
    • New NodeContext::chunk_shared(&field, text) streams under a name the node keeps in an Arc<str>.
    • NodeContext::chunk(&str, text) keeps its signature (and allocates the name per chunk).
    • Migrating: compare with field.as_ref() == "text", use field.to_string() where a String is needed, and .into() when building the event.
  • Breaking (graphrt-core): ResponseChunk::node_id is an Arc<str> instead of a String (shared with the graph instead of copied per chunk). Migrating as for NodeChunk::field. New ResponseAssembler::push_into(&event, &mut out) appends to a caller-owned buffer. push is unchanged.
  • Breaking (graphrt-llm): collect's callback receives each ChatDelta by value (FnMut(ChatDelta), was FnMut(&ChatDelta)), after the delta was added to the response, so streamed text can be moved into a chunk instead of copied.
    • Closures that ignore the delta (|_| {}) compile unchanged.
    • Others match on the owned delta instead of a reference.
  • Breaking (graphrt-llm): nodes::common::PromptTemplate::messages returns &[PromptMessage] instead of Vec<&PromptMessage>. New helpers nodes::common::finish_reason_value and StreamField::shared.
  • Node outputs and pool namespaces use the new graphrt_core::Variables map (keys are graphrt_core::VarName) instead of IndexMap<String, Value> / IndexMap<Arc<str>, Value>.
    • It is a reference-counted, insertion-ordered flat map: cloning is a reference-count bump, so a node's outputs become its pool namespace and its event payload without being copied.
    • Affected:
    • NodeOutput::outputs is Variables. NodeOutput::with takes impl Into<VarName> (string literals, String, &String, Arc<str>).
    • Event::NodeSucceeded::outputs and Event::NodeFailed::outputs are Variables (same JSON).
    • VariablePool::namespace() returns Option<&Variables> and VariablePool::set_outputs takes &Variables.

Migration: most code compiles unchanged, since Variables has the familiar get, insert, remove, iter, keys, values, len, contains_key, extend and collect() API. Iteration yields (&str, &Value) instead of (&String, &Value). Use .to_owned() where a String is needed. Pass a non-'static &str name as name.to_owned(). outputs.insert("x".into(), v) becomes outputs.insert("x", v). Convert with Variables::from(index_map), variables.to_index_map() or IndexMap::from(variables). Indexing a missing name (outputs["x"]) yields Value::Null instead of panicking. remove keeps the order of the remaining entries (like IndexMap::shift_remove).

Added

  • graphrt serve --webhooks <file>: webhook triggers.
    • POST /v1/hooks/{hook} starts an async run of the hook's workflow from any JSON body and answers 202 with the run id.
    • Bodies map to inputs by JSON Pointer and header (inputs, headers) or pass whole (body_input, default body).
    • Optional HMAC-SHA256 signature checks in the GitHub, Stripe, Slack, generic or graphrt formats, compared in constant time, with a replay window for the timestamped ones.
    • Secrets from the environment, --env-file or a file.
    • An idempotency key header (default Idempotency-Key) maps redeliveries to the first run, durably with --store.
    • Deliveries share --max-body-bytes.
    • GET /v1/hooks lists the hooks.
    • See docs/serving.md.
  • Webhook completion callbacks (callback): a signed (X-Graphrt-Signature: t=..,v1=..) JSON result POSTed when the run succeeds, fails, aborts or pauses, through the HTTP egress policy (private networks refused unless --allow-private-network, no redirects), retried with exponential backoff on network errors, 408, 429 and 5xx.
  • Opt-in anonymous usage telemetry for the graphrt binary (telemetry feature, in the default set).
    • Off by default.
    • On only after graphrt telemetry enable or GRAPHRT_TELEMETRY=1, and always off with DO_NOT_TRACK, in CI, or without an endpoint (GRAPHRT_TELEMETRY_URL at build or run time).
    • At most one report a day, sent from a background thread with a 5 s timeout: a random install id, version, OS/arch, features, build (cli/docker) and per-day counts of runs and serve requests, aggregated in telemetry.json in the user config directory.
    • graphrt telemetry status prints exactly what would be sent.
    • Not in the embedded or FFI libraries.
    • See docs/telemetry.md.
  • tools/telemetry-collector/: a Cloudflare Worker + D1 collector for those reports (strict payload validation, no IP addresses stored, schema, wrangler config template, weekly-active-installs and daily-runs queries). Not deployed.
  • Workflow format v1 is frozen, with a JSON Schema (draft 2020-12): schema/workflow-v1.schema.json, one oneOf branch per node kind keyed on type, built from the node catalog.
    • graphrt schema prints the schema for the node kinds in the running build, including plugins.
    • The examples carry a # yaml-language-server: $schema=... header.
    • Editor setup (VS Code YAML, JetBrains) and the stability promise are in docs/workflow-format.md.
  • Validation reports every problem at once: graphrt validate and run show rustc-style errors with file:line:column, a source snippet, the document path (graph.nodes[1].template) and "did you mean" suggestions for field names, node types, node ids in edges, parents and selectors, and edge handles.
    • graphrt validate --format json prints a machine-readable report.
    • Library: graphrt_core::validate::validate_text, Diagnostic, source_map::SourceMap, doc_schema::workflow_schema, Registry::descriptor_ref, Node::branch_handles, ConfigError::field.
  • x- keys (document, graph, nodes, edges) are free for tools and ignored.
  • Tools can return images that the agent node shows to the model, enabling vision loops such as computer use (screenshot, then click by coordinates).
    • ToolOutput gains images (ToolImage::Base64 {media_type, data_base64} or ToolImage::Url), checked against check_images (4 per result, 5 MiB each, png/jpeg/webp/gif, https URLs).
    • Anthropic, Gemini 3+ and Bedrock Claude/Nova receive them inside the tool result.
    • OpenAI-compatible servers and other models get them in a user message right after the tool results.
    • New agent option keep_tool_images (default 3, null for all) keeps only the latest N image-bearing results.
    • Plugin protocol: tool.call results accept images, and initialize announces features: ["tool_images"].
    • The Python, TypeScript and Rust SDKs send images only to hosts that announce it.
    • MCP image blocks are forwarded too.
    • See docs/tool-images.md.
  • graphrt plugin install <name>[@version] installs a plugin from the graphrt-plugins catalog (index.json of its catalog release, or --index <url|path> / $GRAPHRT_PLUGIN_INDEX): the latest version or the exact o...
Read more

Graphrt 0.2.1

Choose a tag to compare

@BimaPangestu28 BimaPangestu28 released this 19 Nov 12:03

Security patch release for 0.2.0, recommended for every 0.2.0 user. It fixes sandbox limits that could be switched off, secret plaintext in error messages and code outputs, more SSRF address forms, unbounded concurrent runs and DNS rebinding in graphrt serve, predictable temp directories, and a SQLite CVE. No breaking API changes, but read the upgrade notes (MSRV and new serve limits).

Upgrade notes

  • MSRV: graphrt-rag now needs Rust 1.89 (was 1.85), because the patched SQLite is only in rusqlite 0.41, which declares Rust 1.89.
    • No rusqlite 0.40.x or libsqlite3-sys 0.38.x release carries the fix (the advisory lists libsqlite3-sys >= 0.39.0 as patched, and that needs Rust 1.88).
    • graphrt-ffi enables graphrt-rag (with sqlite) through its default rag feature, so a default graphrt-ffi build needs Rust 1.89 too.
    • graphrt-cli already needed 1.89.
    • The other crates keep their MSRV.
  • graphrt serve refuses new and resumed runs with 429 Too Many Requests while 256 runs execute (--max-active-runs, 0 = unlimited).
  • graphrt serve without an API key on a loopback address answers 403 to requests whose Host is not a loopback name. If you put a reverse proxy in front of such a server, set an API key or have the proxy forward a loopback Host.
  • Plugin manifests asking for limits.max_message_bytes above 256 MiB are rejected.

Security

  • code node (JavaScript): a workflow could switch off the sandbox's memory and stack limits by asking for limits.memory_bytes: 0 or limits.stack_bytes: 0 (QuickJS reads zero as "unlimited"), and unbounded recursion then overflowed the native stack and aborted the whole process (for example graphrt serve).
    • An operator stack ceiling above 16 MiB had the same effect, and one above the executor's thread stack (2 MiB on tokio's blocking pool) crashed the process too.
    • Limits now have floors (1 MiB heap, 64 KiB stack) and a 16 MiB stack ceiling, and JavaScript runs on a dedicated thread sized from the stack limit, so deep recursion is always a catchable RangeError.
    • The graphrt-code tokio feature no longer changes behaviour and is kept for compatibility.
  • code node (JavaScript): error messages thrown by scripts are truncated to 8 KiB, so a script cannot push megabytes into events and run records. An operator time limit too large for the clock no longer panics. A long chain of promise jobs is bounded by the time limit between jobs as well.
  • Python subprocess runner: the working directory is created fresh and owner-only (0700) instead of adopting an existing directory at the predictable temp path.
  • Engine: node error messages are scrubbed of every secret the run has seen (type: secret env variables, secret-typed inputs, re-supplied resume secrets, secret outputs) before they reach node_failed / node_retry / run_failed events, error_message outputs of handled errors, the run store and OTel spans.
    • Previously an error that echoed a key (a provider body such as "Incorrect API key provided: sk-...", an HTTP error snippet from an echo endpoint, an exception in code) was recorded verbatim.
    • New public helpers in graphrt_core::redact (redact_secrets, SecretSet, MIN_SCRUB_LEN).
  • LLM providers: error bodies of failed provider requests are scrubbed of the credentials the request carried (Authorization, x-api-key, x-goog-api-key, api-key headers, key query parameters) before they become error messages. OpenAI-compatible gateways and self-hosted servers often echo the full key.
  • code node: returned strings containing a secret input (key, or "Bearer " + key) are re-tagged as secrets, so they are masked in node_succeeded events, SSE, run records and snapshots while staying usable downstream. Captured Python stdout is scrubbed. Previously they were stored in plaintext.
  • HTTP egress policy: also blocks the IPv4-translated form ::ffff:0:a.b.c.d (judged by the embedded IPv4 address), the local-use NAT64 prefix 64:ff9b:1::/48, Teredo 2001::/32 and the Azure WireServer address 168.63.129.16.
  • OTel HTTP exporter: redirects are no longer followed, so vendor key headers cannot follow a redirect to another host.
  • Bundles: graphrt run/serve --bundle extracted configs to a fixed, predictable directory in the shared temp dir and reused it if it existed, so another local user could pre-create it and plant symlinks or swap providers.json (e.g. pointing base_url at their server).
    • Each invocation now extracts into a new owner-only (0700) directory.
    • Signatures are checked with strict Ed25519 verification.
  • Plugins: limits.max_message_bytes is capped at 256 MiB. WebAssembly plugins get at most 4 tables of 100,000 elements (was 8 x 1,000,000), which lived outside the memory_bytes budget.
  • graphrt serve: new --max-active-runs (default 256, 0 = unlimited) caps runs executing at once.
    • Further starts and resumes get 429.
    • Previously "async": true requests could start unlimited parallel runs (--max-runs only bounds kept records).
    • AppState::with_max_active_runs sets it for embedders (default unlimited there).
  • graphrt serve without an API key on a loopback address now accepts only loopback Host names (localhost, 127.0.0.1, [::1]), blocking DNS rebinding from web pages.
    • A non-loopback address without a key prints an explicit warning.
    • Run store I/O errors no longer return server file paths to clients, and top_k on /v1/knowledge/retrieve is capped at 100.
  • Debug output of OtelConfig (OTLP headers) and the MCP StdioConfig (env) / HttpConfig (headers, bearer token) shows names only, never values.
  • Dependencies: rusqlite 0.40 -> 0.41 (bundled SQLite 3.54.1), fixing RUSTSEC-2026-0459 / CVE-2026-119375 (uninitialized page-cache memory read through a crafted database and -wal pair) in graphrt-rag's SqliteStore.
    • This raises graphrt-rag's MSRV to Rust 1.89 (see the upgrade notes).
    • paste (unmaintained, build-time only, via candle) is acknowledged in deny.toml.
  • Docs: new docs/security.md (sandbox limits, egress policy, masking guarantees and their limits, deployment knobs). SECURITY.md now has a threat model, explicit scope and supported versions.

Install

curl -fsSL https://github.com/Graphrt/graphrt/releases/download/v0.2.1/install.sh | GRAPHRT_VERSION=0.2.1 sh
# or
cargo install graphrt-cli --version 0.2.1
docker pull ghcr.io/bimapangestu28/graphrt:0.2.1

The container image of this release was published at ghcr.io/bimapangestu28/graphrt and stays there. Starting with the next release, images are published at ghcr.io/graphrt/graphrt.

Full changelog: CHANGELOG.md · v0.2.0...v0.2.1

Graphrt 0.2.0

Choose a tag to compare

@BimaPangestu28 BimaPangestu28 released this 19 Nov 04:10

Knowledge bases you can manage from an app, in process embeddings, serving on small devices, and a much faster engine and server. Contains breaking API changes, see Changed.

Added

  • graphrt serve --max-runs <n>. See docs/serving.md for small-device numbers.
  • Knowledge base API in graphrt serve (with --knowledge): list datasets and documents (paged), add or replace documents from text or uploaded files (--max-upload-bytes, default 16 MiB), inspect a document's chunks, delete documents, and test retrieval, all on the knowledge base the workflows use.
    • Ingestion runs one request at a time to keep small devices responsive.
  • Documents can be disabled and re-enabled (PATCH .../documents/{document}, KnowledgeBase::set_document_enabled): a disabled document keeps its chunks and stays disabled across re-ingestion, but no search returns it (memory, SQLite and Qdrant stores, reserved chunk metadata key _disabled).
  • Parent-child chunking per dataset (chunking: { max_chars, parent_max_chars } in the knowledge config, KnowledgeBase::set_chunking): small children are embedded and searched, and retrieval returns each matching parent once, rebuilt from its children (nothing extra stored).
    • ChunkerConfig gains parent_max_chars and TextChunk gains parent (breaking for struct literals)
    • Children carry parent_index metadata.
  • Knowledge base datasets can be created and deleted at runtime: GET /v1/knowledge/resources, POST /v1/knowledge/datasets and DELETE /v1/knowledge/datasets/{dataset}, backed by KnowledgeBase::{create_dataset, remove_dataset, dataset_details, resource_names, runtime_datasets}.
    • New datasets name a store, embedder and reranker declared in the knowledge config.
    • They are saved next to it (kb.datasets.json) and recreated on start by serve, run and kb.
  • graphrt-rag: VectorStore::list_documents (memory and SQLite stores), DocumentSummary, KnowledgeBase::{list_documents, document_chunks, delete_document, is_managed}, RagError::Unsupported. IngestReport is serializable.
  • graphrt-rag: LocalEmbedder (feature local-embed), sentence embeddings computed in-process with candle on the CPU: no embedding server, API key or network once the model is cached.
    • BERT-family models from Hugging Face (sentence-transformers/all-MiniLM-L6-v2 by default, intfloat/multilingual-e5-small for Indonesian and other languages) or a local model directory.
    • Configured as embedders: { local: { type: local, model: ... } }.
    • On by default in graphrt-cli (feature local-embed, about +2.1 MiB).
  • graphrt-ffi: the SQLite knowledge store is available on mobile, so bundles using stores: { ...: { type: sqlite } } load on Android and iOS (built and linked for Android arm64, iOS not built yet).
  • graphrt plugin install <git-url> --subdir <path> installs a plugin from a subdirectory of a git repository, so monorepos with one plugin per directory (such as graphrt-plugins) work.
    • Absolute paths, .. and symlinks are rejected.
    • Only that directory is copied.
    • Library: graphrt-plugin adds install_from_git_subdir (install_from_git is unchanged).
  • graphrt-core: Registry::register_lazily_described, which builds a node kind's catalog descriptor only when it is first requested.
  • graphrt-cli: optional mimalloc feature to replace the global allocator.

Changed

  • Breaking (graphrt-rag): clones of a KnowledgeBase share their datasets (so datasets created through one clone are visible to all). KnowledgeBase::datasets returns Vec<DatasetInfo> and chunking returns an owned ChunkerConfig.
  • Breaking (graphrt-core): the node_id and exec_id fields of every Event variant are Arc<str> instead of String, so the engine shares the ids it already holds instead of allocating two strings per event (every streamed chunk included).
    • Serialized events are unchanged.
    • Migrating: compare with node_id.as_ref() == "llm" instead of node_id == "llm", use node_id.to_string() where a String is needed, and .into() when building an event from a String.
  • Breaking (graphrt-core): GraphNode::{kind, title} and the kind and title of Event::NodeStarted are Arc<str> (shared, not copied per execution). Serialized events are unchanged.
  • Breaking (graphrt-core): run stores keep events as serialized JSON: RunStore::append_events / events take and return Vec<StoredEvent> (Box<serde_json::value::RawValue>), built with event_to_stored.
    • stored_event_type reads an event's type.
    • The stored text is identical to what event_to_json produced, so GET /v1/runs/{id}/events is unchanged.
  • Breaking (graphrt-http): HttpClient::client and HttpClient::manual_redirect_client return Result<&reqwest::Client, ClientError>. The four underlying clients are built on first use. ClientError is Clone.

Performance

  • Startup no longer loads the system trust store for HTTP clients a run never uses: LLM providers (graphrt-llm) and graphrt-http build their clients on the first request. graphrt run hello.yaml used to read every CA certificate six times (361 file opens, now 1).
  • Built-in node kinds build their catalog descriptors lazily: node registry construction went from ~530 µs to ~7 µs.
  • template-transform compiles its template once instead of on every run: ~20% less engine time per template node.
  • Net effect, graphrt run hello.yaml (static musl binary, Linux arm64): 10.1 ms -> 6.5 ms wall clock, 3.1 ms -> 0.6 ms user CPU.
  • Fewer allocations per run and per node execution: a variable pool allocates its namespace shards on first write (an empty pool was 33 allocations, one per execution frame), namespace keys are reused instead of re-allocated on every write, node commits without variable writes skip the undo log, execution ids are written without format!, and Arc<str> ids are copied without going through Display.
    • On the benchmark harness (Apple M-series, same machine before and after): 1,000 concurrent instant runs 63k -> 82k runs/s (+31%), per-node scheduling 1.55 -> 1.27 µs (noop chain) and 2.31 -> 1.57 µs (1,000-way fan-out), time to first streamed chunk overhead 14.5 -> 11.6 µs.
  • Shared Arc<str> event ids (see Changed) took the same benchmark to 94k runs/s (+49% over 0.1.0 in total), 1.06 µs per noop node and a 10.2 µs streaming overhead. The response assembler and the OpenTelemetry tracer key their maps by the shared ids too.
  • Cheaper per-frame bookkeeping: index-keyed maps use a multiplicative hasher and are sized up front, and the scope's id set is built only when a node writes variables.
    • Against 0.1.0 on the same machine: 0.87 µs per node on a 1,000-node chain (was 1.55), 1.18 µs on a 1,000-way fan-out (2.31), 98k instant runs/s (63k)
    • Raw data in bench/results/2026-11-1{8,9}-*.
  • graphrt serve: a run's 4,096-slot broadcast channel is created only when something subscribes to its events (it took ~30% of server CPU), and accepted connections set TCP_NODELAY (streamed responses no longer wait ~40 ms for a delayed ACK on Linux).
    • Static musl, Linux arm64, 1 CPU: synchronous runs 2,875 -> 20,613 req/s, streaming 382 -> 3,392 req/s, async 4,232 -> 20,499 req/s.
    • macOS native synchronous 26k -> 46k req/s.
  • Engine: fewer allocations per node execution (ids built on the stack, shared Arc<str> kind/title, outputs no longer copied into the pool), run events queued in a reusable buffer with an atomic waker instead of an mpsc channel, and stored events kept as JSON text (297 ns and 2.6 allocations per event, was 485 ns and 14.3).
    • Per-node scheduling another 7-15% lower (0.73 µs on a 1,000-node chain).
  • bench/run.sh: the harness's global allocation counter is enabled only in the sections that read it. It had capped the concurrency section at ~60-80k runs/s. With it gated the same machine measures ~300k runs/s for the llm graph and ~390k for a no-LLM graph at 11 workers (a measurement fix, not a runtime speed-up).

Fixed

  • graphrt serve without --store kept every run (record and events) in memory forever: under a 32 MiB limit the server was OOM-killed after ~1,800 runs. The in-memory store now keeps at most --max-runs runs (default 1000), dropping the oldest finished runs first and always keeping running and paused ones.

Install

curl -fsSL https://github.com/Graphrt/graphrt/releases/download/v0.2.0/install.sh | sh
# or
cargo install graphrt-cli
docker pull ghcr.io/bimapangestu28/graphrt:0.2.0

The container image of this release was published at ghcr.io/bimapangestu28/graphrt and stays there. Starting with the next release, images are published at ghcr.io/graphrt/graphrt.

Full changelog: CHANGELOG.md · v0.1.0...v0.2.0