What happened?
When create a basic default agent and modify the root agent instructions, the playgound works as expected but running the cmdline version returns output from the tools exactly as returned, bypassing the root agent instructions.
Steps to Reproduce
- Run
agents-cli create my-first-agent --prototype --yes
cd my-first-agent
agents-cli install
- Edit app/agent.py and change the root agent instructions. In my case I added "You talk like a pirate"
- Run the playground with
agents-cli playground and ask about the weather in San Fancisco. You get an appropriate pirate response.
- Stop the server and run the cmdline version
agents-cli run "What's the weather in San Francisco?"
Using project root directory: /Users/gbmerrall/Code/sandbox/agent_cli/my-agent
[user]: What's the weather in San Francisco?
[root_agent]: It's 60 degrees and foggy.
What did you expect to happen?
The cmdline version should use the root agent instructions and return the apprpriate response. In my case, pirate speak
Client information
Client Information
CLI version: 0.1.1
CLI install path: /Users/gbmerrall/.local/share/uv/tools/google-agents-cli/lib/python3.12/site-packages/google/agents/cli
Installed skills: none
Project root: /Users/graeme/Code/sandbox/agent_cli/my-agent
Project name: my-agent
Deployment target: none
Agent directory: app
Region: us-east1
Command Output / Logs
$ agents-cli run --verbose "What's the weather in San Francisco?"
Using project root directory: /Users/gbmerrall/Code/sandbox/agent_cli/my-agent
[user]: What's the weather in San Francisco?
[root_agent]:
{
"modelVersion": "gemini-flash-latest",
"content": {
"parts": [
{
"functionCall": {
"id": "adk-23300ce5-193c-4675-b6b1-6e51c31a8ef1",
"args": {
"query": "San Francisco"
},
"name": "get_weather"
}
}
],
"role": "model"
},
"finishReason": "STOP",
"usageMetadata": {
"candidatesTokenCount": 10,
"candidatesTokensDetails": [
{
"modality": "TEXT",
"tokenCount": 10
}
],
"promptTokenCount": 154,
"promptTokensDetails": [
{
"modality": "TEXT",
"tokenCount": 154
}
],
"totalTokenCount": 164,
"trafficType": "ON_DEMAND"
},
"avgLogprobs": -0.04148182570934296,
"invocationId": "e-17683ff1-7654-4269-b3e5-2f7490ad18ea",
"author": "root_agent",
"actions": {
"stateDelta": {},
"artifactDelta": {},
"requestedAuthConfigs": {},
"requestedToolConfirmations": {}
},
"longRunningToolIds": [],
"id": "38fc68ad-c7a6-4747-9f3a-1f0ccd6116b2",
"timestamp": 1776992831.916116
}
{
"content": {
"parts": [
{
"functionResponse": {
"id": "adk-23300ce5-193c-4675-b6b1-6e51c31a8ef1",
"name": "get_weather",
"response": {
"result": "It's 60 degrees and foggy."
}
}
}
],
"role": "user"
},
"invocationId": "e-17683ff1-7654-4269-b3e5-2f7490ad18ea",
"author": "root_agent",
"actions": {
"stateDelta": {},
"artifactDelta": {},
"requestedAuthConfigs": {},
"requestedToolConfirmations": {}
},
"id": "231eeac7-af78-468f-98fd-6c73fbc17f11",
"timestamp": 1776992834.07905
}
The weather in San Francisco is 60 degrees and foggy.
{
"modelVersion": "gemini-flash-latest",
"content": {
"parts": [
{
"text": "The weather in San Francisco is 60 degrees and foggy."
}
],
"role": "model"
},
"finishReason": "STOP",
"usageMetadata": {
"candidatesTokenCount": 13,
"candidatesTokensDetails": [
{
"modality": "TEXT",
"tokenCount": 13
}
],
"promptTokenCount": 174,
"promptTokensDetails": [
{
"modality": "TEXT",
"tokenCount": 174
}
],
"totalTokenCount": 187,
"trafficType": "ON_DEMAND"
},
"avgLogprobs": -0.025818485480088454,
"invocationId": "e-17683ff1-7654-4269-b3e5-2f7490ad18ea",
"author": "root_agent",
"actions": {
"stateDelta": {},
"artifactDelta": {},
"requestedAuthConfigs": {},
"requestedToolConfirmations": {}
},
"id": "76eadd2c-4fca-48fc-ad35-f79372933bb1",
"timestamp": 1776992834.083573
}
Session: 2784b6c7-0b19-4794-8578-d361905ba14c (resume with --session-id)
Anything else we need to know?
No response
What happened?
When create a basic default agent and modify the root agent instructions, the playgound works as expected but running the cmdline version returns output from the tools exactly as returned, bypassing the root agent instructions.
Steps to Reproduce
agents-cli create my-first-agent --prototype --yescd my-first-agentagents-cli installagents-cli playgroundand ask about the weather in San Fancisco. You get an appropriate pirate response.What did you expect to happen?
The cmdline version should use the root agent instructions and return the apprpriate response. In my case, pirate speak
Client information
Client Information
CLI version: 0.1.1 CLI install path: /Users/gbmerrall/.local/share/uv/tools/google-agents-cli/lib/python3.12/site-packages/google/agents/cli Installed skills: noneProject root: /Users/graeme/Code/sandbox/agent_cli/my-agent
Project name: my-agent
Deployment target: none
Agent directory: app
Region: us-east1
Command Output / Logs
$ agents-cli run --verbose "What's the weather in San Francisco?"
Using project root directory: /Users/gbmerrall/Code/sandbox/agent_cli/my-agent
[user]: What's the weather in San Francisco?
[root_agent]:
{
"modelVersion": "gemini-flash-latest",
"content": {
"parts": [
{
"functionCall": {
"id": "adk-23300ce5-193c-4675-b6b1-6e51c31a8ef1",
"args": {
"query": "San Francisco"
},
"name": "get_weather"
}
}
],
"role": "model"
},
"finishReason": "STOP",
"usageMetadata": {
"candidatesTokenCount": 10,
"candidatesTokensDetails": [
{
"modality": "TEXT",
"tokenCount": 10
}
],
"promptTokenCount": 154,
"promptTokensDetails": [
{
"modality": "TEXT",
"tokenCount": 154
}
],
"totalTokenCount": 164,
"trafficType": "ON_DEMAND"
},
"avgLogprobs": -0.04148182570934296,
"invocationId": "e-17683ff1-7654-4269-b3e5-2f7490ad18ea",
"author": "root_agent",
"actions": {
"stateDelta": {},
"artifactDelta": {},
"requestedAuthConfigs": {},
"requestedToolConfirmations": {}
},
"longRunningToolIds": [],
"id": "38fc68ad-c7a6-4747-9f3a-1f0ccd6116b2",
"timestamp": 1776992831.916116
}
{
"content": {
"parts": [
{
"functionResponse": {
"id": "adk-23300ce5-193c-4675-b6b1-6e51c31a8ef1",
"name": "get_weather",
"response": {
"result": "It's 60 degrees and foggy."
}
}
}
],
"role": "user"
},
"invocationId": "e-17683ff1-7654-4269-b3e5-2f7490ad18ea",
"author": "root_agent",
"actions": {
"stateDelta": {},
"artifactDelta": {},
"requestedAuthConfigs": {},
"requestedToolConfirmations": {}
},
"id": "231eeac7-af78-468f-98fd-6c73fbc17f11",
"timestamp": 1776992834.07905
}
The weather in San Francisco is 60 degrees and foggy.
{
"modelVersion": "gemini-flash-latest",
"content": {
"parts": [
{
"text": "The weather in San Francisco is 60 degrees and foggy."
}
],
"role": "model"
},
"finishReason": "STOP",
"usageMetadata": {
"candidatesTokenCount": 13,
"candidatesTokensDetails": [
{
"modality": "TEXT",
"tokenCount": 13
}
],
"promptTokenCount": 174,
"promptTokensDetails": [
{
"modality": "TEXT",
"tokenCount": 174
}
],
"totalTokenCount": 187,
"trafficType": "ON_DEMAND"
},
"avgLogprobs": -0.025818485480088454,
"invocationId": "e-17683ff1-7654-4269-b3e5-2f7490ad18ea",
"author": "root_agent",
"actions": {
"stateDelta": {},
"artifactDelta": {},
"requestedAuthConfigs": {},
"requestedToolConfirmations": {}
},
"id": "76eadd2c-4fca-48fc-ad35-f79372933bb1",
"timestamp": 1776992834.083573
}
Session: 2784b6c7-0b19-4794-8578-d361905ba14c (resume with --session-id)
Anything else we need to know?
No response