Skip to content

Releases: substructureai/substructure

v0.1.20

Choose a tag to compare

@github-actions github-actions released this 03 Jul 10:09

Added

  • Message-tree conversation history. History now lives in a tree the engine
    owns and sends on each worker decision, not in worker state. The worker returns
    the transcript as it should look and the engine reconciles it, forking a branch
    where it diverges. This enables edits, regenerations, plan/execute, and prompt
    compaction.
  • The worker decision includes a count of effects still running, so a worker knows
    when a step is done without scanning the list.
  • A language-neutral protocol reference (docs/07-protocol.md), so workers can be
    written in any language.
  • New assistant-ui-cloudflare-starter example: an assistant-ui chat on a
    Cloudflare Worker, streaming from AG-UI.

Changed

  • Breaking (SDK): the agent API is rebuilt. An agent is now a single decision
    function (the built-in tool/sub-agent loop, or your own returning plain action
    objects), replacing the middleware/builder API. Models are configured inline for
    the server to run, or supplied as an adapter your worker runs.
  • Breaking (wire): one unified effect protocol. Tool, model, and sub-agent
    calls share a single request/settle vocabulary instead of a message type per
    kind, and sub-agent results are reported as themselves, not as tool results. The
    settle endpoint and its SDK/runtime methods were renamed to match.
  • Breaking (wire/SDK): parallel model calls. A worker can issue several model
    calls from one decision that settle independently; the one-at-a-time restriction
    is gone. The engine still paces server-run calls; run them on the worker for real
    overlap.
  • Breaking (SDK): tools. A tool's execute receives the decision it runs under,
    not a separate context; async tools are flagged with an option, not a sentinel;
    tool state lives in your own store; and client tools may omit execute.
  • Breaking (SDK): streaming. A worker-run model streams tokens through one
    delta shape; the intermediate stream-part type and its wrapper are gone.
  • Breaking (wire): the decision request's end-user field is renamed from
    owner to identity, matching the SDK and docs.
  • Workers no longer send a span with submissions; the engine owns tracing.
  • Model-call actions default their retry and streaming options, and must state who
    runs the call.
  • The AG-UI /run endpoint forwards the client's full transcript, which the engine
    reconciles into the tree.

Removed

  • Breaking (SDK): the middleware system and the Substructure.agent factory;
    the AI and OpenAI adapter classes become function equivalents.
  • The substructure new command and the templates/ directory (starters moved
    into examples/).
  • The examples/ pnpm workspace; each example is now a standalone npm project.

v0.1.19

Choose a tag to compare

@github-actions github-actions released this 12 Jun 06:53

Added

  • substructure new [template] [dir] scaffolds a project by copying a starter
    template from the monorepo. With no template it shows a picker (or lists
    templates when non-interactive).

v0.1.18

Choose a tag to compare

@github-actions github-actions released this 10 Jun 13:55

Removed

  • The CLI no longer prints zero-balance warnings when targeting an app. App
    balances are still shown by apps list and apps show.

Changed

  • Interrupts and cancels now fully fence the session: pending work is voided,
    late results and client actions can't wake a paused session, and decision
    requests raised mid-pause queue until resume.

v0.1.17

Choose a tag to compare

@github-actions github-actions released this 10 Jun 06:21

Added

  • openaiAgent factory in the OpenAI adapter: converts an @openai/agents
    Agent (or OpenAIAgentSettings) without a second new, e.g.
    openaiAgent(new Agent({ ... })).
  • Interrupts record the issuing caller's origin; resuming requires equal or
    higher privilege.
  • Clients can interrupt and resume their own sessions via the client API.
  • New interrupt worker action lets an agent pause awaiting external input.
  • AG-UI interrupt-aware run lifecycle: interrupt outcomes and resume[].

v0.1.16

Choose a tag to compare

@github-actions github-actions released this 09 Jun 12:36

Added

  • Native AG-UI protocol support: endpoints that stream an agent turn as AG-UI SSE
    events, with live token and reasoning streaming.
  • Reasoning controls on LlmRequest (reasoning: effort or max_tokens,
    plus exclude and enabled), passed through to providers that support them.
  • llmToolLoop takes a generator: a worker-side provider generator that runs
    the LLM call on your worker, or serverGenerate to let the Substructure
    server's configured provider make the call.
  • Anthropic adapter (@substructure.ai/sdk/adapters/anthropic): call the
    Anthropic Messages API from a worker via the anthropicGenerate generator.
  • AI SDK adapter (@substructure.ai/sdk/adapters/ai): run an existing Vercel AI
    SDK agent on Substructure via ToolLoopAgent, or drive the loop directly with
    the aiGenerate generator.
  • OpenAI adapter (@substructure.ai/sdk/adapters/openai): run an @openai/agents
    Agent on Substructure via OpenAIAgent, or drive the loop directly with the
    openaiGenerate generator.
  • The server and embedded runtime can start without an LLM provider configured.
  • $SUBS_API_TOKEN sets the CLI's bearer token without a login — for targeting a
    self-hosted server with auth enabled (a serve --dev server needs no token).
  • substructure login now stores tokens per server URL, so you can stay logged
    in to several servers at once (e.g. cloud and a staging deploy); each command
    sends only the token for the server it targets.

Changed

  • Breaking (CLI): subcommands are now top-level — substructure cloud <cmd>
    becomes substructure <cmd> (e.g. substructure sessions list), and
    substructure local start becomes substructure serve.
  • Breaking (CLI): the credentials file is now keyed by server URL with no
    migration of the old single top-level token; existing logins must re-run
    substructure login.
  • Breaking: session events identify a session's end user as owner (was
    identity); consumers reading raw events should read owner. No alias for the
    old key.
  • Breaking: Caller::System is now System { tenant_id } (was a unit
    variant); crate consumers constructing or matching it must supply a tenant.
  • Breaking: the llmLoop middleware (and agent.llmLoop) is renamed
    llmToolLoop to make the llm-and-tool loop it drives explicit.
  • Breaking (worker protocol): a turn's tool and sub-agent results are
    delivered as a single batched effects.complete trigger, replacing the
    per-effect tool.result, sub_agent.turn.complete, and sub_agent.error
    triggers; spawn.sub_agent now carries tool_call_id. Handled transparently by
    SDK workers.

Fixed

  • OpenRouter responses no longer drop image outputs from the stream.
  • The next LLM call in a turn waits for all of the turn's effects to finish, so
    turns with multiple sub-agents or a mix of tools and sub-agents no longer call
    the model with partial results. Sub-agents run concurrently.

v0.1.15

Choose a tag to compare

@github-actions github-actions released this 02 Jun 12:39

Added

  • Changelog with automated release notes.

Changed

  • Agent state is serialized as JSON automatically; chains no longer need an
    explicit .use(agent.jsonState()). Existing chains that still include it
    keep working, and the wire format is unchanged.

Fixed

  • Tool-result messages (message.new with role: "tool") now carry the tool
    name instead of null, so consumers reading only the message stream (e.g.
    reconstructing a transcript from session events) no longer have to correlate
    tool_call_id back to the originating tool call to recover the name.