Live data from Hacker News

Show HN: Flow – A dynamic task engine for building AI agents

github.com

41–50 of 53 posts

Re: Show HN: Flow – A dynamic task engine for building AI agents

#41

Why limit yourself to AI and agents? seems abstract enough that tasks, and parallel execution could be anything Moreover, there isn't an example how it `could` work for inference or function_calls/tools/agents But looks simple to get started and feels like it has the right foundation for good things to come. Kudos!

I did something similar to this: https://github.com/memodb-io/drive-flow.

It supports tasks, dynamic routes and parallel execution in pure Python build-ins(zero deps). But just a side project so no persistent stuff and just a easy tool.

Re: Show HN: Flow – A dynamic task engine for building AI agents

#42
To not fall under ,what is criticized by some people here, as making an ad for a competitor - but big parts of it are very similar to a project im working on for multiple years now, i not gonne name or link the project i gonne mention.

While my project is not meant to be specifically used with LLMs, what i build (or am building) is a system which has no specific defined sequence, but is rather a composition of "actions" of which each of them has a specific defined requirement in form of a data structure that is necessary to execute the "action". I build it in a way to be self supervising without one single task scheduling mechanism to enable people to write data driven applications.

Its nice to see that im not the only one (ye i didnt expect that to be the case dont worry im not elon-musk crazy) that tries to go such a way.

While i build it for completly different use cases (when i started LLM weren't such a big thing as they are now) its definatly a cool and creative way to use such an architecture.

Gl hf :) and thumbs up

Re: Show HN: Flow – A dynamic task engine for building AI agents

#44
post #21

Earlier quoted context omitted.

Hey, I’m building agents on top of temporal as well. One of the main limitations is child workflows can not spawn other child workflows. Are you doing an activity for every prompt execution and passing those through other activities? Or something more framework-y?

Right now I'm doing prompt execution in activities, passing results to other activities. Workflows currently only started after human events, but going to move towards additional workflows started through an activity soon - I'm keeping the state of the world independent of the execution engine so each workflow will read the new state.

Have you hit any non-determinism errors keeping workflow state outside temporal?

Re: Show HN: Flow – A dynamic task engine for building AI agents

#45
post #8

I tend to agree the graph approach is wrong. I have a meta question though - there seems to be a huge amount of activity in this space of LLM agent related developer tooling. Are people actually successfully and reliably delivering services which use LLMs? (Meaning services which are not just themselves exposing LLMs or chat style interfaces). It seems like 18 months ago people were running around terrified, but now…

Folks are still getting funded for these sorts of ideas (LLM-based agents) but until I see a single working proof of concept, I'm convinced they're all doomed.

Re: Show HN: Flow – A dynamic task engine for building AI agents

#46
Neat ideas here. I've listed 3 thoughts/concerns:

    1. Deadlocks
    2. Programmer Experience
    3. Updating the code with in-flight tasks
To avoid deadlocks, it seems like the executor should need to know what the dependencies are before attempting execute tasks. If we have 4 threads of execution, it seems like we could get into a state where all 4 of our threads are blocking on semaphores waiting for another task to provide a dependent value. And at scale, if it can happen, it definitely will happen eventually.

Potentially related-- it could make sense for the engine to give preference to completing partially completed tasks before starting new fresh tasks.

Also, I wonder if there's a way to lay the specification of tasks out so it looks more like normal code-- potentially with async await. What I mean by normal code is this: It's much more natural to write a program with 2 steps like this:

   name = await ask_for_name()
   await greet(name)
Than to redo that in a task way like this

    def ask_for_name():
        ...
        return TaskResult(next_task=greet(name))

    def greet():
        ...
If I have 7 steps with some loops and conditionals, it becomes much more difficult to grok the structure with the disjointed task structure, and much more difficult to restructure and reorganize it. I wonder if there's a way to pull it off where the distributed task structure is still there but the code feels more natural. Using this framework we're essentially writing the code in a fragmented way that's challenging to reorganize and reason about.

What will happen when we change the task code and deploy a new version; I wonder what happens to the tasks that were in flight at the moment we deploy?

Re: Show HN: Flow – A dynamic task engine for building AI agents

#48
post #46

Neat ideas here. I've listed 3 thoughts/concerns: 1. Deadlocks 2. Programmer Experience 3. Updating the code with in-flight tasks To avoid deadlocks, it seems like the executor should need to know what the dependencies are before attempting execute tasks. If we have 4 threads of execution, it seems like we could get into a state where all 4 of our threads are blocking on semaphores waiting for another task to provide…

Thank you for your comment and wanted to add some clarifications.

1. tasks are not explicitly called from another task In your example greet() is never called, instead task with id=greet will be pushed to the queue

2. The reason I opted for distributed task approach is precisely to eliminate await task_1 await task_2 ...

Going to the point 1, task_2 just says to the engine, ok buddy, now it is time to spawn task_2. With that semantics we isolate tasks and don't deal with the outer tasks which calls another tasks. Also, parallel task execution is extremely simply with that approach.

3. Deadlocks will happen iff you will wait for the data that is never assigned, which is expected. Otherwise, with the design of state and engine itself, they will never happen.

https://github.com/lmnr-ai/flow/blob/main/src/lmnr_flow/stat...

https://github.com/lmnr-ai/flow/blob/main/src/lmnr_flow/flow...

4. For your last point, I would argue the opposite is true, it's actually much harder to maintain and add new changes when you hardcode everything, hence why this project exists in the first place.

5. Regarding deployment. Flow is not a temporal-like (yet), everything is in-memory and but I will def look into how to make it more robust

Re: Show HN: Flow – A dynamic task engine for building AI agents

#50
post #43

Thanks for sharing. Can you add a simple example that is more concrete and less abstrwct to the docs? It would be easier for people to understand if you did.

yep, here's one https://github.com/lmnr-ai/flow?tab=readme-ov-file#llm-agent...
Post reply on HN