Skip to content

Instantly share code, notes, and snippets.

@elijahbenizzy
Created December 22, 2024 23:47
Show Gist options
  • Save elijahbenizzy/5e76ee60b93054d8406787a6074f72bd to your computer and use it in GitHub Desktop.
Save elijahbenizzy/5e76ee60b93054d8406787a6074f72bd to your computer and use it in GitHub Desktop.
persister = SQLitePersister(db_path="./db")
persister.initialize()
app = (
ApplicationBuilder()
.with_actions(user_input, final_results, generate_all_poems=GenerateAllPoems())
.with_transitions(
("user_input", "generate_all_poems"),
("generate_all_poems", "final_results"),
)
.with_tracker(project="demo:parallel_agents_fault_tolerance")
.with_state_persister(persister)
.initialize_from(
persister,
resume_at_next_action=True,
default_state={},
default_entrypoint="user_input"
)
.build()
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment