Back to Podcast Digest
AI Engineer20m

A Piece of Pi: Embedding The OpenClaw Coding Agent In Your Product — Matthias Luebken, Tavon

TL;DR

  • Pi is being pitched as a hackable foundation, not a polished framework — Matthias Luebken keeps stressing that Pi’s value is its minimalism: an agent is basically “an LLM agent that runs tools in a loop,” which makes it easy to rip apart, extend, and embed into products.

  • The big design pattern is to make your system easy for coding agents to use — instead of building highly abstract integrations, Luebken argues teams should expose small, reliable interfaces like CLIs, because agents are already good at shells, Bash, and tool calls.

  • OpenClaw’s magic is mostly tool use plus runtime access, not mysterious intelligence — his favorite example is an OpenClaw agent handling a voice message by reaching for tools like ffmpeg, even though it had no built-in “voice” feature.

  • Pi’s extension model points beyond terminal coding assistants — he demos a CRM-style extension with slash commands, session events, and UI selection widgets, then shows a rough web UI version using the same extension mechanism.

  • His real product example is an email-driven sales agent system for RFPs — at Tavon/TAI, they built a workflow where incoming emails get routed to per-customer agents with customer-specific instructions, CRM/ERP tools, and persistent sessions that generate draft replies for humans to edit.

  • Sandboxing and control are still early, but already central — Luebken says they’re just getting started on securing these systems and specifically calls out Nvidia’s OpenClaw/Open Shell policy work as worth studying.

The Breakdown

“We’re in the around-and-find-out phase”

Matthias Luebken opens with the right level of humility: this space is moving so fast that if he gave the same talk in a few weeks, it would probably change. He frames Pi and OpenClaw as something to explore hands-on, not something with settled best practices or a definitive book yet.

Why coding agents fit the old Unix idea

He reaches back to Ken Thompson’s famous line — “write programs that do one thing and do one thing well” — and says that works in agents’ favor. His example is Co-work bundling a coding agent with finance workflows: what looks like an “Excel skill” is really a package of small tools like pandas, OpenPyXL, and LibreOffice under the hood.

Pi, stripped down to the core loop

Luebken intentionally de-mystifies the whole thing: an agent is just an LLM using tools in a loop with goals and context. He shows Pi’s TypeScript agent core through a tiny CRM lead-qualifier app, where commands like “show me all leads and score them” trigger tool calls, results, and event streams — simple enough that he says he basically vibe-coded it as a learning exercise.

Hooks, events, and the part enterprise teams will care about

From there he highlights the practical controls: before-tool-call hooks, event subscriptions, and places to inject rules. His example is blocking a contact update unless some check passes, the kind of role-based or policy logic that turns a toy agent into something an organization could actually trust.

What makes a coding agent different: shell + runtime

The leap from agent core to coding agent is mostly the addition of a runtime and a shell, usually Bash. That’s where things get interesting: he cites Peter sending OpenClaw a voice message, and the agent solving it not through a special voice capability but by chaining ordinary tools on the local machine, including ffmpeg — which, from the outside, feels like learning, but inside is just another tool call.

Extensions that blur backend logic and UI

He then demos a CRM-flavored Pi coding-agent extension that adds a /pipeline command and, crucially, UI interactions like select menus and dropdowns. That’s the moment where his excitement shows: the agent isn’t just calling backend systems anymore, it’s participating in interface flow, and he even shows a rough web UI built on the same extension mechanism, despite noting the framework is still refactoring toward cleaner support.

OpenClaw as a multi-agent, multi-channel Pi system

Luebken explains that OpenClaw isn’t just one agent in one coding session — it’s a more complex orchestration layer with multiple threads, multiple agents, sessions, provider routing, sub-agents, and gateway support. The key point is that underneath all that, OpenClaw still leans heavily on Pi’s core packages like session handling, agent core, the coding agent, model abstraction, and terminal UI.

The real use case: sales emails routed to customer-specific agents

The talk lands with a concrete client system: incoming RFP emails are monitored, routed through a gateway, and handed to one agent per customer, each with its own general harness plus customer-specific instructions covering quirks, discounts, and behavior. Those agents use CLI-exposed CRM and ERP tools inside a sandbox, reuse sessions for back-and-forth continuity, and ultimately generate draft replies so users can stay in their inbox instead of learning a new app — while all the agent activity hums behind the scenes in session threads and tool calls.

Share