Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.
Lorenze/deprecate/answer from history (#7105)
Lorenze Jaya9cb0bdf02d4
diff --git a/docs/edge/ar/guides/flows/conversational-flows.mdx b/docs/edge/ar/guides/flows/conversational-flows.mdxindex 48c63a68e..66934a6d0 100644--- a/docs/edge/ar/guides/flows/conversational-flows.mdx+++ b/docs/edge/ar/guides/flows/conversational-flows.mdx@@ -239,7 +239,7 @@ def route_turn(self, context):## `Flow` المحادثاتي (تجريبي)-اشترك في رسم الدردشة المحادثاتي بتعيين `conversational = True` على صنف فرعي من `Flow` أو بتطبيق `@ConversationConfig(...)`. يوفر `Flow` الأساسي عندئذٍ `route_conversation` كنقطة البدء/الموجّه المدمجة، إضافة إلى مستمعي `converse_turn` و`end_conversation` و`answer_from_history_turn`. وهو يدير `state.messages`، ويمكنه تشغيل LLM للموجّه، ويبقي دفعة trace مفتوحة عبر الجولات. أنت تكتب **المسارات المخصصة**؛ والإطار يتولى الباقي.+اشترك في رسم الدردشة المحادثاتي بتعيين `conversational = True` على صنف فرعي من `Flow` أو بتطبيق `@ConversationConfig(...)`. يوفر `Flow` الأساسي عندئذٍ `route_conversation` كنقطة البدء/الموجّه المدمجة، إضافة إلى مستمعي `converse_turn` و`end_conversation`. يظل المستمع المهمل `answer_from_history_turn` متاحاً للتوافق. يدير الإطار `state.messages`، ويمكنه تشغيل LLM للموجّه، ويبقي دفعة trace مفتوحة عبر الجولات. أنت تكتب **المسارات المخصصة**؛ والإطار يتولى الباقي.استخدمه عندما تريد دردشة متعددة الجولات مع موجّه قائم على LLM ومعالجات لكل مسار دون توصيل دورة الحياة يدوياً. استخدم `Flow[ChatState]` (النمط الأدنى مستوى في الأعلى) عندما تحتاج تحكماً كاملاً.@@ -306,13 +306,21 @@ def kickoff() -> None:| `system_prompt` | `slices.conversational_system_prompt` من i18n | رسالة system يستخدمها `converse_turn` المدمج. مرر `""` للتعطيل التام. || `llm` | `None` | LLM المحادثة (يستخدمه `converse_turn` وكاحتياطي للموجّه). || `router` | `None` | تجاوزات `RouterConfig` اختيارية. مع وجود مستمعين مخصصين وLLM قابل للحل، يُفعّل التوجيه تلقائياً حتى عند إغفال هذا الحقل. |-| `answer_from_history_prompt` | افتراضي الإطار | رسالة system للمسار الاختياري `answer_from_history`. |-| `answer_from_history_llm` | `None` | يُفعّل الاختصار `answer_from_history` عند تعيينه. |+| `answer_from_history_prompt` | افتراضي الإطار | **مهمل.** استخدم system prompt الخاص بـ `converse` أو تجاوز `converse_turn()`. |+| `answer_from_history_llm` | `None` | **مهمل.** استخدم `llm`؛ إذ يتلقى `converse` السجل القانوني بالفعل. || `intent_llm` | `None` | LLM لمسار التصنيف المسبق القديم `intents=`/`default_intents`. || `default_intents` | `None` | تسميات النتائج للتصنيف المسبق القديم. || `visible_agent_outputs` | `None` | `"all"` أو قائمة بأسماء الـ agents الذين تُرفع مخرجاتهم من `append_agent_result()` إلى رسائل عامة. || `defer_trace_finalization` | `True` | يبقي دفعة trace واحدة مفتوحة عبر استدعاءات `handle_turn()`. |+<Warning>+ تم إهمال `answer_from_history_prompt` و`answer_from_history_llm` ومسار+ `answer_from_history`، وستُزال في إصدار مستقبلي. فهي تكرر `converse`، الذي+ يتولى بالفعل السجل القانوني، وتضيف استدعاء LLM للتحقق من أهلية الإجابة،+ ويجري تجاوزها عندما يعيد الموجّه التلقائي المعتاد مساراً. تظل الإعدادات+ الحالية تعمل وتُصدر `DeprecationWarning`.+</Warning>+عند عدم وجود مسارات مخصصة، تسقط الجولات إلى `converse`. ومع وجود مسارات مخصصة وLLM للمحادثة/الموجّه، ينشئ الإطار `RouterConfig` افتراضية؛ لا توفر واحدة صراحةً إلا لتخصيص المطالبة أو قائمة المسارات أو الأوصاف أو سلوك fallback. أما ضبط `default_intents` فيستخدم مسار التصنيف المسبق القديم.إذا لم يُهيأ LLM للمحادثة، يعيد `converse_turn` المدمج عنصراً نائباً للإعداد بدلاً من توليد إجابة.@@ -352,7 +360,7 @@ router_config = RouterConfig(تُبنى رسالة الموجّه إلى LLM تلقائياً. لكل مسار يختار الإطار وصفاً بهذا الترتيب من الأولوية:1. `RouterConfig.route_descriptions[label]` — تجاوز صريح.-2. `Flow.builtin_route_descriptions[label]` — نص جاهز من الإطار لـ `converse` و`end` و`answer_from_history` (مصاغ لـ LLM التوجيه).+2. `Flow.builtin_route_descriptions[label]` — نص جاهز من الإطار لـ `converse` و`end` ولمسار التوافق المهمل `answer_from_history` (مصاغ لـ LLM التوجيه).3. قيمة `description` المعلنة للطريقة (تستخدمها التدفقات التعريفية وإسقاطات DSL).4. أول سطر غير فارغ من docstring معالج `@listen(label)`.5. فارغ (المسار يظهر في الفهرس بلا وصف).@@ -408,7 +416,7 @@ def create_video(self) -> str: # rejected at flow instantiation|--------|---------|-------|| `converse` | `converse_turn` | معالج الدردشة الافتراضي. يستدعي `ConversationConfig.llm` بـ system prompt + التاريخ القانوني للرسائل. || `end` | `end_conversation` | يضبط `state.ended = True` ويُصدر رد إنهاء. |-| `answer_from_history` | `answer_from_history_turn` | اختياري. بعد وجود رسالتين على الأقل، يُوجَّه إليه عندما يقرر `ConversationConfig.answer_from_history_llm` أن الرسالة الحالية يمكن الإجابة عنها من السجل. |+| `answer_from_history` | `answer_from_history_turn` | **مسار توافق مهمل.** استخدم `converse`، الذي يتلقى السجل القانوني بالفعل. |يمكنك تجاوز أي من هذه بتعريف معالج بنفس الاسم في الصنف الفرعي.@@ -475,7 +483,7 @@ class SupportFlow(Flow[ConversationState]):return super().route_turn(context)```-لتجاوز موجّه LLM بالكامل واختيار مسار برمجياً، أعد سلسلة نصية غير فارغة من `route_turn`. لا يؤدي إرجاع قيمة falsy من التجاوز إلى استدعاء `_route_with_config()`؛ بل يسقط التوجيه إلى النية المصنّفة مسبقاً لهذه الجولة، ثم إلى `answer_from_history` عندما تكون مؤهلة، وأخيراً إلى `converse`. تكون `last_intent` من الجولة السابقة متاحة في سياق الموجّه، لكنها لا تُعاد أبداً كـ fallback.+لتجاوز موجّه LLM بالكامل واختيار مسار برمجياً، أعد سلسلة نصية غير فارغة من `route_turn`. لا يؤدي إرجاع قيمة falsy من التجاوز إلى استدعاء `_route_with_config()`؛ بل يسقط التوجيه إلى النية المصنّفة مسبقاً لهذه الجولة، ثم إلى مسار التوافق المهمل `answer_from_history` عند إعداده، وأخيراً إلى `converse`. تكون `last_intent` من الجولة السابقة متاحة في سياق الموجّه، لكنها لا تُعاد أبداً كـ fallback.### `append_assistant_message` و`append_agent_result`@@ -519,11 +527,11 @@ methods:| المُوفَّر | التفاصيل ||----------|--------|-| الرسم البياني المدمج | تُضاف `route_conversation` و`converse_turn` و`end_conversation` و`answer_from_history_turn` تلقائيًا. عرّف طريقة بأحد هذه الأسماء لتجاوزها. |+| الرسم البياني المدمج | تُضاف `route_conversation` و`converse_turn` و`end_conversation` تلقائيًا. يُحتفظ بـ `answer_from_history_turn` المهملة للتوافق. عرّف طريقة بأحد هذه الأسماء لتجاوزها. || حالة المحادثة | تُستخدم `ConversationState` عند عدم وجود كتلة `state`. وتُركّب حالة Pydantic ذات `ref` أو `json_schema` تلقائياً مع الحقول المحادثية؛ ولا يلزم أن ترث من `ConversationState`. || كتالوج المسارات | يُستنتج من الطرق غير الموجّهة التي تحمل تسميات `listen`، مع استبعاد المسارات الداخلية. تتبع الأوصاف ترتيب الأولوية أعلاه، ويمكن لـ `router.routes` الصريحة تقييد الخيارات. |-تقبل حقول `llm` و`router.llm` و`intent_llm` و`answer_from_history_llm` التعريفية إما معرّف نموذج أو خريطة إعدادات مثل `{model: openai/gpt-4o-mini, max_tokens: 512}`. وتدعم كتلة `conversational` أيضاً `default_intents` و`answer_from_history_prompt` و`visible_agent_outputs` و`defer_trace_finalization` وحقول `RouterConfig` الموضحة أعلاه.+تقبل حقول `llm` و`router.llm` و`intent_llm` التعريفية إما معرّف نموذج أو خريطة إعدادات مثل `{model: openai/gpt-4o-mini, max_tokens: 512}`. وتدعم كتلة `conversational` أيضاً `default_intents` و`visible_agent_outputs` و`defer_trace_finalization` وحقول `RouterConfig` الموضحة أعلاه. تظل تعريفات `answer_from_history_prompt` / `answer_from_history_llm` المهملة مقبولة للتوافق.شغّله من Python بنفس واجهات الجولة المستخدمة مع تدفق محادثاتي معرّف بصنف:@@ -549,7 +557,7 @@ finally:| مثيل `LLM` حي أو `BaseLLM` مخصص | سلسلة معرّف نموذج أو خريطة إعدادات ثابتة || `router.response_format` كصنف نموذج حيّ | سمِّ الصنف بمرجع python: `response_format: {python: my_project.schemas.ConversationRoute}`. احذفه ويولّد الإطار واحدًا || تجاوز `route_turn()` | اكتب Flow بلغة Python، أو استبدل طريقة `route_conversation` التعريفية بإجراء `call: code` / expression |-| تجاوز `can_answer_from_history()` | اكتب Flow بلغة Python؛ واضبط توجيه السجل القياسي عبر `conversational.answer_from_history_llm` |+| تجاوز `can_answer_from_history()` | مهمل. استخدم `converse` أو تجاوز `converse_turn()` في Python. |يفتح `crewai run` واجهة المحادثة النصية للتدفق المحادثاتي التعريفي — نفس الواجهة التي يحصل عليها Flow محادثاتي مكتوب بلغة Python. تحتاج حلقة المحادثة إلى طرفية، ولذلك يخرج التشغيل بدون طرفية برمز غير صفري مع إرشادات بدلاً من تنفيذ جولة واحدة؛ شغّله من Python هناك عبر `handle_turn()` أو `stream_turn()`. وتعمل الطريقة التعريفية ذات كتلة `human_feedback:` (وفي Python: `@human_feedback`) على REPL طرفي، لأن runtime يجمع الملاحظات بمطالبة حاجزة لا تستطيع TUI خدمتها. لا يُقبل `--inputs` مع Flow محادثاتي — فمدخل كل جولة هو الرسالة التي تكتبها — واستئناف جلسة حسب المعرّف غير موصول بواجهة CLI بعد؛ استخدم `flow.handle_turn(message, session_id=...)` من Python لذلك.diff --git a/docs/edge/en/guides/flows/conversational-flows.mdx b/docs/edge/en/guides/flows/conversational-flows.mdxindex 79751e7f3..3c6d2e6ad 100644--- a/docs/edge/en/guides/flows/conversational-flows.mdx+++ b/docs/edge/en/guides/flows/conversational-flows.mdx@@ -239,7 +239,7 @@ Do **not** use `@human_feedback` for follow-up chat lines unless a human must ap## Conversational `Flow` (experimental)-Opt into the conversational chat graph by setting `conversational = True` on a `Flow` subclass or applying `@ConversationConfig(...)`. The base `Flow` then supplies `route_conversation` as the built-in start/router plus the `converse_turn`, `end_conversation`, and `answer_from_history_turn` listeners. It manages `state.messages`, can drive a router LLM, and keeps the trace batch open across turns. You write the **custom routes**; the framework owns the rest.+Opt into the conversational chat graph by setting `conversational = True` on a `Flow` subclass or applying `@ConversationConfig(...)`. The base `Flow` then supplies `route_conversation` as the built-in start/router plus the `converse_turn` and `end_conversation` listeners. The deprecated `answer_from_history_turn` listener remains available for compatibility. The framework manages `state.messages`, can drive a router LLM, and keeps the trace batch open across turns. You write the **custom routes**; the framework owns the rest.Use this when you want a multi-turn chat with a router and per-route handlers without wiring the lifecycle yourself. Use `Flow[ChatState]` (the lower-level pattern above) when you need full control.@@ -306,13 +306,21 @@ Class decorator that attaches per-class chat defaults.| `system_prompt` | `slices.conversational_system_prompt` from i18n | System message used by the built-in `converse_turn`. Pass `""` to opt out entirely. || `llm` | `None` | Conversation LLM (used by `converse_turn` and as router fallback). || `router` | `None` | Optional `RouterConfig` overrides. With custom listeners and a resolvable LLM, routing auto-enables even when this is omitted. |-| `answer_from_history_prompt` | Framework default | System message for the optional `answer_from_history` route. |-| `answer_from_history_llm` | `None` | Enables the `answer_from_history` short-circuit when set. |+| `answer_from_history_prompt` | Framework default | **Deprecated.** Use the `converse` system prompt or override `converse_turn()`. |+| `answer_from_history_llm` | `None` | **Deprecated.** Use `llm`; `converse` already receives canonical history. || `intent_llm` | `None` | LLM for legacy `intents=`/`default_intents` pre-classification. || `default_intents` | `None` | Outcome labels for legacy pre-classification. || `visible_agent_outputs` | `None` | `"all"`, or a list of agent names whose `append_agent_result()` calls should be promoted to public assistant messages. || `defer_trace_finalization` | `True` | Keep one trace batch open across `handle_turn()` calls. |+<Warning>+ `answer_from_history_prompt`, `answer_from_history_llm`, and the+ `answer_from_history` route are deprecated and will be removed in a future+ release. They duplicate `converse`, add an eligibility LLM call, and are+ bypassed when the normal auto-router returns a route. Existing configurations+ continue to work and emit `DeprecationWarning`.+</Warning>+With no custom routes, turns fall through to `converse`. With custom routes and a conversation/router LLM, the framework synthesizes a default `RouterConfig`; provide one explicitly only to customize its prompt, route list, descriptions, or fallback behavior. Setting `default_intents` uses the legacy pre-classification path instead.If no conversation LLM is configured, the built-in `converse_turn` returns a configuration placeholder rather than generating an answer.@@ -351,7 +359,7 @@ router_config = RouterConfig(The router prompt that gets sent to the LLM is built automatically. For each route the framework picks a description with this precedence:1. `RouterConfig.route_descriptions[label]` — explicit override.-2. `Flow.builtin_route_descriptions[label]` — framework-canned text for `converse`, `end`, `answer_from_history` (phrased for the router LLM).+2. `Flow.builtin_route_descriptions[label]` — framework-canned text for `converse`, `end`, and the deprecated `answer_from_history` compatibility route (phrased for the router LLM).3. The method's declared `description` (used by declarative flows and DSL projections).4. First non-empty line of the `@listen(label)` handler's docstring.5. Empty (the route is listed without a description).@@ -407,7 +415,7 @@ Routes:|-------|---------|---------|| `converse` | `converse_turn` | Default chat handler. Calls `ConversationConfig.llm` with the system prompt + canonical message history. || `end` | `end_conversation` | Sets `state.ended = True` and emits a terminator reply. |-| `answer_from_history` | `answer_from_history_turn` | Optional. After at least two messages exist, routes here when `ConversationConfig.answer_from_history_llm` determines the current message can be answered from history. |+| `answer_from_history` | `answer_from_history_turn` | **Deprecated compatibility route.** Use `converse`, which already receives canonical history. |You can override any of these by defining a same-named handler in your subclass.@@ -474,7 +482,7 @@ class SupportFlow(Flow[ConversationState]):return super().route_turn(context)```-To bypass the LLM router entirely and pick a route programmatically, return a non-empty string from `route_turn`. A falsy return does **not** invoke `_route_with_config()` from your override; routing falls through to this turn's pre-classified intent, then `answer_from_history` when eligible, and finally `converse`. A previous turn's `last_intent` is available in router context but is never replayed as a fallback.+To bypass the LLM router entirely and pick a route programmatically, return a non-empty string from `route_turn`. A falsy return does **not** invoke `_route_with_config()` from your override; routing falls through to this turn's pre-classified intent, then the deprecated `answer_from_history` compatibility path when configured, and finally `converse`. A previous turn's `last_intent` is available in router context but is never replayed as a fallback.### `append_assistant_message` and `append_agent_result`@@ -518,11 +526,11 @@ Three things are supplied for you:| Supplied | Detail ||----------|--------|-| The built-in graph | `route_conversation`, `converse_turn`, `end_conversation` and `answer_from_history_turn` are added automatically. Declare a method under one of those names to override it. |+| The built-in graph | `route_conversation`, `converse_turn`, and `end_conversation` are added automatically. Deprecated `answer_from_history_turn` is retained for compatibility. Declare a method under one of those names to override it. || Conversation state | `ConversationState` is used when there is no `state` block. A Pydantic `ref` or `json_schema` state is automatically composed with the conversational fields; it does not need to extend `ConversationState`. || The route catalog | Inferred from non-router methods with `listen` labels, excluding internal routes. Descriptions follow the precedence above, and explicit `router.routes` can limit the choices. |-Declarative `llm`, `router.llm`, `intent_llm`, and `answer_from_history_llm` fields accept either a model id or a configuration mapping such as `{model: openai/gpt-4o-mini, max_tokens: 512}`. The `conversational` block also supports `default_intents`, `answer_from_history_prompt`, `visible_agent_outputs`, `defer_trace_finalization`, and the `RouterConfig` fields shown above.+Declarative `llm`, `router.llm`, and `intent_llm` fields accept either a model id or a configuration mapping such as `{model: openai/gpt-4o-mini, max_tokens: 512}`. The `conversational` block also supports `default_intents`, `visible_agent_outputs`, `defer_trace_finalization`, and the `RouterConfig` fields shown above. Deprecated `answer_from_history_prompt` / `answer_from_history_llm` declarations remain accepted for compatibility.Run it from Python with the same turn APIs as a class-based conversational Flow:@@ -548,7 +556,7 @@ Route labels and method names share one trigger namespace, so a handler must not| A live `LLM` instance or a custom `BaseLLM` | A model id string or static configuration mapping || `router.response_format` as a live model class | Name the class with a python ref: `response_format: {python: my_project.schemas.ConversationRoute}`. Omit it and the framework synthesizes one || A `route_turn()` override | Author the Flow in Python, or replace the declarative `route_conversation` method with a `call: code` / expression action |-| A `can_answer_from_history()` override | Author the Flow in Python; configure standard history routing with `conversational.answer_from_history_llm` |+| A `can_answer_from_history()` override | Deprecated. Use `converse` or override `converse_turn()` in Python. |`crewai run` opens the chat TUI for a declarative conversational flow — the same one a Python conversational Flow gets. A chat loop needs a terminal, so a headless run exits non-zero with guidance instead of running a single turn; drive it from Python there with `handle_turn()` or `stream_turn()`. A declarative method with a `human_feedback:` block (Python: `@human_feedback`) runs on a terminal REPL, because the runtime collects feedback with a blocking prompt the TUI cannot service. `--inputs` is not accepted for a conversational flow — each turn's input is the message you type — and resuming a session by id is not wired into the CLI yet; use `flow.handle_turn(message, session_id=...)` from Python for that.diff --git a/docs/edge/ko/guides/flows/conversational-flows.mdx b/docs/edge/ko/guides/flows/conversational-flows.mdxindex 979363246..17f7509f9 100644--- a/docs/edge/ko/guides/flows/conversational-flows.mdx+++ b/docs/edge/ko/guides/flows/conversational-flows.mdx@@ -239,7 +239,7 @@ def route_turn(self, context):## 대화형 `Flow` (실험적)-`Flow` 서브클래스에 `conversational = True`를 지정하거나 `@ConversationConfig(...)`를 적용하면 대화형 채팅 그래프가 활성화됩니다. 베이스 `Flow`는 내장 start/router인 `route_conversation`과 `converse_turn`, `end_conversation`, `answer_from_history_turn` 리스너를 제공합니다. 또한 `state.messages`를 관리하고 router LLM을 구동할 수 있으며 턴 간 trace batch를 열린 상태로 유지합니다. 여러분은 **커스텀 라우트**를 작성하고 나머지는 프레임워크에 맡기면 됩니다.+`Flow` 서브클래스에 `conversational = True`를 지정하거나 `@ConversationConfig(...)`를 적용하면 대화형 채팅 그래프가 활성화됩니다. 베이스 `Flow`는 내장 start/router인 `route_conversation`과 `converse_turn`, `end_conversation` 리스너를 제공합니다. 사용 중단된 `answer_from_history_turn` 리스너는 호환성을 위해 계속 제공됩니다. 또한 `state.messages`를 관리하고 router LLM을 구동할 수 있으며 턴 간 trace batch를 열린 상태로 유지합니다. 여러분은 **커스텀 라우트**를 작성하고 나머지는 프레임워크에 맡기면 됩니다.LLM 기반 라우터와 라우트별 핸들러로 멀티턴 챗을 만들고 싶지만 라이프사이클을 직접 배선하고 싶지 않을 때 사용하세요. 완전한 제어가 필요하면 위의 `Flow[ChatState]`로 내려가세요.@@ -306,13 +306,21 @@ def kickoff() -> None:| `system_prompt` | i18n `slices.conversational_system_prompt` | 빌트인 `converse_turn`이 사용하는 system 메시지. 빈 문자열(`""`)을 전달하면 system 메시지를 끕니다. || `llm` | `None` | 대화용 LLM (빌트인 `converse_turn`이 사용하고 router 폴백도 됨). || `router` | `None` | 선택적 `RouterConfig` 재정의. 커스텀 listener와 결정 가능한 LLM이 있으면 생략해도 라우팅이 자동 활성화됩니다. |-| `answer_from_history_prompt` | 프레임워크 기본값 | 선택적인 `answer_from_history` 라우트용 system 메시지. |-| `answer_from_history_llm` | `None` | 설정되면 `answer_from_history` 단축 경로가 활성화됩니다. |+| `answer_from_history_prompt` | 프레임워크 기본값 | **사용 중단됨.** `converse` system prompt를 사용하거나 `converse_turn()`을 재정의하세요. |+| `answer_from_history_llm` | `None` | **사용 중단됨.** `llm`을 사용하세요. `converse`는 이미 정식 기록을 전달받습니다. || `intent_llm` | `None` | 레거시 `intents=`/`default_intents` 사전 분류용 LLM. || `default_intents` | `None` | 레거시 사전 분류용 outcome 레이블. || `visible_agent_outputs` | `None` | `"all"` 또는 `append_agent_result()` 결과를 사용자에게 공개로 승격할 에이전트 이름 목록. || `defer_trace_finalization` | `True` | `handle_turn()` 호출들 사이에서 하나의 trace 배치를 열어 둡니다. |+<Warning>+ `answer_from_history_prompt`, `answer_from_history_llm`, `answer_from_history`+ 라우트는 사용 중단되었으며 향후 릴리스에서 제거될 예정입니다. 이들은 이미+ 정식 기록을 처리하는 `converse`와 기능이 중복되고, 답변 가능 여부를 판단하는+ LLM 호출을 추가하며, 일반 auto-router가 라우트를 반환하면 우회됩니다. 기존+ 설정은 계속 작동하며 `DeprecationWarning`을 발생시킵니다.+</Warning>+커스텀 라우트가 없으면 턴은 `converse`로 이어집니다. 커스텀 라우트와 대화/router LLM이 있으면 프레임워크가 기본 `RouterConfig`를 합성합니다. prompt, 라우트 목록, 설명, fallback 동작을 바꿔야 할 때만 명시적으로 제공하세요. `default_intents`를 설정하면 레거시 사전 분류 경로를 사용합니다.대화 LLM을 설정하지 않으면 내장 `converse_turn`은 답변을 생성하는 대신 설정 안내 placeholder를 반환합니다.@@ -351,7 +359,7 @@ router_config = RouterConfig(router에 전달되는 프롬프트는 자동으로 만들어집니다. 각 라우트의 설명은 다음 우선순위로 결정됩니다:1. `RouterConfig.route_descriptions[label]` — 명시적 오버라이드.-2. `Flow.builtin_route_descriptions[label]` — `converse`, `end`, `answer_from_history`용 프레임워크 캐닝 텍스트 (router LLM용으로 다듬어진 문구).+2. `Flow.builtin_route_descriptions[label]` — `converse`, `end`, 사용 중단된 `answer_from_history` 호환 라우트용 프레임워크 기본 텍스트 (router LLM용으로 다듬어진 문구).3. 메서드에 선언된 `description` — 선언적 flow와 DSL projection에서 사용.4. `@listen(label)` 핸들러 docstring의 첫 번째 비어 있지 않은 줄.5. 빈 문자열 — 설명 없이 라우트만 표시.@@ -404,7 +412,7 @@ Routes:|--------|--------|------|| `converse` | `converse_turn` | 기본 챗 핸들러. system prompt + 정식 메시지 히스토리와 함께 `ConversationConfig.llm`을 호출합니다. || `end` | `end_conversation` | `state.ended = True`로 설정하고 종료 응답을 보냅니다. |-| `answer_from_history` | `answer_from_history_turn` | 선택적. 메시지가 두 개 이상 존재한 뒤 `ConversationConfig.answer_from_history_llm`이 현재 메시지를 기록만으로 답할 수 있다고 판단하면 이곳으로 라우팅됩니다. |+| `answer_from_history` | `answer_from_history_turn` | **사용 중단된 호환 라우트.** 이미 정식 기록을 전달받는 `converse`를 사용하세요. |서브클래스에 같은 이름의 핸들러를 정의하면 어떤 것이든 오버라이드할 수 있습니다.@@ -471,7 +479,7 @@ class SupportFlow(Flow[ConversationState]):return super().route_turn(context)```-LLM router를 완전히 우회하고 프로그램 방식으로 라우트를 선택하려면 `route_turn`에서 비어 있지 않은 문자열을 반환하세요. falsy 값을 반환해도 오버라이드에서 `_route_with_config()`가 호출되지는 않습니다. 대신 현재 턴의 사전 분류된 intent, 사용 가능한 경우 `answer_from_history`, 마지막으로 `converse` 순으로 fallback합니다. 이전 턴의 `last_intent`는 router 컨텍스트에서 사용할 수 있지만 fallback으로 다시 실행되지는 않습니다.+LLM router를 완전히 우회하고 프로그램 방식으로 라우트를 선택하려면 `route_turn`에서 비어 있지 않은 문자열을 반환하세요. falsy 값을 반환해도 오버라이드에서 `_route_with_config()`가 호출되지는 않습니다. 대신 현재 턴의 사전 분류된 intent, 설정된 경우 사용 중단된 `answer_from_history` 호환 경로, 마지막으로 `converse` 순으로 fallback합니다. 이전 턴의 `last_intent`는 router 컨텍스트에서 사용할 수 있지만 fallback으로 다시 실행되지는 않습니다.### `append_assistant_message`와 `append_agent_result`@@ -515,11 +523,11 @@ methods:| 제공 항목 | 설명 ||----------|--------|-| 내장 그래프 | `route_conversation`, `converse_turn`, `end_conversation`, `answer_from_history_turn`이 자동으로 추가됩니다. 같은 이름의 메서드를 선언하면 재정의됩니다. |+| 내장 그래프 | `route_conversation`, `converse_turn`, `end_conversation`이 자동으로 추가됩니다. 사용 중단된 `answer_from_history_turn`은 호환성을 위해 유지됩니다. 같은 이름 중 하나로 메서드를 선언하면 재정의됩니다. || 대화 상태 | `state` 블록이 없으면 `ConversationState`가 사용됩니다. Pydantic `ref` 또는 `json_schema` state는 대화형 필드와 자동으로 합성되며 `ConversationState`를 상속할 필요가 없습니다. || 라우트 카탈로그 | 내부 라우트를 제외하고 `listen` 레이블이 있는 비-router 메서드에서 추론됩니다. 설명에는 위 우선순위가 적용되며 명시적인 `router.routes`로 선택지를 제한할 수 있습니다. |-선언적 `llm`, `router.llm`, `intent_llm`, `answer_from_history_llm` 필드는 모델 id 또는 `{model: openai/gpt-4o-mini, max_tokens: 512}` 같은 설정 mapping을 받습니다. `conversational` 블록은 `default_intents`, `answer_from_history_prompt`, `visible_agent_outputs`, `defer_trace_finalization`과 위에 나온 `RouterConfig` 필드도 지원합니다.+선언적 `llm`, `router.llm`, `intent_llm` 필드는 모델 id 또는 `{model: openai/gpt-4o-mini, max_tokens: 512}` 같은 설정 mapping을 받습니다. `conversational` 블록은 `default_intents`, `visible_agent_outputs`, `defer_trace_finalization`과 위에 나온 `RouterConfig` 필드도 지원합니다. 사용 중단된 `answer_from_history_prompt` / `answer_from_history_llm` 선언은 호환성을 위해 계속 허용됩니다.클래스 기반 대화형 플로우와 동일한 턴 API로 Python에서 실행합니다:@@ -545,7 +553,7 @@ finally:| 살아 있는 `LLM` 인스턴스나 커스텀 `BaseLLM` | 모델 id 문자열 또는 정적 설정 mapping || 살아 있는 모델 클래스로서의 `router.response_format` | python ref로 클래스를 지정하세요: `response_format: {python: my_project.schemas.ConversationRoute}`. 생략하면 프레임워크가 생성합니다 || `route_turn()` 재정의 | Flow를 Python으로 작성하거나 선언적 `route_conversation` 메서드를 `call: code` / expression action으로 교체 |-| `can_answer_from_history()` 재정의 | Flow를 Python으로 작성하고 표준 기록 라우팅은 `conversational.answer_from_history_llm`으로 설정 |+| `can_answer_from_history()` 재정의 | 사용 중단됨. `converse`를 사용하거나 Python에서 `converse_turn()`을 재정의하세요. |`crewai run`은 선언적 대화형 Flow에 대해 Python 대화형 Flow와 같은 채팅 TUI를 엽니다. 채팅 루프에는 터미널이 필요하므로 headless 실행은 단일 턴을 실행하는 대신 안내와 함께 0이 아닌 코드로 종료됩니다. 이런 환경에서는 Python의 `handle_turn()` 또는 `stream_turn()`으로 실행하세요. `human_feedback:` 블록이 있는 선언적 메서드(Python: `@human_feedback`)는 터미널 REPL에서 실행됩니다. 런타임이 TUI가 처리할 수 없는 블로킹 prompt로 feedback을 수집하기 때문입니다. 대화형 Flow에서는 `--inputs`를 받지 않습니다. 각 턴의 입력은 사용자가 입력하는 메시지이며 id로 세션을 재개하는 기능은 아직 CLI에 연결되지 않았습니다. 필요하면 Python에서 `flow.handle_turn(message, session_id=...)`을 사용하세요.diff --git a/docs/edge/pt-BR/guides/flows/conversational-flows.mdx b/docs/edge/pt-BR/guides/flows/conversational-flows.mdxindex 0d622997a..6843d0f47 100644--- a/docs/edge/pt-BR/guides/flows/conversational-flows.mdx+++ b/docs/edge/pt-BR/guides/flows/conversational-flows.mdx@@ -240,7 +240,7 @@ Não use `@human_feedback` para linhas de chat de follow-up, a menos que um huma## `Flow` conversacional (experimental)-Habilite o grafo de chat conversacional definindo `conversational = True` em uma subclasse de `Flow` ou aplicando `@ConversationConfig(...)`. O `Flow` base passa a fornecer `route_conversation` como start/router embutido, além dos listeners `converse_turn`, `end_conversation` e `answer_from_history_turn`. Ele gerencia `state.messages`, pode acionar um LLM de roteamento e mantém o batch de trace aberto entre turnos. Você escreve as **rotas customizadas**; o framework cuida do resto.+Habilite o grafo de chat conversacional definindo `conversational = True` em uma subclasse de `Flow` ou aplicando `@ConversationConfig(...)`. O `Flow` base passa a fornecer `route_conversation` como start/router embutido, além dos listeners `converse_turn` e `end_conversation`. O listener descontinuado `answer_from_history_turn` permanece disponível para compatibilidade. O framework gerencia `state.messages`, pode acionar um LLM de roteamento e mantém o batch de trace aberto entre turnos. Você escreve as **rotas customizadas**; o framework cuida do resto.Use isto quando quiser um chat multi-turno com router e handlers por rota sem cablar o ciclo de vida na mão. Use `Flow[ChatState]` (o padrão de mais baixo nível acima) quando precisar de controle total.@@ -307,13 +307,22 @@ Decorador de classe que anexa os defaults de chat por classe.| `system_prompt` | `slices.conversational_system_prompt` (i18n) | System message usado pelo `converse_turn` embutido. Passe `""` para desativar totalmente. || `llm` | `None` | LLM de conversa (usado pelo `converse_turn` e como fallback do router). || `router` | `None` | Sobrescritas opcionais de `RouterConfig`. Com listeners customizados e um LLM que possa ser resolvido, o roteamento é habilitado automaticamente mesmo quando este campo é omitido. |-| `answer_from_history_prompt` | padrão do framework | System message para a rota opcional `answer_from_history`. |-| `answer_from_history_llm` | `None` | Habilita o atalho `answer_from_history` quando definido. |+| `answer_from_history_prompt` | padrão do framework | **Descontinuado.** Use o system prompt de `converse` ou sobrescreva `converse_turn()`. |+| `answer_from_history_llm` | `None` | **Descontinuado.** Use `llm`; `converse` já recebe o histórico canônico. || `intent_llm` | `None` | LLM para o caminho legado `intents=`/`default_intents`. || `default_intents` | `None` | Labels de outcome para pré-classificação legada. || `visible_agent_outputs` | `None` | `"all"` ou lista de nomes de agentes cujos `append_agent_result()` devem virar mensagens públicas. || `defer_trace_finalization` | `True` | Mantém um único batch de trace aberto entre chamadas de `handle_turn()`. |+<Warning>+ `answer_from_history_prompt`, `answer_from_history_llm` e a rota+ `answer_from_history` estão descontinuados e serão removidos em uma versão+ futura. Eles duplicam `converse`, que já recebe o histórico canônico,+ adicionam uma chamada de LLM para verificar elegibilidade e são ignorados+ quando o auto-router normal retorna uma rota. As configurações existentes+ continuam funcionando e emitem `DeprecationWarning`.+</Warning>+Sem rotas customizadas, os turnos caem em `converse`. Com rotas customizadas e um LLM de conversa/router, o framework sintetiza um `RouterConfig` padrão; forneça um explicitamente apenas para customizar seu prompt, lista de rotas, descrições ou comportamento de fallback. Definir `default_intents` usa o caminho legado de pré-classificação.Se nenhum LLM de conversa estiver configurado, o `converse_turn` embutido retorna um placeholder de configuração em vez de gerar uma resposta.@@ -353,7 +362,7 @@ router_config = RouterConfig(O prompt do router é montado automaticamente. Para cada rota o framework escolhe a descrição nesta precedência:1. `RouterConfig.route_descriptions[label]` — override explícito.-2. `Flow.builtin_route_descriptions[label]` — texto canônico do framework para `converse`, `end`, `answer_from_history` (otimizado para o LLM de routing).+2. `Flow.builtin_route_descriptions[label]` — texto canônico do framework para `converse`, `end` e a rota de compatibilidade descontinuada `answer_from_history` (otimizado para o LLM de routing).3. O `description` declarado do método (usado por flows declarativos e projeções da DSL).4. Primeira linha não vazia da docstring do handler `@listen(label)`.5. Vazio (a rota aparece no catálogo sem descrição).@@ -409,7 +418,7 @@ def create_video(self) -> str: # rejected at flow instantiation|------|---------|-----------|| `converse` | `converse_turn` | Handler de chat padrão. Chama `ConversationConfig.llm` com o system prompt + histórico canônico. || `end` | `end_conversation` | Define `state.ended = True` e emite uma resposta de encerramento. |-| `answer_from_history` | `answer_from_history_turn` | Opcional. Depois que houver pelo menos duas mensagens, roteia para cá quando `ConversationConfig.answer_from_history_llm` determinar que a mensagem atual pode ser respondida pelo histórico. |+| `answer_from_history` | `answer_from_history_turn` | **Rota de compatibilidade descontinuada.** Use `converse`, que já recebe o histórico canônico. |Você pode sobrescrever qualquer uma definindo um handler com o mesmo nome na subclasse.@@ -476,7 +485,7 @@ class SupportFlow(Flow[ConversationState]):return super().route_turn(context)```-Para ignorar completamente o router LLM e escolher uma rota programaticamente, retorne uma string não vazia de `route_turn`. Um retorno falsy **não** invoca `_route_with_config()` a partir da sua sobrescrita; o roteamento segue para a intenção pré-classificada deste turno, depois para `answer_from_history` quando elegível e, por fim, para `converse`. O `last_intent` do turno anterior fica disponível no contexto do router, mas nunca é repetido como fallback.+Para ignorar completamente o router LLM e escolher uma rota programaticamente, retorne uma string não vazia de `route_turn`. Um retorno falsy **não** invoca `_route_with_config()` a partir da sua sobrescrita; o roteamento segue para a intenção pré-classificada deste turno, depois para o caminho de compatibilidade descontinuado `answer_from_history` quando configurado e, por fim, para `converse`. O `last_intent` do turno anterior fica disponível no contexto do router, mas nunca é repetido como fallback.### `append_assistant_message` e `append_agent_result`@@ -520,11 +529,11 @@ Três coisas são fornecidas para você:| Fornecido | Detalhe ||----------|--------|-| O grafo interno | `route_conversation`, `converse_turn`, `end_conversation` e `answer_from_history_turn` são adicionados automaticamente. Declare um método com um desses nomes para sobrescrevê-lo. |+| O grafo interno | `route_conversation`, `converse_turn` e `end_conversation` são adicionados automaticamente. O `answer_from_history_turn` descontinuado é mantido para compatibilidade. Declare um método com um desses nomes para sobrescrevê-lo. || Estado da conversa | `ConversationState` é usado quando não há bloco `state`. Um estado Pydantic definido por `ref` ou `json_schema` é composto automaticamente com os campos conversacionais; ele não precisa estender `ConversationState`. || O catálogo de rotas | Inferido de métodos que não são routers e têm rótulos `listen`, excluindo rotas internas. As descrições seguem a precedência acima, e `router.routes` explícito pode limitar as opções. |-Os campos declarativos `llm`, `router.llm`, `intent_llm` e `answer_from_history_llm` aceitam um id de modelo ou um mapping de configuração, como `{model: openai/gpt-4o-mini, max_tokens: 512}`. O bloco `conversational` também aceita `default_intents`, `answer_from_history_prompt`, `visible_agent_outputs`, `defer_trace_finalization` e os campos de `RouterConfig` mostrados acima.+Os campos declarativos `llm`, `router.llm` e `intent_llm` aceitam um id de modelo ou um mapping de configuração, como `{model: openai/gpt-4o-mini, max_tokens: 512}`. O bloco `conversational` também aceita `default_intents`, `visible_agent_outputs`, `defer_trace_finalization` e os campos de `RouterConfig` mostrados acima. As declarações descontinuadas `answer_from_history_prompt` / `answer_from_history_llm` continuam sendo aceitas para compatibilidade.Execute a partir do Python com as mesmas APIs de turno de um Flow conversacional baseado em classe:@@ -550,7 +559,7 @@ Rótulos de rota e nomes de métodos compartilham um único namespace de gatilho| Uma instância `LLM` viva ou um `BaseLLM` customizado | Um id de modelo em string ou mapping estático de configuração || `router.response_format` como classe de modelo viva | Nomeie a classe com um ref python: `response_format: {python: my_project.schemas.ConversationRoute}`. Omita e o framework sintetiza uma || Uma sobrescrita de `route_turn()` | Escreva o Flow em Python ou substitua o método declarativo `route_conversation` por uma ação `call: code` / expressão |-| Uma sobrescrita de `can_answer_from_history()` | Escreva o Flow em Python; configure o roteamento padrão por histórico com `conversational.answer_from_history_llm` |+| Uma sobrescrita de `can_answer_from_history()` | Descontinuado. Use `converse` ou sobrescreva `converse_turn()` no Python. |O `crewai run` abre a TUI de chat para um flow conversacional declarativo — a mesma que um Flow conversacional em Python recebe. Um loop de chat precisa de um terminal, então uma execução headless encerra com código diferente de zero e orientações, em vez de rodar um único turno; ali, conduza pelo Python com `handle_turn()` ou `stream_turn()`. Um método declarativo com um bloco `human_feedback:` (Python: `@human_feedback`) roda em um REPL de terminal, porque o runtime coleta feedback com um prompt bloqueante que a TUI não consegue atender. O `--inputs` não é aceito em um flow conversacional — a entrada de cada turno é a mensagem que você digita — e retomar uma sessão por id ainda não está ligado à CLI; use `flow.handle_turn(message, session_id=...)` no Python para isso.diff --git a/lib/crewai/src/crewai/experimental/conversational.py b/lib/crewai/src/crewai/experimental/conversational.pyindex 6f5ac869b..da021009c 100644--- a/lib/crewai/src/crewai/experimental/conversational.py+++ b/lib/crewai/src/crewai/experimental/conversational.py@@ -17,6 +17,7 @@ from collections.abc import Callable, Sequencefrom dataclasses import dataclassfrom typing import Any, Literal, TypeVar, castfrom uuid import uuid4+import warningsfrom pydantic import BaseModel, ConfigDict, Field@@ -28,6 +29,13 @@ ConversationEventVisibility = Literal["private", "public"]F = TypeVar("F", bound=Callable[..., Any])+ANSWER_FROM_HISTORY_DEPRECATION_MESSAGE = (+ "`answer_from_history_prompt` and `answer_from_history_llm` are deprecated "+ "and will be removed in a future release. Use `ConversationConfig.llm` "+ "with the built-in `converse` route, or override `converse_turn()` for "+ "custom history behavior."+)+def _conversational_only(func: F) -> F:"""Mark a method as part of the conversational built-in graph.@@ -81,8 +89,12 @@ class ConversationConfig:``system_prompt`` defaults to the ``slices.conversational_system_prompt``translation when left as ``None``. Pass an empty string to opt out of any- system prompt for ``converse_turn``. ``answer_from_history_prompt`` falls- back to ``slices.conversational_answer_from_history_prompt`` when ``None``.+ system prompt for ``converse_turn``.++ ``answer_from_history_prompt`` and ``answer_from_history_llm`` are+ deprecated. The built-in ``converse`` route already answers from canonical+ message history without tools; override ``converse_turn`` when a separate+ history policy is required."""system_prompt: str | None = None@@ -95,6 +107,18 @@ class ConversationConfig:visible_agent_outputs: Sequence[str] | Literal["all"] | None = Nonedefer_trace_finalization: bool = True+ def __post_init__(self) -> None:+ """Warn when deprecated history-routing configuration is used."""+ if (+ self.answer_from_history_prompt is not None+ or self.answer_from_history_llm is not None+ ):+ warnings.warn(+ ANSWER_FROM_HISTORY_DEPRECATION_MESSAGE,+ DeprecationWarning,+ stacklevel=3,+ )+def __call__(self, flow_cls: type[Any]) -> type[Any]:"""Use this config as a class decorator.diff --git a/lib/crewai/src/crewai/experimental/conversational_mixin.py b/lib/crewai/src/crewai/experimental/conversational_mixin.pyindex b5daad8ea..8496ddd70 100644--- a/lib/crewai/src/crewai/experimental/conversational_mixin.py+++ b/lib/crewai/src/crewai/experimental/conversational_mixin.py@@ -395,7 +395,11 @@ class _ConversationalMixin:@listen("answer_from_history")@_conversational_onlydef answer_from_history_turn(self) -> str | None:- """Answer directly from canonical conversation history when configured."""+ """Deprecated history-only handler retained for compatibility.++ Use the built-in ``converse`` route, which already receives canonical+ conversation history, or override ``converse_turn``.+ """config = self._conversation_configif config is None:return None@@ -718,8 +722,8 @@ class _ConversationalMixin:permission gates before the LLM decision).Returning a falsy value means "no routing decision": the turn falls- through to the built-in defaults (``answer_from_history`` when- configured, else ``converse``). It never replays a previous turn's+ through to the deprecated ``answer_from_history`` compatibility path+ when configured, then ``converse``. It never replays a previous turn'sintent."""config = self._conversation_config@@ -740,7 +744,7 @@ class _ConversationalMixin:return self._route_with_config(router_config, context)def can_answer_from_history(self, context: dict[str, Any]) -> bool:- """Return whether this turn can be answered from message history."""+ """Return whether the deprecated history-only route can answer."""config = self._conversation_configif config is None or config.answer_from_history_llm is None:return False@@ -1196,7 +1200,7 @@ class _ConversationalMixin:return config.system_prompt or Nonedef _resolve_answer_from_history_prompt(self) -> str:- """Return the effective ``answer_from_history`` prompt."""+ """Return the deprecated history-only route's effective prompt."""from crewai.utilities.i18n import I18N_DEFAULTconfig = self._conversation_configdiff --git a/lib/crewai/src/crewai/flow/conversational_definition.py b/lib/crewai/src/crewai/flow/conversational_definition.pyindex cc2357515..225cec516 100644--- a/lib/crewai/src/crewai/flow/conversational_definition.py+++ b/lib/crewai/src/crewai/flow/conversational_definition.py@@ -69,7 +69,14 @@ class FlowConversationalDefinition(BaseModel):examples=["gpt-4o-mini", {"model": "openai/gpt-4o-mini", "max_tokens": 4096}],)router: FlowConversationalRouterDefinition | None = None- answer_from_history_prompt: str | None = None+ answer_from_history_prompt: str | None = Field(+ default=None,+ description=(+ "Deprecated. Use system_prompt with the built-in converse route, "+ "or override converse_turn in Python."+ ),+ json_schema_extra={"deprecated": True},+ )default_intents: list[str] | None = Noneintent_llm: Any = Field(default=None,@@ -81,10 +88,11 @@ class FlowConversationalDefinition(BaseModel):answer_from_history_llm: Any = Field(default=None,description=(- "Setting this enables the optional answer_from_history route. "+ "Deprecated. Use llm with the built-in converse route. ""A model-id string, a config mapping such as {model, max_tokens}, an LLMDefinition, or a live LLM instance when built in Python."),examples=["gpt-4o-mini"],+ json_schema_extra={"deprecated": True},)visible_agent_outputs: list[str] | Literal["all"] | None = Nonedefer_trace_finalization: bool = Truediff --git a/lib/crewai/src/crewai/flow/skill.py b/lib/crewai/src/crewai/flow/skill.pyindex ca26113e8..beae9f734 100644--- a/lib/crewai/src/crewai/flow/skill.py+++ b/lib/crewai/src/crewai/flow/skill.py@@ -293,7 +293,7 @@ MODEL_SPECS: tuple[ModelSpec, ...] = ("llm": "Model id used by the built-in `converse` handler, and the router's fallback model.","system_prompt": "System message for the built-in `converse` handler. Omit for the framework default; use an empty string for none.","default_intents": "Outcome labels classified before routing. Requires `intent_llm`.",- "answer_from_history_llm": "Setting this enables the optional `answer_from_history` route, which answers from the transcript without invoking a route handler.",+ "answer_from_history_llm": "Deprecated. Use `llm` with the built-in `converse` route, which already receives the transcript.","visible_agent_outputs": "Agent names whose recorded results are promoted to user-visible assistant messages, or `all`.","builtin_routes": "Route labels the framework handles itself. Do not add your own routes here; declare them as a method `listen` label.","internal_routes": "Route labels the framework handles that are excluded from the router's catalog.",diff --git a/lib/crewai/src/crewai/flow/templates/flow_definition_skill.md.j2 b/lib/crewai/src/crewai/flow/templates/flow_definition_skill.md.j2index 5b270107d..850364226 100644--- a/lib/crewai/src/crewai/flow/templates/flow_definition_skill.md.j2+++ b/lib/crewai/src/crewai/flow/templates/flow_definition_skill.md.j2@@ -148,7 +148,7 @@ Dynamic value rules:- Do not set `config.stream: true` unless the caller is expected to consume a streaming result. For normal generated flows and CLI smoke tests, omit it.{% if include_conversational %}- Do not put conversational settings under `state`, `config`, or a method. Use top-level `conversational` only when the user asks for a chat or conversation flow.-- Do not declare `route_conversation`, `converse_turn`, `end_conversation`, or `answer_from_history_turn` unless you are deliberately replacing one. Declaring the `conversational` block adds them for you, and a method you declare under one of those names overrides the built-in.+- Do not configure or override the deprecated `answer_from_history` route; `converse` already answers from canonical history. Do not declare `route_conversation`, `converse_turn`, or `end_conversation` unless you are deliberately replacing one. Declaring the `conversational` block adds them for you, and a method you declare under one of those names overrides the built-in.- Do not name a route handler the same as the route it listens to. Route labels and method names share one trigger namespace, so `create_video` listening to `create_video` is rejected. Use `handle_create_video`.- Do not declare `state` for a chat flow unless it needs extra fields. The conversational state shape is supplied by default, and a custom state must extend it.- Do describe every custom route, either with the handler's `description` or an entry in `conversational.router.route_descriptions`. That text is what the routing model reads to choose between routes; a route with neither is offered to it unlabelled.diff --git a/lib/crewai/tests/test_flow_conversation.py b/lib/crewai/tests/test_flow_conversation.pyindex 59b7b4a49..ca90d3b96 100644--- a/lib/crewai/tests/test_flow_conversation.py+++ b/lib/crewai/tests/test_flow_conversation.py@@ -320,9 +320,15 @@ class TestConversationalFlow:assert flow.state.agent_threads["planner"][0].content == "private scratch"def test_answer_from_history_uses_configured_llm_and_appends_reply(self) -> None:- @ConversationConfig(answer_from_history_llm="gpt-4o-mini")- class HistoryFlow(ConversationalFlow):- pass+ with pytest.warns(+ DeprecationWarning,+ match="answer_from_history_prompt.*answer_from_history_llm",+ ) as warning_records:+ @ConversationConfig(answer_from_history_llm="gpt-4o-mini")+ class HistoryFlow(ConversationalFlow):+ pass++ assert warning_records[0].filename == __file__flow = HistoryFlow()flow._state = ConversationState(