INNER CODE UNIT · Python

__init__

evalstate/fast-agent · src/fast_agent/a2a/server.py:227

    def __init__(
        self,
        primary_instance: AgentInstance,
        create_instance: Callable[[], Awaitable[AgentInstance]],
        dispose_instance: Callable[[AgentInstance], Awaitable[None]],
        *,
        primary_agent_name: str,
        instance_scope: str = "connection",
    ) -> None:
        self._primary_instance = primary_instance
        self._create_instance = create_instance
        self._dispose_instance = dispose_instance
        self._primary_agent_name = primary_agent_name
        self._instance_scope = instance_scope
        self._context_instances: dict[str, AgentInstance] = {}
        self._context_locks: dict[str, asyncio.Lock] = {}
        self._running_tasks: dict[str, asyncio.Task[None]] = {}
        self._lock = asyncio.Lock()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…