Skip to content

Always output empty and show "UNKNOWN_ERROR" #365

@2winter-dev

Description

@2winter-dev

Describe the bug

Always output empty and show "UNKNOWN_ERROR"

To Reproduce

import {FunctionTool, LlmAgent} from '@google/adk';
import {z} from 'zod';

/* Mock tool implementation */
const getCurrentTime = new FunctionTool({
  name: 'get_current_time',
  description: 'Returns the current time in a specified city.',
  parameters: z.object({
    city: z.string().describe("The name of the city for which to retrieve the current time."),
  }),
  execute: ({city}) => {
    return {status: 'success', report: `The current time in ${city} is 10:30 AM`};
  },
});

export const rootAgent = new LlmAgent({
  name: 'hello_time_agent',
  model: 'gemini-2.0-flash',
  description: 'Tells the current time in a specified city.',
  instruction: `You are a helpful assistant that tells the current time in a city.
                Use the 'getCurrentTime' tool for this purpose.`,
  tools: [getCurrentTime],
});

npx adk run agent.ts

Expected behavior
output something

Screenshots

Image

Desktop (please complete the following information):

osx26.5

Additional context

{ "name": "adk_demo", "version": "1.0.0", "main": "agent.ts", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], "author": "", "license": "ISC", "description": "", "type": "module", "dependencies": { "@google/adk": "^1.1.0" }, "devDependencies": { "@google/adk-devtools": "^1.1.0" } }

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingrequest clarification[Status] The maintainer need clarification or more information from the author

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions