Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/attachment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.CORE_AGENT,
attachment=file,
)

Expand Down
2 changes: 1 addition & 1 deletion examples/choose_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +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.GENERALIST)
response = await window.agent(prompt="Tell me a joke.", agent=Agent.CORE_AGENT)

print("Response:", response.model_dump_json(indent=2))

Expand Down
2 changes: 1 addition & 1 deletion examples/complex_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.CORE_AGENT,
output_schema=Papers,
)

Expand Down
6 changes: 3 additions & 3 deletions examples/conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.CORE_AGENT,
# By default, the chat history is cleared when an agent is invoked so that the agent can
# start fresh.
clear_chat=True,
Expand All @@ -20,15 +20,15 @@ async def main() -> None:

resp = await window.agent(
prompt="What did you pick again?",
agent=Agent.GENERALIST,
agent=Agent.CORE_AGENT,
# By not clearing the chat history, we can continue the conversation.
clear_chat=False,
)
print(resp.text)

resp = await window.agent(
prompt="What's double that number?",
agent=Agent.GENERALIST,
agent=Agent.CORE_AGENT,
# By not clearing the chat history, we can continue the conversation.
clear_chat=False,
)
Expand Down
6 changes: 3 additions & 3 deletions packages/narada-core/src/narada_core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down Expand Up @@ -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

Expand Down
Loading