Multi-agent using create_agent as a tools

I am working on a complex application, where I need to create a Customer AI Agent for HealthCare that will respond to user queries using the required tools. There multiple tasks for the agent, getting appointment details of a patient, getting patient information’s, confirming an appointment, sending appointment details via message or whatsapp, booking an appointment etc etc.
I am using a create_agent as a supervisor and the sub-agents (defined using create_agent) as a tools provided to the supervisor and the sub-agents have tools defined on an MCP server.
I am worrying either I am doing it correctly to complete all the user required tasks or not.
Second thing is the context window size increases as user interacts with the agent for a long time.

I need expert advice, either these scenarios can be implemented this way or I need to change my approach and also what are the ways that context can be managed without loosing the information’s needed by the agent to correctly take actions and reply to the user. As it is intended to be use as a Customer Call center.

Note:
There is a constraint that we can only use Groq as model providers(currently using GPT OSS 120B).

Thanks in advance.

Hey – using subagents as tool is a common pattern to manage the context of complex agents, so it seems like you are on the right track: Multi-agent - Docs by LangChain.

If you are concerned about the size of your context window, reading through the documentation for middleware and summarization may give you some ideas on how to further to optimize the context window of your agent: Built-in middleware - Docs by LangChain

@steffen Thank you for your response. I am just curious that either I am on the right track or not. As this agent needs to be used for different tasks (not a defined flow), for that purpose I am trying that create_agent will be best to use as supervisor and other sub-agents as tools. I am passing the required tools to the sub-agents from the MCP server and using supervisor for just routing the user query to the right tool.

Looking forward for your review about this.

Thanks again.

That approach makes sense to me!