feat: /app-info endpoint in rest server - #1404
Open
wojtas000 wants to merge 8 commits into
Open
Conversation
wojtas000
force-pushed
the
feat/app-info-endpoint
branch
from
August 26, 2026 12:30
da6ce23 to
f604cfe
Compare
wojtas000
marked this pull request as ready for review
August 26, 2026 12:56
wojtas000
commented
Aug 26, 2026
| tsTools, err := ts.Tools(toolsetCtx) | ||
| if err != nil { | ||
| log.Printf("app-info: agent %q: skipping toolset %q: %v", agentName, ts.Name(), err) | ||
| continue |
Contributor
Author
There was a problem hiding this comment.
Comment for reviewer: is the continue behavior fine on error when loading tools from toolset? Another way would be to throw 500 on the HTTP response (even if only one toolset fails and the rest tools/toolsets succeed when loaded).
wojtas000
commented
Aug 26, 2026
| // toolsetResolveTimeout bounds the time spent resolving an agent's toolsets. | ||
| // Toolsets may reach out over the network (an MCP server, for example), and | ||
| // describing an app must not hang on one. | ||
| const toolsetResolveTimeout = 10 * time.Second |
Contributor
Author
There was a problem hiding this comment.
Value of this constant was chosen arbitrarily. But 10 seconds for toolsetResolveTimeout means that the overall timeout could be 10s * N_Toolsets, where N_Toolsets is the number of toolsets in the whole agent tree. Mabye it should be shortened?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
adk-go does not implement
GET /apps/{app_name}/app-info. It is the last endpoint from the Agents CLI wire contract that Go is missing. Agents CLI needs it in agent evaluation: it is the call that tells the CLI what anapp contains (agents, instructions, tools) before an eval run.
Solution
We implement
GET /apps/{app_name}/app-inforeturning anAppInfo: the app name, its rootagent, and a flat map of every agent reachable from that root with its
description, instruction, tools and child names. Nothing is executed - no
session, no model call.
Details worth knowing:
existing internal state seam (
llminternal.Reveal) when present; agents thatare not LLM agents report
instruction: ""andtools: [], and theirchildren are still walked.
may do I/O. A toolset that fails is logged and skipped rather than failing the
whole request.
without a declaration (built-in Gemini tools such as Google Search, and
request-shaping tools) are omitted.
Deliberate differences from adk-python
"Root agent is not an LlmAgent"—api_server.py#L1410-L1421agent_info.py#L65-L69(theisinstanceguard wraps both the recursion and the name append)subAgentscasingsub_agents(snake_case) —agent_info.py#L29-L34subAgents, per the contract's "MUST strictly emit camelCase"isComputerUseapi_server.py#L636-L642language"python", hardcoded —api_server.py#L1415"go"Testing plan
go build -mod=readonly workgo test -race -mod=readonly -count=1 -shuffle=on workgolangci-lint run— 0 issues, both modulesgo mod tidy -diff— clean, both modulesAlso checked live against a server serving six apps (simple, tooled, nested,
toolset-backed,
SequentialAgent-rooted, graph-Workflow-rooted) and diffedfield by field against adk-python's
/app-infofor the same apps. Everyremaining difference is one of the deliberate ones listed above.
Example response
GET /apps/travel_app/app-infofor one root agent with two sub-agents:{ "name": "travel_app", "rootAgentName": "travel_concierge", "description": "Plans trips end to end.", "language": "go", "agents": { "travel_concierge": { "name": "travel_concierge", "description": "Plans trips end to end.", "instruction": "Delegate flight questions and hotel questions to your sub-agents.", "tools": [], "subAgents": ["flight_agent", "hotel_agent"] }, "flight_agent": { "name": "flight_agent", "description": "Finds and books flights.", "instruction": "Search for flights matching the user's dates.", "tools": [ { "functionDeclarations": [ { "name": "search_flights", "description": "Finds flights between two airports.", "parametersJsonSchema": { "type": "object", "properties": { "origin": {"type": "string"}, "destination": {"type": "string"} }, "required": ["origin", "destination"], "additionalProperties": false } } ] } ] }, "hotel_agent": { "name": "hotel_agent", "description": "Finds and books hotels.", "instruction": "Book a hotel for the requested city and dates.", "tools": [ { "functionDeclarations": [ { "name": "book_hotel", "description": "Books a hotel in a city for a number of nights.", "parametersJsonSchema": { "type": "object", "properties": { "city": {"type": "string"}, "nights": {"type": "integer"} }, "required": ["city", "nights"], "additionalProperties": false } } ] } ] } } }