Can nodes use other argument names than node_input?
- Dominant language
- Shell
- Stars
- 1.5k
- Forks
- 1.3k
- Avg merge
- 7d 1h
- Merged PRs (30d)
- 34
Description
https://github.com/google/adk-docs/blob/ab749867b0445b51da40dad69f079180c9c87df6/docs/graphs/dynamic.md?plain=1#L247-L265
Test code:
```
@node
def city_time_function(city: str):
return "Hello"
@node(rerun_on_resume=True)
async def city_workflow(ctx: Context):
city_time = await ctx.run_node(city_time_function, "Paris")
return city_time
session_service = InMemorySessionService()
session = await session_service.create_session(app_name=APP_NAME, user_id=USER_ID, session_id=SESSION_ID)
runner = Runner(agent=city_workflow, app_name=APP_NAME, session_service=session_service)
content = types.Content(role='user', parts=[types.Part(text="hello")])
events = runner.run(user_id=USER_ID, session_id=SESSION_ID, new_message=content)
for event in events:
pass
```
Error:
```
ValueError: Missing value for parameter "city" of function "city_time_function". It was not found in state and has no default value.
```
Changeing to node_input works:
```
@node
def city_time_function(node_input: str):
return "Hello"
```
Python 3.14.6
google-adk==2.6.3
Contributor guide
Research direction
Start with the linked docs/graphs/dynamic.md section at lines 247-265 and reproduce the supplied Python example using @node and ctx.run_node. Determine whether a parameter named city should be supported or whether the documentation must require node_input; done when the behavior and usage are made consistent and verified against the example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100