-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
@grll the current implementation of tools through MCPAdapt needs this kind of context manager:
with ToolCollection.from_mcp(
server_parameters, trust_remote_code=True
) as tool_collection:
# Pass the callback to the agent
agent = CodeAgent(
tools=[*tool_collection.tools],
add_base_tools=False,
model=model,
step_callbacks=[limit_snapshot_history], # Add the callback here
)
agent.run("find a good airbnb in paris next to Notre-Dame")
This has been reported as being impractical: because it makes it harder to pass the agent
object around.
I see there are simpler implementations in there for instance.
In fact I don't really see the use of a context manager: we don't need to close resources at the end, since we're only on the client side here. What do you think @grll ?
RobinBially
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request