Skip to content

librarian v0.22.0

Choose a tag to compare

@github-actions github-actions released this 17 Nov 07:01
· 17 commits to main since this release

Behind agentgateway

  • Tested behind agentgateway v1.7.0, as an MCP server and as an A2A agent, with nothing changed in librarian. Two arrangements: each agent's own key passes through, or the gateway signs people in and passes their token on, which librarian verifies itself, so it knows the person with proof and not on the gateway's word. The stack runs in the weekly integration workflow.
  • On Kubernetes the chart attaches librarian to your Gateway: agentgateway.enabled and agentgateway.gateway.name create an HTTPRoute and two AgentgatewayBackends (MCP at /mcp, A2A on every other path). Run on kind with agentgateway v1.7.0 and Gateway API v1.6.3. The sign-in arrangement is tested standalone, not as an AgentgatewayPolicy on Kubernetes.
  • Configuration and what to know behind it.

On kagent

  • An agent can wait for a person. Nothing can wake a kagent session when an approval arrives. write_status now takes wait_seconds: it answers as soon as the write or plan has ended, or after that time with where it stands (at most mcp_max_wait_seconds, 50). The answer to a write that waits says so itself. It works across replicas: the agent can wait on one while another makes the write.
  • Tested on kagent 1.0.1, on its default harness and its Claude-based one: a plan of two writes approved once and waited for in one tool call, an agent given only some of the tools, and kagent's own approval (requireApproval) in front of librarian's.
  • What kagent says about the person, shown as what it is. kagent can send the signed-in user's name in a header that nothing signs, set in the sandbox where the agent itself runs commands. With substrate.claimed_user_header: X-User-Id (chart: substrate.kagent.claimedUserHeader) the approval page, the Slack card and the audit trail say: "The agent's platform names kim@example.com: nothing signs that, and it does not make them the requester." It is never the requester and never reaches an API that acts as the person. Off by default.
  • A skill for agents. skills/librarian is an Agent Skill that tells an agent how to read through librarian, how to ask for a change and wait for the person, and what each answer means. It is also in the image, at /skills/librarian, which is where a kagent Agent takes it from, by digest: oci: ghcr.io/kultar/librarian@sha256:a8ad876192a6e4da9ac89a852ef4265238c462c5fe32ef81a3d82788885c18f8 (this release), path: skills/librarian. Run on kagent 1.0.1: given only "add the comment … to record 42", an agent with the skill found the operation, asked for the write with a reason, waited for the approval and finished in the same turn. (kagent 1.0.1 could not take it from git: the sandbox in which an Agent is prepared could not resolve the git host.)

For every agent

  • An answer too large to send comes back as its outline. Over MCP a tool result carries an answer twice (structured and as text). Past about 1 MB as sent, MCP clients and gateways refuse it and say only that a message could not be sent. execute now answers too_large with the fields of the answer and how many items its lists have, and the agent asks again with select. The limit is mcp_max_result_bytes (1,000,000; 0 turns it off). This changes a default: answers above about 480 KB of data used to be sent whole.
  • capabilities names the operations that write. It listed reads only, so an agent could not find out which operation makes a change. Where an agent may ask for writes on an API it now also gets write_operations, held to its limits like the reads, each with whether anybody has enabled writes through it.
  • In the MCP Registry as io.github.kultar/librarian, with the PyPI package (uvx librarian-a2a serve; librarian-a2a is now a second name for the command) and the image.

Fixed

  • Nothing an agent or an API wrote is read as markup by Slack. An agent's reason, its arguments, the name of an API it onboarded and an API's error text went into the cards as they were; <!channel> would have pinged a channel, and <https://...|Approve here> would have been a link with those words. Every text is now escaped where it leaves for Slack, and only librarian's own mentions and links are markup.
  • Stopping could hang. librarian closed its database while writes asked for without waiting were still being waited for; on SQLite the process could then fail to exit. It now ends those tasks first. (They are picked up again at the next start, as before.)
  • Onboarding with no database and a registry folder that cannot be written to failed with "Error executing tool onboard". It now says that there is nowhere to keep what was learned, and which settings change that.

Documentation

  • The README names every command, every setting with its default, every tool and skill and every kind of authentication; the chart's README describes every value. Tests fail when one is missing, stale or shown with a wrong default.
  • New: a README section on gateways and agent platforms, guides for agentgateway and kagent, troubleshooting for both, and what the threat model says about gateways, Slack text and unsigned claims.

Upgrade

  • No configuration changes are needed.
  • If an agent reads answers of more than about 480 KB of data over MCP, it now gets too_large and has to ask for less with select. To keep the old behaviour set mcp_max_result_bytes: 0, and raise the limits of what is in between (agentgateway: frontendPolicies.http.maxBufferSize).
  • If a gateway or an MCP client in front of librarian has a request timeout under 50 seconds, set mcp_max_wait_seconds below it, or agents that wait for a decision fail there first.
  • Finish the rollout before agents use wait_seconds: a replica still on 0.21 does not know the argument.
  • Agents that may ask for writes now see the names and summaries of the operations that write on those APIs.