Skip to content

AttributeError: module 'planner_agent' has no attribute 'handoffs' #596

Closed
@harshrpg

Description

@harshrpg

Question

I am trying to recreate the financial_research_agent on my own. However when I define the planner agent as below:

PROMPT = (
    "You are a financial research planner. Given a request for financial analysis, "
    "produce a set of web searches to gather the context needed. Aim for recent "
    "headlines, earnings calls or 10‑K snippets, analyst commentary, and industry background. "
    "Output between 5 and 15 search terms to query for."
)

planner_agent = Agent(name=PLANNER_AGENT_NAME, instructions=PROMPT, model=MODEL)

I am getting the following error:

AttributeError: module 'app.agent.agents.planner_agent' has no attribute 'handoffs'

Why is the SDK expecting handoffs attribute when the instructions does not ask it to handoff?

Any help is appreciated. Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionQuestion about using the SDK

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions