AI / Apache Burr Interview questions
How does the Burr UI’s tracking client double as a state loader for local development?
LocalTrackingClient implements both sides of the persistence contract at once: it writes step-by-step telemetry to ~/.burr as your application runs (the same data the Burr UI reads), and it can also load a prior run’s state back via its .load() classmethod.
tracker = LocalTrackingClient(project=project_name) app = ( ApplicationBuilder() .with_actions(ai_converse=ai_converse, human_converse=human_converse, terminal=Result("chat_history")) .with_transitions( ("ai_converse", "human_converse", default), ("human_converse", "terminal", expr("'exit' in question")), ("human_converse", "ai_converse", default), ) .initialize_from( tracker, resume_at_next_action=True, default_state={"chat_history": []}, default_entrypoint="human_converse", ) .with_tracker(tracker) .with_identifiers(app_id=app_id) .build() )
Passing the same tracker instance to both with_tracker() and initialize_from() means a single object both records and replays a run, which is convenient for local iteration but is explicitly called out as not recommended for production — production setups should use a dedicated database-backed persister instead.
More Related questions...