P2P agent pattern: deterministic workflow outside, swappable agentic core inside on LangGraph
hwchase17 · x · 2026-11-16
vitalflux shares their procure-to-pay agent architecture on LangChain: a deterministic shell (load context → agent core → exit gate → write back) wrapping a single swappable AgentCore.run(context) interface. Today it's a createagent loop; for messy cases (multiple invoices, disputes) createdeepagent drops in. Drawn from Anthropic's "Building effective agents": workflows for well-defined tasks, agency only where flexibility is needed. Rule of thumb from the diagram: if you can draw the flowchart use a workflow, if not use an agent, and keep unskippable rule checks in code since prompts are probabilistic.
More from coding & agent
- Open-source inbox app turns GitHub PR review into one AI-pre-reviewed queue via MCP — zeeg · 2026-11-16
- Researcher gives AI agents full iPhone control to pursue goals like "be a better friend" — charles_irl · 2026-11-16
- Vercel ships UI SDK for fully custom AI-generated UI components, early users impressed — shadcn · 2026-11-16
- Google offers free Antigravity Ultra access to physical and natural science researchers — DynamicWebPaige · 2026-11-16
- Google doubles context window for Antigravity's Argon, Carbon and Hydrogen, cutting compaction 3.5x — sundarpichai · 2026-11-16
- Nous Research Breaks Down How Hermes Agent Learns Skills and Improves Over Time — Teknium · 2026-11-16