mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: Add Python agent runtime project infrastructure (#563)
* Add Python agent runtime project infrastructure. * lint. * Rename agent_runtime dir to agent_framework_runtime. * fix uv.lock * Update pyproject for rename. * Update python/packages/runtime/agent_framework_runtime/agent_actor.py Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com> * Add runtime package to workspace and optional dependencies. --------- Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
6590a27c4e
commit
3286e8c8b1
@@ -0,0 +1,10 @@
|
||||
# Copyright (c) Microsoft. All rights reserved.
|
||||
|
||||
# Agent Runtime - Python Implementation
|
||||
|
||||
from .agent_actor import ActorId, RequestStatus
|
||||
|
||||
__all__ = [
|
||||
"ActorId",
|
||||
"RequestStatus",
|
||||
]
|
||||
@@ -0,0 +1,26 @@
|
||||
# Copyright (c) Microsoft. All rights reserved.
|
||||
|
||||
"""Core actor abstractions for the Python actor runtime."""
|
||||
|
||||
from dataclasses import dataclass
|
||||
from enum import Enum
|
||||
|
||||
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class ActorId:
|
||||
"""Unique identifier for an actor instance."""
|
||||
|
||||
type_name: str
|
||||
instance_id: str
|
||||
|
||||
def __str__(self) -> str:
|
||||
"""Return the string representation of the actor ID."""
|
||||
return f"{self.type_name}/{self.instance_id}"
|
||||
|
||||
|
||||
class RequestStatus(Enum):
|
||||
"""Status of a request being processed by an actor."""
|
||||
|
||||
PENDING = "pending"
|
||||
COMPLETED = "completed"
|
||||
FAILED = "failed"
|
||||
Reference in New Issue
Block a user