NVIDIA / NVIDIA/NeMo-Agent-Toolkit
Empty thoughts with multiple questions
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.6k
- Forks
- 762
- Avg merge
- 21h 28m
- Merged PRs (30d)
- 27
Description
Version
1.4.1
Which installation method(s) does this occur on?
No response
Describe the bug.
I am trying a simple workflow, handling multiple tools, with the following tools (register.py):
from nat.builder.builder import Builder
from nat.builder.framework_enum import LLMFrameworkEnum
from nat.builder.function_info import FunctionInfo
from nat.cli.register_workflow import register_function
from nat.data_models.function import FunctionBaseConfig
class MultiplyConfig(FunctionBaseConfig, name="demo_multiply"):
pass
@register_function(config_type=MultiplyConfig, framework_wrappers=[LLMFrameworkEnum.LANGCHAIN])
async def multiply_function(_config: MultiplyConfig, _builder: Builder):
"""Register the multiply tool."""
async def multiply(a: float, b: float) -> float:
"""Multiply two numbers together."""
return a * b
yield FunctionInfo.from_fn(multiply, description="Multiply two numbers together")
class WeatherConfig(FunctionBaseConfig, name="demo_weather"):
pass
@register_function(config_type=WeatherConfig, framework_wrappers=[LLMFrameworkEnum.LANGCHAIN])
async def weather_function(_config: WeatherConfig, _builder: Builder):
"""Register the weather tool (fake data for demo)."""
async def weather(city: str) -> str:
"""Get the current weather for a given city."""
fake_data = {
"london": "12°C, cloudy",
"new york": "8°C, sunny",
"tokyo": "18°C, light rain",
"paris": "14°C, partly cloudy",
}
return fake_data.get(city.lower(), f"22°C, clear skies in {city}")
yield FunctionInfo.from_fn(weather, description="Get the current weather for a given city")
and the following config (workflow.yml):
llms:
my_llm:
_type: openai
base_url: "https://inference-api.nvidia.com/v1"
model_name: nvidia/nvidia/Nemotron-3-Nano-30B-A3B
temperature: 0.0
max_tokens: 1024
functions:
multiply:
_type: demo_multiply
weather:
_type: demo_weather
# Simple single-agent version for testing
workflow:
_type: react_agent
tool_names: [multiply, weather]
llm_name: my_llm
verbose: true
parse_agent_response_max_retries: 3
If I ask one question, this works well:
$ nat run --config_file nat_agent/src/nat_demo_agent/configs/workflow-simple.yml --input "What is 12 times 11?"
2026-02-18 08:57:23 - INFO - nat.cli.commands.start:192 - Starting NAT from config file: 'nat_agent/src/nat_demo_agent/configs/workflow-simple.yml'
Configuration Summary:
--------------------
Workflow Type: react_agent
Number of Functions: 2
Number of Function Groups: 0
Number of LLMs: 1
Number of Embedders: 0
Number of Memory: 0
Number of Object Stores: 0
Number of Retrievers: 0
Number of TTC Strategies: 0
Number of Authentication Providers: 0
2026-02-18 08:57:24 - INFO - nat.runtime.session:298 - Shared workflow built (entry_function=None)
2026-02-18 08:57:25 - INFO - httpx:1740 - HTTP Request: POST https://inference-api.nvidia.com/v1/chat/completions "HTTP/1.1 200 OK"
2026-02-18 08:57:25 - INFO - nat.agent.react_agent.agent:171 -
------------------------------
[AGENT]
Agent input: What is 12 times 11?
Agent's thoughts:
r.
</think>
Question: What is 12 times 11?
Thought: I need to multiply 12 by 11 to get the answer.
Action: multiply
Action Input: {'a': 12, 'b': 11}
------------------------------
2026-02-18 08:57:25 - INFO - nat.agent.base:221 -
------------------------------
[AGENT]
Calling tools: multiply
Tool's input: {'a': 12, 'b': 11}
Tool's response:
132.0
------------------------------
2026-02-18 08:57:25 - INFO - httpx:1740 - HTTP Request: POST https://inference-api.nvidia.com/v1/chat/completions "HTTP/1.1 200 OK"
2026-02-18 08:57:25 - INFO - nat.agent.react_agent.agent:198 -
------------------------------
[AGENT]
Agent input: What is 12 times 11?
Agent's thoughts:
2.
</think>
Thought: I now know the final answer
Final Answer: 132
------------------------------
2026-02-18 08:57:25 - INFO - nat.front_ends.console.console_front_end_plugin:104 - --------------------------------------------------
Workflow Result:
['132']
--------------------------------------------------
If I ask two questions, it also works:
$ nat run --config_file nat_agent/src/nat_demo_agent/configs/workflow-simple.yml --input "What is 12 times 11? what's the weather in Tokyo?"
2026-02-18 08:58:07 - INFO - nat.cli.commands.start:192 - Starting NAT from config file: 'nat_agent/src/nat_demo_agent/configs/workflow-simple.yml'
Configuration Summary:
--------------------
Workflow Type: react_agent
Number of Functions: 2
Number of Function Groups: 0
Number of LLMs: 1
Number of Embedders: 0
Number of Memory: 0
Number of Object Stores: 0
Number of Retrievers: 0
Number of TTC Strategies: 0
Number of Authentication Providers: 0
2026-02-18 08:58:07 - INFO - nat.runtime.session:298 - Shared workflow built (entry_function=None)
2026-02-18 08:58:08 - INFO - httpx:1740 - HTTP Request: POST https://inference-api.nvidia.com/v1/chat/completions "HTTP/1.1 200 OK"
2026-02-18 08:58:08 - INFO - nat.agent.react_agent.agent:171 -
------------------------------
[AGENT]
Agent input: What is 12 times 11? what's the weather in Tokyo?
Agent's thoughts:
n.
</think>
Question: What is 12 times 11?
Thought: I need to compute the product of 12 and 11 using the multiply tool.
Action: multiply
Action Input: {'a': 12, 'b': 11}
------------------------------
2026-02-18 08:58:08 - INFO - nat.agent.base:221 -
------------------------------
[AGENT]
Calling tools: multiply
Tool's input: {'a': 12, 'b': 11}
Tool's response:
132.0
------------------------------
2026-02-18 08:58:09 - INFO - httpx:1740 - HTTP Request: POST https://inference-api.nvidia.com/v1/chat/completions "HTTP/1.1 200 OK"
2026-02-18 08:58:09 - INFO - nat.agent.react_agent.agent:198 -
------------------------------
[AGENT]
Agent input: What is 12 times 11? what's the weather in Tokyo?
Agent's thoughts:
o.
</think>
Question: what's the weather in Tokyo?
Thought: I need to retrieve the current weather for Tokyo using the weather tool.
Action: weather
Action Input: {'city': 'Tokyo'}
------------------------------
2026-02-18 08:58:09 - INFO - nat.agent.base:221 -
------------------------------
[AGENT]
Calling tools: weather
Tool's input: {'city': 'Tokyo'}
Tool's response:
18°C, light rain
------------------------------
2026-02-18 08:58:09 - INFO - httpx:1740 - HTTP Request: POST https://inference-api.nvidia.com/v1/chat/completions "HTTP/1.1 200 OK"
2026-02-18 08:58:09 - INFO - nat.agent.react_agent.agent:198 -
------------------------------
[AGENT]
Agent input: What is 12 times 11? what's the weather in Tokyo?
Agent's thoughts:
t.
</think>
Thought: I now know the final answer
Final Answer: 12 times 11 equals **132.0**, and the current weather in Tokyo is **18°C with light rain**.
------------------------------
2026-02-18 08:58:09 - INFO - nat.front_ends.console.console_front_end_plugin:104 - --------------------------------------------------
Workflow Result:
['12 times 11 equals **132.0**, and the current weather in Tokyo is **18°C with light rain**.']
--------------------------------------------------
If I ask 3 questions, it fails with an empty thought:
$ nat run --config_file nat_agent/src/nat_demo_agent/configs/workflow-simple.yml --input "What's 12*11? What's 10*10? What's the weather in Tokyo?"
2026-02-18 09:03:11 - INFO - nat.cli.commands.start:192 - Starting NAT from config file: 'nat_agent/src/nat_demo_agent/configs/workflow-simple.yml'
Configuration Summary:
--------------------
Workflow Type: react_agent
Number of Functions: 2
Number of Function Groups: 0
Number of LLMs: 1
Number of Embedders: 0
Number of Memory: 0
Number of Object Stores: 0
Number of Retrievers: 0
Number of TTC Strategies: 0
Number of Authentication Providers: 0
2026-02-18 09:03:12 - INFO - nat.runtime.session:298 - Shared workflow built (entry_function=None)
2026-02-18 09:03:12 - INFO - httpx:1740 - HTTP Request: POST https://inference-api.nvidia.com/v1/chat/completions "HTTP/1.1 200 OK"
2026-02-18 09:03:13 - INFO - nat.agent.react_agent.agent:171 -
------------------------------
[AGENT]
Agent input: What's 12*11? What's 10*10? What's the weather in Tokyo?
Agent's thoughts:
------------------------------
2026-02-18 09:03:13 - INFO - nat.agent.react_agent.agent:242 - [AGENT] Retrying ReAct Agent, including output parsing Observation
2026-02-18 09:03:14 - INFO - httpx:1740 - HTTP Request: POST https://inference-api.nvidia.com/v1/chat/completions "HTTP/1.1 400 Bad Request"
2026-02-18 09:03:14 - ERROR - nat.agent.react_agent.agent:246 - [AGENT] Failed to call agent_node: Error code: 400 - {'error': {'message': 'litellm.BadRequestError: OpenAIException - {"error":{"message":"request: Value error, message content cannot be empty","type":"BadRequestError","code":400}}. Received Model Group=nvidia/nvidia/Nemotron-3-Nano-30B-A3B\nAvailable Model Group Fallbacks=None', 'type': None, 'param': None, 'code': '400'}}
2026-02-18 09:03:14 - ERROR - nat.agent.react_agent.register:165 - [AGENT] ReAct Agent failed with exception: Error code: 400 - {'error': {'message': 'litellm.BadRequestError: OpenAIException - {"error":{"message":"request: Value error, message content cannot be empty","type":"BadRequestError","code":400}}. Received Model Group=nvidia/nvidia/Nemotron-3-Nano-30B-A3B\nAvailable Model Group Fallbacks=None', 'type': None, 'param': None, 'code': '400'}}
2026-02-18 09:03:14 - ERROR - nat.builder.function:206 - Error with ainvoke in function with input: What's 12*11? What's 10*10? What's the weather in Tokyo?. Error: Error code: 400 - {'error': {'message': 'litellm.BadRequestError: OpenAIException - {"error":{"message":"request: Value error, message content cannot be empty","type":"BadRequestError","code":400}}. Received Model Group=nvidia/nvidia/Nemotron-3-Nano-30B-A3B\nAvailable Model Group Fallbacks=None', 'type': None, 'param': None, 'code': '400'}}
2026-02-18 09:03:14 - ERROR - nat.runtime.runner:231 - Error running workflow: Error code: 400 - {'error': {'message': 'litellm.BadRequestError: OpenAIException - {"error":{"message":"request: Value error, message content cannot be empty","type":"BadRequestError","code":400}}. Received Model Group=nvidia/nvidia/Nemotron-3-Nano-30B-A3B\nAvailable Model Group Fallbacks=None', 'type': None, 'param': None, 'code': '400'}}
2026-02-18 09:03:14 - ERROR - nat.cli.commands.start:243 - Failed to initialize workflow
Error: Error code: 400 - {'error': {'message': 'litellm.BadRequestError: OpenAIException - {"error":{"message":"request: Value error, message content cannot be empty","type":"BadRequestError","code":400}}. Received Model Group=nvidia/nvidia/Nemotron-3-Nano-30B-A3B\nAvailable Model Group Fallbacks=None', 'type': None, 'param': None, 'code': '400'}}
... but not always:
$ nat run --config_file nat_agent/src/nat_demo_agent/configs/workflow-simple.yml --input "What is 12 times 11? what's the weather in Tokyo? what is the weather in Paris?"
2026-02-18 09:04:05 - INFO - nat.cli.commands.start:192 - Starting NAT from config file: 'nat_agent/src/nat_demo_agent/configs/workflow-simple.yml'
Configuration Summary:
--------------------
Workflow Type: react_agent
Number of Functions: 2
Number of Function Groups: 0
Number of LLMs: 1
Number of Embedders: 0
Number of Memory: 0
Number of Object Stores: 0
Number of Retrievers: 0
Number of TTC Strategies: 0
Number of Authentication Providers: 0
2026-02-18 09:04:05 - INFO - nat.runtime.session:298 - Shared workflow built (entry_function=None)
2026-02-18 09:04:06 - INFO - httpx:1740 - HTTP Request: POST https://inference-api.nvidia.com/v1/chat/completions "HTTP/1.1 200 OK"
2026-02-18 09:04:06 - INFO - nat.agent.react_agent.agent:171 -
------------------------------
[AGENT]
Agent input: What is 12 times 11? what's the weather in Tokyo? what is the weather in Paris?
Agent's thoughts:
y.
</think>
Question: What is 12 times 11? what's the weather in Tokyo? what is the weather in Paris?
Thought: I need to compute 12 × 11 first, then get the current weather for Tokyo and Paris. I'll start with the multiplication.
Action: multiply
Action Input: {'a': 12, 'b': 11}
------------------------------
2026-02-18 09:04:06 - INFO - nat.agent.base:221 -
------------------------------
[AGENT]
Calling tools: multiply
Tool's input: {'a': 12, 'b': 11}
Tool's response:
132.0
------------------------------
2026-02-18 09:04:06 - INFO - httpx:1740 - HTTP Request: POST https://inference-api.nvidia.com/v1/chat/completions "HTTP/1.1 200 OK"
2026-02-18 09:04:06 - INFO - nat.agent.react_agent.agent:198 -
------------------------------
[AGENT]
Agent input: What is 12 times 11? what's the weather in Tokyo? what is the weather in Paris?
Agent's thoughts:
t.
</think>
Question: What is the current weather in Tokyo?
Thought: I need to retrieve the current weather for Tokyo using the weather tool.
Action: weather
Action Input: {'city': 'Tokyo'}
------------------------------
2026-02-18 09:04:06 - INFO - nat.agent.base:221 -
------------------------------
[AGENT]
Calling tools: weather
Tool's input: {'city': 'Tokyo'}
Tool's response:
18°C, light rain
------------------------------
2026-02-18 09:04:08 - INFO - httpx:1740 - HTTP Request: POST https://inference-api.nvidia.com/v1/chat/completions "HTTP/1.1 200 OK"
2026-02-18 09:04:08 - INFO - nat.agent.react_agent.agent:198 -
------------------------------
[AGENT]
Agent input: What is 12 times 11? what's the weather in Tokyo? what is the weather in Paris?
Agent's thoughts:
l.
</think>
Question: What is the current weather in Paris?
Thought: I need to retrieve the current weather for Paris using the weather tool.
Action: weather
Action Input: {'city': 'Paris'}
------------------------------
2026-02-18 09:04:08 - INFO - nat.agent.base:221 -
------------------------------
[AGENT]
Calling tools: weather
Tool's input: {'city': 'Paris'}
Tool's response:
14°C, partly cloudy
------------------------------
2026-02-18 09:04:09 - INFO - httpx:1740 - HTTP Request: POST https://inference-api.nvidia.com/v1/chat/completions "HTTP/1.1 200 OK"
2026-02-18 09:04:09 - INFO - nat.agent.react_agent.agent:198 -
------------------------------
[AGENT]
Agent input: What is 12 times 11? what's the weather in Tokyo? what is the weather in Paris?
Agent's thoughts:
r.
</think>
Thought: I now know the final answer.
Final Answer:
- 12 times 11 equals **132**.
- The current weather in **Tokyo** is **18 °C, light rain**.
- The current weather in **Paris** is **14 °C, partly cloudy**.
------------------------------
2026-02-18 09:04:09 - INFO - nat.front_ends.console.console_front_end_plugin:104 - --------------------------------------------------
Workflow Result:
['- 12 times 11 equals **132**. \n- The current weather in **Tokyo** is **18\u202f°C, light rain**. \n- The current weather in **Paris** is **14\u202f°C, partly cloudy**.']
The "funny" things is that it works with "Paris" but not "paris", never with London, whatever the case.
I have tried different things (system prompt, playing with additional parameters, etc.) with no success.
Minimum reproducible example
Relevant log output
No response
Other/Misc.
No response
Code of Conduct
- I agree to follow the NeMo Agent Toolkit Code of Conduct
- I have searched the open bugs and have found no duplicates for this bug report
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the react agent entry points shown in nat.agent.react_agent.agent and reproduce the three-question command using workflow-simple.yml, register.py, and the listed workflow.yml configuration. Trace the empty thought and retry path around the logged agent_node and output-parsing messages. Done means the same multi-question input no longer produces an empty message or the shown 400 error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ai
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100