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
I have an sample application. Mcp server is managed by Amazon Bedrock AgentCore . I need tools for many action. In order to connect to it I need to obrain the JWT auth token which I pass to the MCP client. With this MCP client I create McpToolGroup which I pass to the PromptRunner.
I try to re-use the token and MCP client as much as possible as obtaining/creating them is a costly operation. I can imagine re-creating them for each agentInvocation or agentPlatform.createAgentProcess on the Spring Rest Controller method level, but I don't see such functionallity. To re-create in each method annotated with @Agent is to expensive. In my simple case, executing one method in the rest controller ends up executing 6 agent actions.
But the token expires with the time and the connection which MCP Client holds to the MCP server may timeout (re-connect could be handled by the framework like Spring AI). But after auth token expiration it's my responsibility to obtain a fresh one and re-create McpClient with it. How I can intelligently handle such errors with Embabel without adding try/catch and retry in every @Action method requiring passing tools, when Embabel encounters errors during an action execution. This might happen during each action execution, which requires passing McpToolGroup/McpTools to the PromptRunner? But in such a way that it continues from where it ran into the error (no successful action execution will be repeated)
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.
Uh oh!
There was an error while loading. Please reload this page.
-
I have an sample application. Mcp server is managed by Amazon Bedrock AgentCore . I need tools for many action. In order to connect to it I need to obrain the JWT auth token which I pass to the MCP client. With this MCP client I create McpToolGroup which I pass to the PromptRunner.
I try to re-use the token and MCP client as much as possible as obtaining/creating them is a costly operation. I can imagine re-creating them for each agentInvocation or agentPlatform.createAgentProcess on the Spring Rest Controller method level, but I don't see such functionallity. To re-create in each method annotated with
@Agentis to expensive. In my simple case, executing one method in the rest controller ends up executing 6 agent actions.But the token expires with the time and the connection which MCP Client holds to the MCP server may timeout (re-connect could be handled by the framework like Spring AI). But after auth token expiration it's my responsibility to obtain a fresh one and re-create McpClient with it. How I can intelligently handle such errors with Embabel without adding try/catch and retry in every
@Actionmethod requiring passing tools, when Embabel encounters errors during an action execution. This might happen during each action execution, which requires passing McpToolGroup/McpTools to the PromptRunner? But in such a way that it continues from where it ran into the error (no successful action execution will be repeated)Beta Was this translation helpful? Give feedback.
All reactions