You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This RFC proposes to deprecate the existing chat() activity in favor of a new architecture that clearly separates atomic text generation and agentic workflows:
text() activity: A simple, atomic, one-shot text generation function with no tools or loop logic. Smaller bundle, predictable behavior, and matches expectations for LLM completion APIs.
agentLoop() function: A composable orchestrator for agentic workflows — multi-turn, tools, approval flows, and custom agentic logic. Accepts a TextCreator (adapter or composable callback) for maximum flexibility.
Deprecation of chat(): The combined function is deprecated and users are directed to migrate to agentLoop() (for tools/agentic flow) or text() (for atomic text generation).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
This RFC proposes to deprecate the existing
chat()activity in favor of a new architecture that clearly separates atomic text generation and agentic workflows:text()activity: A simple, atomic, one-shot text generation function with no tools or loop logic. Smaller bundle, predictable behavior, and matches expectations for LLM completion APIs.agentLoop()function: A composable orchestrator for agentic workflows — multi-turn, tools, approval flows, and custom agentic logic. Accepts aTextCreator(adapter or composable callback) for maximum flexibility.chat(): The combined function is deprecated and users are directed to migrate toagentLoop()(for tools/agentic flow) ortext()(for atomic text generation).Motivation
The current
chat()activity combines two distinct responsibilities:This led to:
Proposal: New Architecture
text()activity (atomic request)agentLoop()(agentic orchestration)Brings the agent loop to the top-level, composable API:
TextCreatorcallback for power users (custom adapters, logging, middleware, etc.)StreamChunkformat for full composabilityMigration Examples
1-to-1:
Full control:
No tools: use
text()Deprecation
chat()is deprecated and will be removed in a future major versionagentLoop()ortext()as appropriateBenefits
See also
experimental_textandexperimental_agentLoopexportsBeta Was this translation helpful? Give feedback.
All reactions