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

Extract graph agent node logic into reusable functions #988

Open
Finndersen opened this issue Feb 25, 2025 · 0 comments
Open

Extract graph agent node logic into reusable functions #988

Finndersen opened this issue Feb 25, 2025 · 0 comments

Comments

@Finndersen
Copy link

Description

As suggested here, since graph are effectively immutable / not customizable (node logic and graph edge config are coupled), it's best to make node implementations very light and use them to call logic contained in external functions, so that the logic can be re-used in other graph implementations, and also tested/used outside of a graph/node context.

The current Graph Agent implementation is basically an immutable black box and contains a lot of logic within its nodes that would be valuable to be reused or extended for custom agent implementations, but currently cannot be.

Like these components for example could be extracted into reusable functions so they can be used as desired in different contexts to build custom agents:

  • dynamic system prompt construction
  • making requests to model
  • parsing model response into tool call actions
  • handling/executing tool call actions and returning responses

I'm happy to have a go at doing this, just wanted to get some feedback/thoughts first!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant