create_agent_sync#

Understand request ownership, phases, and runtime limits. See the guide.

zett_agent.sync.create_agent_sync(model, *, config=None, system_prompt='You are a helpful assistant.', tools=(), extensions=None, reasoning_effort=ReasoningEffort.MEDIUM, parallel_tool_call=True, max_iterations=36, max_internal_messages=8, event_dispatcher=None, runtime=None)[源代码]#

Create a synchronous Agent with the same options as create_agent.

示例

No asyncio.run() or await is needed:

with create_agent_sync(model) as agent:
    print(agent.run("Hello").content)
参数:
返回类型:

SyncAgent