Skip to content

Conversation

AnatoliB
Copy link
Contributor

@AnatoliB AnatoliB commented Aug 4, 2025

This PR converts the openai_agents/basic/hello_world.py sample into a Durable orchestrator.

You can invoke it like this:

$r = irm 'http://localhost:7071/api/orchestrators/basic_hello_world_orchestrator'
irm $r.statusQueryGetUri

Example output:

name            : basic_hello_world_orchestrator
instanceId      : 0bb5ea28e72f414babc48a4fb544827d
runtimeStatus   : Completed
input           : 
customStatus    : 
output          : Code calls itself back,  
                  A loop within a function,  
                  Infinite mirrors.
createdTime     : 8/4/2025 6:16:44 AM
lastUpdatedTime : 8/4/2025 6:16:49 AM

This is not a demonstration of the intended final result. This PR wraps the entire agent invocation into an explicitly defined activity. This is done just so that this app builds and runs. Instead of wrapping this code in an activity function like this, we should be able to invoke it from the orchestrator directly. In order to enable this, Runner.run invocations should be implicitly wrapped in activity invocations, and this is what we should do next.

Copy link
Contributor

@nytian nytian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we include the PR description as a README.md file in this sample directory? That would be more clear and also helpful for customer who uses this sample.

@AnatoliB AnatoliB closed this Aug 15, 2025
@AnatoliB AnatoliB deleted the anatolib/durable-app branch September 18, 2025 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants