Ironclad / rivet

The open-source visual AI programming environment and TypeScript library
https://rivet.ironcladapp.com
MIT License
2.55k stars 226 forks source link

Trigger Graph via API call to server running rivet application #417

Closed learningdesignlabs closed 3 weeks ago

learningdesignlabs commented 3 weeks ago

Feature Request

Thank you for this amazing app! I would love to be able to recommend this tool for use with several clients, to run as part of an entire automated workflow. However, it seems there is currently no way to trigger a graph to run, and then get a response from the server running that rivet application?

I do see that one can write a custom node app to get this functionality, but then we lose the node design interface (and there’s no way right now to export the graph that one painstakingly laid out)? Why not just expose a rest endpoint to trigger a graph in the same app that runs the design interface?

I’m wondering if this could perhaps be a new node type, “Trigger Graph via REST”, that allows the user to set the endpoint name, request timeout, an input “request params” that accepts a json object, and an input “response” that receives the data to send as a response (which could come from other nodes).

Code of Conduct

learningdesignlabs commented 3 weeks ago

On closer inspection of the docs, I'm seeing a graph can be loaded from a file via the rivet-node package.. since using this allows one to create a route to trigger the graph flow, I'll close this issue, thanks!

abrenneke commented 2 weeks ago

Glad you found that @learningdesignlabs! Yeah, the Rivet application isn't designed to run as a server, but as you've found, the SDK can run the graphs directly. Then you can attach the application as a remote debugger and see graph executions running live on your server, if you want.