🎉 ai-infra v1.0 is here — Production-ready AI/LLM infrastructure
What's new
nfrax logonfrax

Infrastructure that just works. Ship products, not boilerplate.

Frameworks

  • svc-infra
  • ai-infra
  • fin-infra
  • robo-infra

Resources

  • Getting Started
  • What's New
  • Contributing

Community

  • GitHub

© 2026 nfrax. All rights reserved.

nfrax logonfrax
Start HereWhat's New
GitHub
ai-infra / API Reference

WorkflowRecorder

from ai_infra.replay import WorkflowRecorder
View source
ai_infra.replay

Records agent workflow steps for later replay. The recorder captures: - LLM calls (messages sent to model) - Tool calls (tool name and arguments) - Tool results (return values from tools) - Final agent responses

python
from ai_infra.replay import WorkflowRecorder, MemoryStorage

    storage = MemoryStorage()
    recorder = WorkflowRecorder("workflow_123", storage)

    # Record steps as agent runs
    recorder.record_llm_call([{"role": "user", "content": "Hello"}])
    recorder.record_tool_call("get_weather", {"city": "NYC"})
    recorder.record_tool_result("get_weather", {"temp": 72})
    recorder.record_agent_response("The weather in NYC is 72°F")

    # Save to storage
    recorder.save()
Constructor
WorkflowRecorder(record_id: str, storage: Storage | None = None)
ParameterTypeDefaultDescription
record_idrequiredstr—Unique identifier for this recording
storageStorage |NoneNoneStorage backend. If None, uses default storage.

Methods

On This Page

Constructorclearrecord_agent_responserecord_llm_callrecord_tool_callrecord_tool_resultsavetimeline