Skip to content
ZHIVEXDocs

zhivex_ai.integrations.responses

Python 0.25.0 · published wheel reference and guides.

PythonMixed

Public import paths and stability come from the installed artifact.

Use the root for Stable APIs and focused namespaces for extensions. Legacy root extension imports remain classified below.

AgentResolver

Beta · protocol

from zhivex_ai.integrations.responses import AgentResolver
AgentResolver (public type alias or constant; no callable signature)

InMemoryResponsesEventStore

Beta · protocol

from zhivex_ai.integrations.responses import InMemoryResponsesEventStore
InMemoryResponsesEventStore() -> 'None'
Process-local reference store for tests and development.

Multi-replica deployments must supply an application-owned implementation
that scopes every operation using the trusted ``ProtocolInvocation``.

ResponsesAgentHost

Beta · protocol

from zhivex_ai.integrations.responses import ResponsesAgentHost
ResponsesAgentHost(agents: 'AgentResolver', *, run_options_resolver: 'ProtocolRunOptionsResolver | None' = None, error_mapper: 'ProtocolErrorMapper | None' = None, on_protocol_event: 'ProtocolEventCallback | None' = None, limits: 'ProtocolLimits | None' = None, event_store: 'ResponsesEventStore | None' = None) -> 'None'
Host configured agents behind the OpenAI Responses create/stream shape.

The request ``model`` is an application-owned alias. It never accepts or
constructs arbitrary provider credentials or provider model identifiers.

ResponsesEventStore

Beta · protocol

from zhivex_ai.integrations.responses import ResponsesEventStore
ResponsesEventStore(*args, **kwargs)
Base class for protocol classes.

Protocol classes are defined as::

    class Proto(Protocol):
        def meth(self) -> int:
            ...

Such classes are primarily used with static type checkers that recognize
structural subtyping (static duck-typing).

For example::

    class C:
        def meth(self) -> int:
            return 0

    def func(x: Proto) -> int:
        return x.meth()

    func(C())  # Passes static type check

See PEP 544 for details. Protocol classes decorated with
@typing.runtime_checkable act as simple-minded runtime protocols that check
only the presence of given attributes, ignoring their type signatures.
Protocol classes can be generic, they are defined as::

    class GenProto[T](Protocol):
        def meth(self) -> T:
            ...

StoredResponsesRun

Beta · protocol

from zhivex_ai.integrations.responses import StoredResponsesRun
StoredResponsesRun(response_id: 'str', model: 'str', status: 'str' = 'in_progress', response: 'dict[str, Any] | None' = None, events: 'list[dict[str, Any]]' = <factory>, internal_run_id: 'str | None' = None) -> None
StoredResponsesRun(response_id: 'str', model: 'str', status: 'str' = 'in_progress', response: 'dict[str, Any] | None' = None, events: 'list[dict[str, Any]]' = <factory>, internal_run_id: 'str | None' = None)

create_agent_playground_app

Beta · protocol

from zhivex_ai.integrations.responses import create_agent_playground_app
create_agent_playground_app(*, agents: 'AgentResolver', authorize: 'Callable[[Any], bool | Awaitable[bool]] | None' = None, max_request_bytes: 'int | None' = None, limits: 'ProtocolLimits | None' = None, run_options_resolver: 'ProtocolRunOptionsResolver | None' = None, error_mapper: 'ProtocolErrorMapper | None' = None, on_protocol_event: 'ProtocolEventCallback | None' = None, event_store: 'ResponsesEventStore | None' = None)
Create a local playground plus the Responses-compatible endpoint.

create_responses_app

Beta · protocol

from zhivex_ai.integrations.responses import create_responses_app
create_responses_app(*, agents: 'AgentResolver', authorize: 'Callable[[Any], bool | Awaitable[bool]] | None' = None, max_request_bytes: 'int | None' = None, limits: 'ProtocolLimits | None' = None, run_options_resolver: 'ProtocolRunOptionsResolver | None' = None, error_mapper: 'ProtocolErrorMapper | None' = None, on_protocol_event: 'ProtocolEventCallback | None' = None, event_store: 'ResponsesEventStore | None' = None)
Create an optional FastAPI app with ``POST /v1/responses``.
Zhivex AI SDKsPortable by default. Native when needed.
Copied