Skip to content

Graphrt 0.6.1

Choose a tag to compare

@BimaPangestu28 BimaPangestu28 released this 24 Nov 04:51
· 64 commits to main since this release
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