Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature(platform) Smart Decision Maker Block #9490

Draft
wants to merge 13 commits into
base: dev
Choose a base branch
from

Conversation

Swiftyos
Copy link
Contributor

@Swiftyos Swiftyos commented Feb 17, 2025

Task

Implement a mechanism for the Smart Decision Maker (SDM) block to dynamically retrieve all available tools (blocks and agents) along with their required inputs.
This allows the SDM block to make informed decisions on which tool to call and how to structure the input data for each call.

Changes 🏗️

  • WIP: Add the Smart Decision Maker (SDM) block.
  • Break circular imports in integration code.

Work in Progress

Current Status

I’m currently focused on the smart decision logic. The main additions in the ongoing PR include:

  • Defining function signatures for OpenAI function-calling schemas based on node links and the linked blocks.
  • Adding tests for function signature generation.
  • Force all tool calls to be made via an agent. (Need to uncomment)
  • Restrict each tool call entry to a single node.
  • simplify the output emission process, to emit each parameter one at a time.
  • Change test to use agents and hardcode output how I think it should work to test it does actually work

What’s Next

  • Hook up openai, in a simplified way, to test the function calling (mock for testing)
  • Once all the above is working, use credentials system and build of llm.py

WIP Reviewers

Please take a look at the general approach that I'm taking and let me know if there are any specifics you think should be considered.

If you have any knowledge around my next steps please also comment giving my the context you have.

Out of scope: code style and organization at this stage

Copy link

supabase bot commented Feb 17, 2025

This pull request has been ignored for the connected project bgwpwdsxblryihinutbx because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

Copy link
Contributor

This PR targets the master branch but does not come from dev or a hotfix/* branch.

Automatically setting the base branch to dev.

@github-actions github-actions bot changed the base branch from master to dev February 17, 2025 10:29
@Swiftyos Swiftyos changed the title Swiftyos/open 2373 tool discovery input mapping for smart decision maker block feature(platform) Smart Decision Maker Block Feb 17, 2025
Copy link

netlify bot commented Feb 17, 2025

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit f029049
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/67b734cd0cc00f0008acf15b

Copy link

deepsource-io bot commented Feb 17, 2025

Here's the code health analysis summary for commits a692eed..f029049. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScript✅ SuccessView Check ↗
DeepSource Python LogoPython✅ Success
❗ 48 occurences introduced
🎯 29 occurences resolved
View Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

Copy link

netlify bot commented Feb 17, 2025

Deploy Preview for auto-gpt-docs-dev canceled.

Name Link
🔨 Latest commit f029049
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs-dev/deploys/67b734cdaaaf400008cff21f

if not graph:
raise ValueError(f"Graph not found {graph_id}")

tool_functions = self._create_function_signature(node_id, graph)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test this works with mem0

since it uses the kwargs based on its place in the graph

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ntindle It seems that high level decision is that tools must be an AgentExecutionBlock.

If you feel strongly that this is a bad idea, let me know and we can discuss it with Toran

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why should it require that? I can see plenty of use for this not needing a whole agent and the overhead that would come with it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main reason why is to make a smart decision, a certain amount of information is required about a tool. We can backprogate this information from an agent - name, description, required params, etc.

But with a normal block, we can't really do this unless we assume that block can't be connected to another block...

There are a fair bit of subtleties with this system

@github-actions github-actions bot added size/xl and removed size/l labels Feb 19, 2025
@github-actions github-actions bot added the conflicts Automatically applied to PRs with merge conflicts label Feb 20, 2025
Copy link
Contributor

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

…l-discovery-input-mapping-for-smart-decision-maker-block
Copy link
Contributor

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

@github-actions github-actions bot removed the conflicts Automatically applied to PRs with merge conflicts label Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants