Skip to content

Agentao 0.5.21

Choose a tag to compare

@jin-bo jin-bo released this 15 Nov 12:24
24f975a

Agentao 0.5.21

This release replaces the web_search backends. The chain is now
deepseek → tavily → jina, and bocha and duckduckgo are retired.
Keyless DuckDuckGo answered every query with a captcha (measured 2026-07-22),
so on an install without a search key the tool always failed. Every backend now
needs a key, and with none the tool is not offered to the model at all. The
search keys are also kept out of child processes. Four changes behave
differently on upgrade; see Behaviour changes.

New backends

  • deepseek calls DeepSeek's Search API. It reuses your chat key
    DEEPSEEK_API_KEY, but only when DEEPSEEK_BASE_URL is an https URL on
    api.deepseek.com (port 443, no credentials in the URL). A key behind a
    proxy or gateway does not turn on search; an INFO line in agentao.log
    names the variables, never their values. The Search API URL is fixed and
    never derived from the base URL.
  • tavily uses TAVILY_API_KEY. It returns the result list, not an LLM
    summary (include_answer: false), and at most the documented 20 results.
  • jina is unchanged and still needs JINA_API_KEY.

A backend that errors falls back to the next one, and the result says so. An
empty result ends the chain. A host pins one backend with
WebSearchTool(backend=...), which turns fallback off, and passes keys with
deepseek_api_key=, tavily_api_key= and jina_api_key=.
WebSearchTool.backends gives the resolved chain.

Two details were measured against the live APIs on 2026-11-15:

  • DeepSeek's 128-character query limit counts code points, as Python's
    len() does. A longer query is refused before the request, not cut, and
    the chain falls back.
  • DeepSeek's date field is not shown to the model, because some values are
    wrong: python.org's 3.13.13 release page, released in April 2026, came back
    dated 2013-03-12. The raw value goes to the DEBUG log.

Behaviour changes

  • bocha and duckduckgo are retired. WebSearchTool(backend="bocha")
    and backend="duckduckgo" raise ValueError, WebSearchTool(api_key=...)
    (the Bocha key) raises TypeError, and BOCHA_API_KEY is no longer read.
    Set TAVILY_API_KEY or JINA_API_KEY, or point DEEPSEEK_BASE_URL at
    https://api.deepseek.com. A host that passed a Bocha key passes
    tavily_api_key= or deepseek_api_key= instead.
  • With no search key, web_search is not registered. The model is no
    longer offered a tool that could only return an error after a confirmation
    prompt. The reason is logged once per process. Naming web_search in
    disable_tools or enabled_tools stays legal.
  • web_search no longer needs the [web] extra. No backend parses HTML,
    so a bare pip install agentao with a search key gets the tool. web_fetch
    still needs [web].
  • TAVILY_API_KEY and JINA_API_KEY no longer reach child processes.
    Like the provider keys, they are dropped from the environment of shell,
    MCP, ACP and hook children, so a prompt-injected env cannot print them.
    A search key a host passes to WebSearchTool is dropped by value too,
    whatever variable holds it. The tools themselves are unaffected. If
    something run by the agent calls Tavily or Jina itself:
    • an MCP or ACP server gets the key in its env block:
      "env": {"TAVILY_API_KEY": "$TAVILY_API_KEY"};
    • a script in the agent's shell, or a hook, needs
      AGENTAO_SCRUB_CHILD_ENV=0, because neither takes an env.

Other changes

  • The configuration notes ("web_search omitted", a non-official
    DEEPSEEK_BASE_URL) are logged once per process instead of on every
    Agentao and sub-agent construction.
  • When the host disables web_search, leaves it out of enabled_tools, or
    supplies its own through extra_tools, the default tool is not built. A
    host's own web_search therefore no longer logs the "overrides an
    already-registered tool" line.
  • Multi-line search snippets are shown on one line.

See CHANGELOG.md for the full entries.