Example usages
Define and run a durable flow
import kitaru
from kitaru import checkpoint, flow
@checkpoint
def research(topic: str) -> str:
return kitaru.llm(f"Summarize {topic} in two sentences.")
@checkpoint
def draft_report(summary: str) -> str:
return kitaru.llm(f"Write a short report based on: {summary}")
@flow
def research_agent(topic: str) -> str:
summary = research(topic)
return draft_report(summary)
if __name__ == "__main__":
handle = research_agent.run(topic="durable execution for AI agents")
print(handle.wait())Inspect executions with KitaruClient
KitaruClientLast updated
Was this helpful?