4 ms·
Show HN: PicoFlow – a tiny DSL-style Python library for LLM agent workflows
Hi HN, I’m experimenting with a small Python library called PicoFlow for building
LLM agent workflows using a lightweight DSL.
I’ve been using tools like LangChain and CrewAI, and wanted to explore a simpler,
more function-oriented way to compose agent logic, closer to normal Python control
flow and async functions.
PicoFlow focuses on:
- composing async functions with operators
- minimal core and few concepts to learn
- explicit data flow through a shared context
- easy embedding into existing services
A typical flow looks like:
flow = plan >> retrieve >> answer
await flow(ctx)
Patterns like looping and fork/merge are also expressed as operators rather than
separate graph or config layers.
This is still early and very much a learning project. I’d really appreciate any
feedback on the DSL design, missing primitives, or whether this style feels useful
for real agent workloads.
Repo: https://github.com/the-picoflow/picoflow
- polotics 9mo agoNice! How does this compare to smolagents?
- shijizhi_1919 8mo agoThey’re related but with different trade-offs. smolagents focuses on predefined agent patterns to get things working quickly. PicoFlow is more about expressing agent control flow directly in async Python, with minimal abstraction. If you prefer ready-made agent behaviors, smolagents makes a lot of sense. If you want very explicit control over loops, branching, and state flow, PicoFlow leans in that direction.