Add Smarter tool calling and ToolManager for multiple Tool calling#35
Add Smarter tool calling and ToolManager for multiple Tool calling#35jorgeantonio21 merged 4 commits intoAtomaAI:mainfrom
Conversation
jorgeantonio21
left a comment
There was a problem hiding this comment.
LGTM
But it seems it doesn't add support for tool composition, afaik
| expect(result.successfulTools).toHaveLength(1); | ||
| expect(result.failedTools).toHaveLength(0); | ||
| expect(result.stats).toHaveLength(1); | ||
| expect(result.totalExecutionTime).toBeGreaterThan(0); |
There was a problem hiding this comment.
Resolve this forbidden non-null access assert
fishonamos
left a comment
There was a problem hiding this comment.
Looks cool! and I love the execution context added. Though it doesn't currently work with the Sui agent—maybe it's still in progress?
Also, the approach I'm considering is to have a query decomposer so that the LLM itself determines if multiple tools are needed. The model should do most of the work imo and we want to avoid much automation as that will make it less of an AI agent.
For example, we could have something like:
async QueryDecomposer(prompt: string) {
return await this.AtomaClass.atomaChat([
{ content: decomposerPrompt, role: 'assistant' },
{ content: prompt, role: 'user' },
]);
}
The prompt will also be updated for that.
Let me know what you think @jorgeantonio21 |
|
I am fine with more work on the server regarding the AI agent. That said, the model should be able to evaluate which tool(s) to choose and act upon |
Multi-Tool Execution System
Fixes #29
This PR tries to add a smart multiple tool calling manager for efficient calling of the tools
Overview
This enhanced Tool Management System provides a robust framework for executing multiple tools in parallel or sequence, with built-in support for retries, timeouts, and error handling.
This system is designed to handle complex workflows where multiple tools need to be coordinated efficiently.
Key Components
1. Enhanced Tool Interface
category: Groups tools by functionalityversion: Tracks tool implementation versiondependencies: Specifies other tools required for executionparallelExecutionSupported: Indicates if tool can run in parallelrequiredContext: Lists required context parametersvalidateInput: Custom input validation functiontransformOutput: Custom output transformation functionexecute: Main execution function with context support2. Execution Context
Provides execution configuration and environment information:
3. Execution Plan
Defines how tools should be executed:
Key Features
1. Parallel Execution
parallelExecutionSupportedcan be executed simultaneouslyPromise.allfor efficient parallel execution2. Error Handling
3. Execution Tracking