Challenges with Supervisor–Sub-Agent Architecture for Complex, Step-Driven Workflows in LangChain

Hi @razaullah ,

Use Case

A healthcare assistant handling complex, step-driven workflows like:

  • Patient info retrieval

  • Appointment booking (multi-step)

  • Hospital → clinic → doctor → slot selection

  • Insurance management

  • SMS/WhatsApp notifications

  • Arabic-first multilingual support

  • All backend logic exposed via MCP tools


Current Architecture

  • Supervisor agent (create_agent)

  • Multiple sub-agents (also create_agent)

  • Sub-agents exposed as tools to the supervisor

  • Each sub-agent owns a specific domain


Main Challenges

  1. Flow reliability

    • Supervisor sometimes skips required steps

    • Complex booking flows aren’t always deterministic

  2. Arabic-heavy structured responses

    • Strict formatting requirements

    • Heavy prompt engineering

    • Maintainability concerns


Community Guidance

  • :white_check_mark: The supervisor + sub-agent (sub-agents-as-tools) pattern is valid.

  • :check_mark: Ensure tool descriptions clearly define execution conditions.

  • :check_mark: Make invocation conditions explicit and structured.

  • :pushpin: Use strict=True for structured outputs.

  • :pushpin: Add a dedicated ## Language section in prompts to enforce Arabic/English behavior.


Key Takeaway

The architecture is sound, but:

  • Reliability depends heavily on clear tool descriptions

  • Deterministic workflows may benefit from stronger state control

  • Structured multilingual output should rely more on schema enforcement, less on long prompts