Skip to content

switchboard v0.9.0

Choose a tag to compare

@github-actions github-actions released this 31 Oct 19:09
· 19 commits to main since this release
v0.9.0
acba6e2
go install github.com/go-steer/switchboard/cmd/switchboard@v0.9.0
docker pull ghcr.io/go-steer/switchboard:0.9.0

The module version keeps its v and the image tag does not.

The image is multi-arch (amd64 + arm64), distroless
(gcr.io/distroless/static-debian12:nonroot, no shell, no package manager)
and signed with Sigstore keyless:

cosign verify ghcr.io/go-steer/switchboard:0.9.0 \
  --certificate-identity-regexp '^https://github.com/go-steer/switchboard' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com

A release about agents that are not daemons somebody runs. On Agent
Substrate an agent can be an ax task: a sandbox that suspends when idle and
wakes on the next request. An agent of kind: "ax" is a task template, and
switchboard gives each conversation a task of its own, or each person one
(ax.scope: "owner"), or everyone one ("shared"). It starts the task on the
first message and speaks the usual session contract to it through Substrate's
router.

Tasks can sleep, and are cleaned up. A conversation lets go of its streams
to the task shortly after its last turn, so ax can suspend it, and picks the
stream up again on the next message. Thread tasks quiet for 14 days are
deleted, tasks made from an older template are replaced, and the admin API
lists and deletes an agent's tasks.

Built for Agent Substrate v1.0. The router is reached over mTLS, with the
pod's own Substrate certificate and the servicedns trust bundle, both
followed as they rotate. switchboard speaks the ax fork rebased for v1.0
(mastersingh24/ax substrate-v1-12dbe16), whose own Task fields were
renumbered.

Upgrading is free for anyone not using ax agents: daemon agents, the chat
adapters and the admin API carry over unchanged, and everything ax is off
until an agent declares it. Two things to know. ax agents need that rebased
ax-server or a later one, since an older one misreads the renumbered fields,
plus deploy/components/ax-router-mtls and the pod's SPIFFE ID on ate-setup's
--ingress-allowed-spiffe-ids. And purser moves to v0.5.0, so under
--admin-auth oidc an issuer whose keys won't load now draws a 503 instead
of a 401.

Added

  • ax agents: a task per thread (#170, docs/ax-backend.md). An agent of
    kind: "ax" is an ax task template, and each conversation gets a task of
    its own on Agent Substrate.
    • switchboard creates the task, resumes it and waits for it to answer, then
      speaks the usual session contract to it through the atenet router.
    • A slow start shows in the thread.
    • The task's name is deterministic and recorded with the conversation, and
      a restart returns to it on the next message.
    • New settings: ax per agent, --gateway-id, and
      --admin-ax-template-dir for ax agents added through the admin API.
    • Idle tasks suspend (#171). An open stream would otherwise keep the
      task awake.
      • When: a conversation lets go of its streams to the task
        ax.stream_linger (default 1m, at least 10s) after its last traffic.
      • Only if: no turn is running, the agent says it is idle, and no
        approval question is waiting.
      • After: it reattaches on the next message, waking the task, and
        resumes the stream where it left off.
      • The idle reaper now also honours what the daemon reports.
    • Personal and shared agents (#172).
      • ax.scope: "owner" gives each person a task of their own, and every
        thread they start with the agent is a session in it. Its threads answer
        their owner only, messages and approval presses alike.
      • Ownership is persisted with the routing table and survives rebuilt
        sessions and scope changes. Others' messages are audited as
        not_owner.
      • "shared" is one task for everyone; startup warns.
    • Task cleanup (#173).
      • Thread tasks: a thread's task is deleted once its conversation has
        been quiet for ax.delete_after (default 14 days, 0 keeps). The
        thread's next message starts over and says why.
      • Template changes: a thread task made from an earlier template is
        replaced (ax.replace_drifted).
      • Admin API: GET /v1/agents/{name}/tasks lists an agent's tasks,
        and DELETE /v1/agents/{name}/tasks/{task} deletes one of them.
    • The router is reached over mTLS (#181). Agent Substrate v1.0's router
      serves TLS only and admits only allowlisted pod certificates.
      • ax.router defaults to
        https://atenet-router.ate-system.svc.cluster.local.
      • switchboard presents its podidentity pod certificate and verifies the
        router's certificate against the servicedns trust bundle, under the name
        atenet-router.ate-system.svc. Both files are re-read as they rotate.
      • New settings: ax.router_credential_bundle_file,
        ax.router_trust_bundle_file and ax.router_server_name. A runtime
        agent uses the defaults only.
      • A TLS handshake the router refuses, or that fails verification, ends a
        task start at once with that error rather than retrying until
        ax.ready_timeout.
      • deploy/components/ax-router-mtls mounts the two projected volumes. The
        pod's SPIFFE ID has to be on ate-setup's --ingress-allowed-spiffe-ids.
      • An explicit http:// router still works, for development and tests.
    • The rebased ax fork (#182). internal/axapi is re-vendored from
      mastersingh24/ax substrate-v1-12dbe16, the fork rebased onto
      upstream ax for Agent Substrate v1.0.
      • The fork's Task fields are renumbered (egress, http, idle and
        on_completion are now 100 to 103), so switchboard needs that
        ax-server or a later one. An older one misreads them.
      • Templates bind one workspace: instead of a workspaces: list, and
        may set config.
      • A task ax reports as Unknown because Substrate is unreachable (Ready
        reason SubstrateUnavailable) fails its start with "Agent Substrate is
        unavailable" instead of a resume attempt.
      • Templates are checked against the fork's validation at startup,
        onCompletion included.

Changed

  • purser v0.5.0 (from v0.1.0), for the pod-certificate and rotating
    trust-bundle sources the router client uses. One behaviour change reaches
    the admin API: under --admin-auth oidc, a request whose token can't be
    checked because the issuer's keys won't load now gets a 503 with
    Retry-After instead of a 401, so a client retries instead of discarding a
    good token.

Full diff: v0.8.0...v0.9.0