Skip to content

fix(agents): warn when a database agent is built without a description - #84

Open
antiv wants to merge 1 commit into
mainfrom
claude/issue-79-empty-description
Open

fix(agents): warn when a database agent is built without a description#84
antiv wants to merge 1 commit into
mainfrom
claude/issue-79-empty-description

Conversation

@antiv

@antiv antiv commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Closes #79

Problem

AgentManager._initialize_agent falls back to an empty string when a database-backed agent config has no description, and passes it straight to the constructor for every agent type.

ADK uses description as the routing signal when a parent LLM agent decides which sub-agent to delegate to. An agent built with description='' still constructs, still appears in the tree, but the parent has nothing to route on — so delegation to it degrades silently. No error, no log line, nothing in the dashboard.

description is nullable=True on agents_config and nothing in the dashboard or API requires it, so this is a normal reachable state rather than an edge case.

Change

Option 1 from the issue: log a warning at build time in shared/utils/agent_manager.py, right where the fallback happens, so the problem surfaces at startup instead of at delegation time.

The warning is scoped to agents that have sub-agents or are themselves sub-agents — both directions named in the issue. A lone root agent delegates nowhere and would only add noise to every start.

Deliberately not included: a derived fallback description (option 2) would steer ADK's routing with invented text nobody asked for, and a dashboard validation warning (option 3) is a separate frontend change. Behaviour is otherwise unchanged — nothing is rejected, nothing is rewritten.

Tests

New shared/test/test_agent_description_warning.py (4 tests):

  • agent with sub-agents and no description → warns, and still builds
  • agent that is itself a sub-agent with no description → warns
  • lone root agent with no description → stays quiet
  • agent with a description → stays quiet

Full suite: 729 tests, all passing.

🤖 Generated with Claude Code

`description` is nullable on agents_config and nothing requires it, so an
agent built with `description=''` is a normal reachable state — not an edge
case. ADK uses that field as the routing signal when a parent LLM agent picks
a sub-agent to delegate to, so an empty one degrades delegation silently: the
agent constructs fine, shows up in the tree, and is simply never routed to.
No error, no log line, nothing in the dashboard.

Log a warning at build time when an agent inside a tree resolves to an empty
description, so it surfaces at startup rather than at delegation time. Scoped
to agents that have sub-agents or are themselves sub-agents — a lone root
agent delegates nowhere and would only add noise to every start.

Behaviour is otherwise unchanged: no derived fallback description, since
invented text would steer ADK's routing in a way nobody asked for.

Closes #79

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agents with no description are built with description='' and delegate poorly

1 participant