Shipping your agent
Wrap the agent in a FastAPI endpoint that streams tokens and tool events over SSE, add two levels of timeout, keep state in a shared database, package it in a container, turn on tracing, and report what every conversation costs.
@theDevsDaily🐦
Wrap the agent in a FastAPI endpoint that streams tokens and tool events over SSE, add two levels of timeout, keep state in a shared database, package it in a container, turn on tracing, and report what every conversation costs.
Build a supervisor with payroll and policy specialists as tools, then compare it with a single agent on the same 30 questions for accuracy, latency and tokens. Split only when the numbers say so, and save Deep Agents for long, multi-step jobs that need a plan and a scratchpad.
interrupt() pauses a graph and saves its state, and Command(resume=…) continues it later, even from a new process after a restart. For free-form agents, HumanInTheLoopMiddleware makes chosen tools wait for approve, edit or reject. Writes wait; reads flow.
Booking leave is a process, not a chat. In a LangGraph graph, code owns the order of steps and the rules (valid dates, enough balance, submit once), the model only turns a sentence into fields, and an agent can still be one node in the graph.
A checkpointer keeps each conversation thread, a store keeps lasting facts about the person, runtime context tells tools who is asking, and SummarizationMiddleware keeps long threads affordable. You also decide in code what must never be remembered.