From 5aed4ea232e9e7fbfbbb7efb0995e153438db034 Mon Sep 17 00:00:00 2001 From: Pavlo Haidar Date: Fri, 13 Mar 2026 14:49:23 +0200 Subject: [PATCH 1/2] Rename Generalist agent to Productivity agent --- examples/attachment.py | 2 +- examples/choose_agent.py | 4 +++- examples/complex_workflow.py | 2 +- examples/conversation.py | 6 +++--- packages/narada-core/src/narada_core/models.py | 6 +++--- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/examples/attachment.py b/examples/attachment.py index 8568cdd..3897cc2 100644 --- a/examples/attachment.py +++ b/examples/attachment.py @@ -16,7 +16,7 @@ async def main() -> None: # Ask the agent to use the attachment. response = await window.agent( prompt="Summarize the attached file.", - agent=Agent.GENERALIST, + agent=Agent.PRODUCTIVITY, attachment=file, ) diff --git a/examples/choose_agent.py b/examples/choose_agent.py index baa4fc6..3263575 100644 --- a/examples/choose_agent.py +++ b/examples/choose_agent.py @@ -10,7 +10,9 @@ async def main() -> None: window = await narada.open_and_initialize_browser_window() # Choose a specific agent to handle the task. By default, the Operator agent is used. - response = await window.agent(prompt="Tell me a joke.", agent=Agent.GENERALIST) + response = await window.agent( + prompt="Tell me a joke.", agent=Agent.PRODUCTIVITY + ) print("Response:", response.model_dump_json(indent=2)) diff --git a/examples/complex_workflow.py b/examples/complex_workflow.py index 86395a7..70f0dc1 100644 --- a/examples/complex_workflow.py +++ b/examples/complex_workflow.py @@ -23,7 +23,7 @@ async def main() -> None: resp = await window.agent( prompt="What are the top 2 AI papers based on the current page?", - agent=Agent.GENERALIST, + agent=Agent.PRODUCTIVITY, output_schema=Papers, ) diff --git a/examples/conversation.py b/examples/conversation.py index d9d8ad7..748da8f 100644 --- a/examples/conversation.py +++ b/examples/conversation.py @@ -11,7 +11,7 @@ async def main() -> None: resp = await window.agent( prompt="Pick a lucky number for me between 1 and 100", - agent=Agent.GENERALIST, + agent=Agent.PRODUCTIVITY, # By default, the chat history is cleared when an agent is invoked so that the agent can # start fresh. clear_chat=True, @@ -20,7 +20,7 @@ async def main() -> None: resp = await window.agent( prompt="What did you pick again?", - agent=Agent.GENERALIST, + agent=Agent.PRODUCTIVITY, # By not clearing the chat history, we can continue the conversation. clear_chat=False, ) @@ -28,7 +28,7 @@ async def main() -> None: resp = await window.agent( prompt="What's double that number?", - agent=Agent.GENERALIST, + agent=Agent.PRODUCTIVITY, # By not clearing the chat history, we can continue the conversation. clear_chat=False, ) diff --git a/packages/narada-core/src/narada_core/models.py b/packages/narada-core/src/narada_core/models.py index 0e3ca3b..8e03292 100644 --- a/packages/narada-core/src/narada_core/models.py +++ b/packages/narada-core/src/narada_core/models.py @@ -7,13 +7,13 @@ class Agent(Enum): - GENERALIST = 1 + PRODUCTIVITY = 1 OPERATOR = 2 CORE_AGENT = 3 def prompt_prefix(self) -> str: match self: - case Agent.GENERALIST: + case Agent.PRODUCTIVITY: return "" case Agent.OPERATOR: return "/Operator " @@ -99,7 +99,7 @@ class PrintTrace(TypedDict): class AgentTrace(TypedDict): step_type: Literal["agent"] url: str - agent_type: str # e.g., 'operator', 'generalist', 'coreAgent', etc. + agent_type: str # e.g., 'operator', 'productivity', 'coreAgent', etc. action_trace: ActionTrace text: str # For non-operator agents From 502d8b75a54da01eec966a9fcd6f08731e70f738 Mon Sep 17 00:00:00 2001 From: Zizheng Tai Date: Tue, 17 Mar 2026 10:39:47 -0700 Subject: [PATCH 2/2] Fix examples --- examples/attachment.py | 2 +- examples/choose_agent.py | 4 +--- examples/complex_workflow.py | 2 +- examples/conversation.py | 6 +++--- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/examples/attachment.py b/examples/attachment.py index 3897cc2..ddaf929 100644 --- a/examples/attachment.py +++ b/examples/attachment.py @@ -16,7 +16,7 @@ async def main() -> None: # Ask the agent to use the attachment. response = await window.agent( prompt="Summarize the attached file.", - agent=Agent.PRODUCTIVITY, + agent=Agent.CORE_AGENT, attachment=file, ) diff --git a/examples/choose_agent.py b/examples/choose_agent.py index 3263575..28ccea6 100644 --- a/examples/choose_agent.py +++ b/examples/choose_agent.py @@ -10,9 +10,7 @@ async def main() -> None: window = await narada.open_and_initialize_browser_window() # Choose a specific agent to handle the task. By default, the Operator agent is used. - response = await window.agent( - prompt="Tell me a joke.", agent=Agent.PRODUCTIVITY - ) + response = await window.agent(prompt="Tell me a joke.", agent=Agent.CORE_AGENT) print("Response:", response.model_dump_json(indent=2)) diff --git a/examples/complex_workflow.py b/examples/complex_workflow.py index 70f0dc1..149b045 100644 --- a/examples/complex_workflow.py +++ b/examples/complex_workflow.py @@ -23,7 +23,7 @@ async def main() -> None: resp = await window.agent( prompt="What are the top 2 AI papers based on the current page?", - agent=Agent.PRODUCTIVITY, + agent=Agent.CORE_AGENT, output_schema=Papers, ) diff --git a/examples/conversation.py b/examples/conversation.py index 748da8f..2611117 100644 --- a/examples/conversation.py +++ b/examples/conversation.py @@ -11,7 +11,7 @@ async def main() -> None: resp = await window.agent( prompt="Pick a lucky number for me between 1 and 100", - agent=Agent.PRODUCTIVITY, + agent=Agent.CORE_AGENT, # By default, the chat history is cleared when an agent is invoked so that the agent can # start fresh. clear_chat=True, @@ -20,7 +20,7 @@ async def main() -> None: resp = await window.agent( prompt="What did you pick again?", - agent=Agent.PRODUCTIVITY, + agent=Agent.CORE_AGENT, # By not clearing the chat history, we can continue the conversation. clear_chat=False, ) @@ -28,7 +28,7 @@ async def main() -> None: resp = await window.agent( prompt="What's double that number?", - agent=Agent.PRODUCTIVITY, + agent=Agent.CORE_AGENT, # By not clearing the chat history, we can continue the conversation. clear_chat=False, )