Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement python side of GetState/SaveState Orleans persistence #4375

Open
rysweet opened this issue Nov 26, 2024 · 0 comments
Open

Implement python side of GetState/SaveState Orleans persistence #4375

rysweet opened this issue Nov 26, 2024 · 0 comments

Comments

@rysweet
Copy link
Collaborator

rysweet commented Nov 26, 2024

What feature would you like to be added?

neither, but agent state could be used to achieve both. this is in particular to just implement

    async def GetState(  # type: ignore
        self,
        request: agent_worker_pb2.AgentId,
        context: grpc.aio.ServicerContext[agent_worker_pb2.AgentId, agent_worker_pb2.GetStateResponse],
    ) -> agent_worker_pb2.GetStateResponse:  # type: ignore
        raise NotImplementedError("Method not implemented!")
    async def SaveState(  # type: ignore
        self,
        request: agent_worker_pb2.AgentState,
        context: grpc.aio.ServicerContext[agent_worker_pb2.AgentId, agent_worker_pb2.SaveStateResponse],
    ) -> agent_worker_pb2.SaveStateResponse:  # type: ignore
        raise NotImplementedError("Method not implemented!")

https://github.com/microsoft/autogen/blob/ryswee-xlang-aspire/python/packages/autogen-core/src/autogen_core/application/_worker_runtime_host_servicer.py#L263-L264
autogen/python/packages/autogen-core/src/autogen_core/application/_worker_runtime_host_servicer.py at ryswee-xlang-aspire · microsoft/autogen
A programming framework for agentic AI 🤖. Contribute to microsoft/autogen development by creating an account on GitHub.

Its not a general purpose memory, just a way to plumb through Orleans persistence.

this lets you write stateless agents that still can resiliently carry out a stateful workflow.

eg here: https://github.com/microsoft/autogen/blob/ryswee-xlang-aspire/dotnet/samples/Hello/HelloAgentState/Program.cs#L80-L81 we have an example where the agent relies on the agent state to determine the state of the workflow.
Program.cs
microsoft/autogen

Why is this needed?

enables using the persistence apis in Orleans

@rysweet rysweet added the x-lang label Nov 26, 2024
@rysweet rysweet added this to the 0.4.0 milestone Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant