frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: PicoFlow – a minimal Python workflow for LLM agents

2•shijizhi_1919•1h ago
Hi HN,

I’ve been experimenting with LLM agents for a while and often felt that for simple workflows (chat, tool calls, small loops), existing frameworks add a lot of abstraction and boilerplate.

So I built a small Python library called PicoFlow. The goal is simple:

express agent workflows using normal async Python, not framework-specific graphs or chains.

Minimal chat agent

Each step is just an async function, and workflows are composed with >>:

  from picoflow import flow, llm, create_agent

  LLM_URL =
  “llm+openai://api.openai.com/v1/chat/completions?model=gpt-4.1-mini&api_key_env=OPENAI_API_KEY”

  @flow
  async def input_step(ctx):
      return ctx.with_input(input(“You:”))

  agent = create_agent(
      input_step >>
      llm(“Answer the user: {input}”, llm_adapter=LLM_URL)
  )

  agent.run()
No chains, no graphs, no separate prompt/template objects. You can debug by putting breakpoints directly in the async steps.

Control flow is just Python

Loops and branching are written with normal Python logic, not DSL nodes:

  def repeat(step):
      async def run(ctx):
          while not ctx.done:
              ctx = await step.acall(ctx)
              return ctx
          return Flow(run)
The framework only schedules steps; it doesn’t try to own your control flow.

Switching model providers = change the URL

Another design choice: model backends are configured via a single LLM URL.

OpenAI:

  LLM_URL =
  “llm+openai://api.openai.com/v1/chat/completions?model=gpt-4.1-mini&api_key_env=OPENAI_API_KEY”
Switch to another OpenAI-compatible provider (for example SiliconFlow or local gateways):

  LLM_URL =
  “llm+openai://api.siliconflow.cn/v1/chat/completions?model=Qwen/Qwen2.5-7B-Instruct&api_key_env=SILICONFLOW_API_KEY”
The workflow code doesn’t change at all. Only runtime configuration does. This makes A/B testing models and switching providers much cheaper in practice.

When this is useful (and when it’s not)

PicoFlow is probably useful if you:

- want to prototype agents quickly - prefer explicit control flow - don’t want to learn a large framework abstraction

It’s probably not ideal if you:

- rely heavily on prebuilt components and integrations - want a batteries-included orchestration platform

Repo:

https://github.com/the-picoflow/picoflow

This is still early and opinionated. I’d really appreciate feedback on whether this style of “workflow as Python” is useful to others, or if people are solving this in better ways already.

Thanks!

Show HN: Snowfall Progress

https://www.kmjn.org/snow/
3•mjn•2m ago•0 comments

Patterns, Predictions, and Actions – A story about machine learning [pdf]

https://mlstory.org/pdf/patterns.pdf
1•vinhnx•3m ago•0 comments

The Possessed Machines

https://possessedmachines.com/
1•laurex•4m ago•0 comments

Elixir: Gradual Set-Theoretic Types

https://hexdocs.pm/elixir/main/gradual-set-theoretic-types.html
1•sergiotapia•18m ago•0 comments

Show HN: EchoFluid – a video transcription without uploading full videos

https://www.echofluid.com
1•samwulol•22m ago•0 comments

ICE Launches "Operation Catch-of-the-Day" Across Maine

https://www.dhs.gov/news/2026/01/21/ice-launches-operation-catch-day-targeting-worst-worst-crimin...
7•SanjayMehta•22m ago•2 comments

Show HN: AsyncReview – An OSS DevinReview Using RLMs

https://github.com/AsyncFuncAI/AsyncReview
1•sashimikun•27m ago•0 comments

Why is it legal and ok when big corp. straight tries to scam a user?

35•kingleopold•30m ago•9 comments

Read Bondi's Letter to Minnesota's Governor

https://www.nytimes.com/interactive/2026/01/24/us/pam-bondi-walz-doc.html
5•duxup•34m ago•1 comments

Skijoring is taking travellers off Colorado's ski-resort circuit

https://www.bbc.com/travel/article/20260121-skijoring-colorados-wildest-winter-sport
1•1659447091•34m ago•0 comments

ICE Is Not Like the Brownshirts, the Brownshirts Identified Themselves

https://www.mcsweeneys.net/articles/ice-is-nothing-like-the-brownshirts-because-the-brownshirts-a...
13•bjourne•42m ago•1 comments

The Responsibility of Intellectuals

https://www.nybooks.com/articles/1967/02/23/a-special-supplement-the-responsibility-of-intelle/
11•andsoitis•47m ago•2 comments

US SEC: India refused to serve summons to Adani Group under Hague Convention

https://economictimes.indiatimes.com/news/company/corporate-trends/us-regulator-seeks-to-bypass-i...
2•alok-g•47m ago•1 comments

Alex Honnold completes Taipei 101 skyscraper climb without ropes or safety net

https://www.cnn.com/sport/live-news/taiwan-alex-honnold-climb-taipei-101-01-25-26-intl-hnk
35•keepamovin•49m ago•20 comments

The Bay Area Has Lost Its Soul. No Wonder Everyone's Leaving [video]

https://www.youtube.com/watch?v=9_bsaF5TTEE
1•keepamovin•52m ago•1 comments

Prototyping NixOS with FDE, tang and Podman using Claude.AI

https://claude.ai/public/artifacts/e7cdb55a-3960-4dc9-bd1a-3c73a3145fb9
2•cptnslow•53m ago•1 comments

Show HN: VM-curator – a TUI alternative to libvirt and virt-manager

https://github.com/mroboff/vm-curator
5•theYipster•55m ago•1 comments

nvidia-smi hangs indefinitely after ~66 days

https://github.com/NVIDIA/open-gpu-kernel-modules/issues/971
45•tosh•58m ago•0 comments

Kb_text_shape: Harfbuzz like single file C/C++ text shaping library

https://github.com/JimmyLefevre/kb
2•inxode•58m ago•0 comments

ADSL Works over Wet String

https://www.revk.uk/2017/12/its-official-adsl-works-over-wet-string.html
3•Tiberium•1h ago•1 comments

AI Adoption Rates by Country

https://www.visualcapitalist.com/ai-adoption-rates-by-country/
2•divbzero•1h ago•1 comments

Managing High Performers

https://twitter.com/staysaasy/status/2015026826217742509
1•thisismytest•1h ago•1 comments

The case against ultrasonic humidifiers

https://dynomight.net/humidifiers/
6•arbuge•1h ago•2 comments

Unidentified Aerial Phenomena Near Nuclear Facilities – Enigma Labs

https://enigmalabs.io/collection/a7111520-9526-4939-9a66-d225db45ba80
1•lukeplato•1h ago•0 comments

BookLore: A self-hosted, multi-user digital library

https://github.com/booklore-app/booklore
4•thunderbong•1h ago•0 comments

Second Win11 emergency out of band update to address disastrous Patch Tuesday

https://www.windowscentral.com/microsoft/windows-11/windows-11-second-emergency-out-of-band-updat...
36•speckx•1h ago•3 comments

Inside Anduril's Bolt-M Kamikaze Drone Program

https://www.twz.com/uncategorized/inside-andurils-bolt-m-kamikaze-drone-program
3•breve•1h ago•2 comments

Bluesky CEO Jay Graber: Banning under-16s won't fix social media

https://www.ft.com/content/c6980fc4-97b6-40bf-a3d0-c40c3a6cac56
3•sealeck•1h ago•2 comments

Enterprises are eyeing End-To-End AI gateways

https://llmgateway.io/blog/unified-ai-gateway
2•steebchen•1h ago•1 comments

Show HN: React-meta-SEO – Rebuilding SEO for React 19 (3KB, no providers)

https://www.npmjs.com/package/react-meta-seo
2•Hacakthon•1h ago•0 comments