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

feat: Async execution API workflow #2

Closed
pkarw opened this issue Dec 7, 2024 · 3 comments
Closed

feat: Async execution API workflow #2

pkarw opened this issue Dec 7, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@pkarw
Copy link
Collaborator

pkarw commented Dec 7, 2024

Somewhat related to #1 - we need persistence layer to implement async execution.
Right now the only way to exec the flows is the CLI - which is great. But with a long-running, async flows - like waiting for an email etc. an event based architecture would be way better.

I think it would be ideal if we can define the simple API per Team (maybe let's give a way to define the endpoints while defining a Team @grabbou ?) - the default endpoints that came to my mind are:

  • team/kickoff - to start a new task for the team - returns the unique workflowId (used within the persistence layer to store the context)
  • team/[workflowId]/step - execute a next step
  • team/[workflowId]/status - get the status
  • team/[workflowId]/callstack - get the debug information (JSON logs - what steps were executed by which agents)
@pkarw pkarw added the enhancement New feature or request label Dec 7, 2024
grabbou added a commit that referenced this issue Dec 9, 2024
…rs are provided (#49)

This implements #2 and #9 (please confirm)

Updated server to use latest API
Workflow now runs on the server in the background until it requests a
tool or finishes
Removed saving/loading from file as we want to keep state in memory and
run its updates in background. Previous example required calling
"iterate" endpoint each time to advance it. We can always add it back,
but I think this one is much better
Will automatically resume when all answers are provided 
Logger UI

![CleanShot 2024-12-09 at 04 26
13@2x](https://github.com/user-attachments/assets/8eaea18a-79c9-46a5-bc33-531be71c18b5)

Once this gets accepted, I will go ahead and create reusable functions
to reduce this boilerplate and hide abstraction.

---------

Co-authored-by: Piotr Karwatka <[email protected]>
@pkarw
Copy link
Collaborator Author

pkarw commented Dec 9, 2024

Closed with #49

@pkarw pkarw closed this as completed Dec 9, 2024
@grabbou
Copy link
Collaborator

grabbou commented Dec 10, 2024

33e2dca1-ffe0-42e0-90a3-4b80b6aef291_720-removebg-preview

@grabbou
Copy link
Collaborator

grabbou commented Dec 10, 2024

Untitled

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

No branches or pull requests

2 participants