Question 1 路 Agentic Architecture & Orchestration
You are scaffolding a new TypeScript agent and need the single call that starts the agentic loop and streams messages back as an async iterator. Which Agent SDK entry point do you reach for?
- A.run(), then poll a status endpoint for messages
- B.createAgent(), which returns an agent object you invoke
- C.invoke(), passing a callback for each message
- D.query(), and iterate the messages it yields
Show answer and rationale
Correct answer: D
query() is the SDK entry point in both TypeScript and Python; it starts the agentic loop and yields messages as an async iterator. The other names do not exist in the SDK.