Skip to content

elicitation

Class info

Classes

Name Children Inherits
AcceptElicitationResponse
aclientp.schema.v2.elicitation
The user accepted and provided content.
    BooleanPropertySchema
    aclientp.schema.v2.elicitation
    Schema for boolean properties in an elicitation form.
      CancelElicitationResponse
      aclientp.schema.v2.elicitation
      The elicitation was cancelled.
        CompleteElicitationNotification
        aclientp.schema.v2.elicitation
        Notification sent by the agent when a URL-based elicitation is complete.
          DeclineElicitationResponse
          aclientp.schema.v2.elicitation
          The user declined.
            ElicitationSchema
            aclientp.schema.v2.elicitation
            Type-safe elicitation schema for requesting structured user input.
              EnumOption
              aclientp.schema.v2.elicitation
              A titled enum option with a const value, human-readable title, and optional description.
                FormElicitationRequest
                aclientp.schema.v2.elicitation
                The client renders a form from ``requested_schema``.
                  IntegerPropertySchema
                  aclientp.schema.v2.elicitation
                  Schema for integer properties in an elicitation form.
                    MultiSelectPropertySchema
                    aclientp.schema.v2.elicitation
                    Schema for multi-select (array) properties in an elicitation form.
                      NumberPropertySchema
                      aclientp.schema.v2.elicitation
                      Schema for number (floating-point) properties in an elicitation form.
                        StringMultiSelectItems
                        aclientp.schema.v2.elicitation
                        String item schema for multi-select enum properties.
                          StringPropertySchema
                          aclientp.schema.v2.elicitation
                          Schema for string properties in an elicitation form.
                            TitledMultiSelectItems
                            aclientp.schema.v2.elicitation
                            Items definition for titled multi-select enum properties.
                              UnknownElicitationRequest
                              aclientp.schema.v2.elicitation
                              A custom or future mode; values starting with ``_`` are extensions.
                                UnknownElicitationResponse
                                aclientp.schema.v2.elicitation
                                A custom or future action; values starting with ``_`` are extensions.
                                  UnknownMultiSelectItems
                                  aclientp.schema.v2.elicitation
                                  Custom or future typed multi-select items.
                                    UnknownPropertySchema
                                    aclientp.schema.v2.elicitation
                                    A custom or future property type; values starting with ``_`` are extensions.
                                      UrlElicitationRequest
                                      aclientp.schema.v2.elicitation
                                      The client directs the user to ``url``.

                                        🛈 DocStrings

                                        v2 elicitation: structured user input requested by the agent (form or URL).

                                        Each request is scoped either to a session (optionally a tool call) or to a pending client-to-agent request outside of a session, e.g. during authentication.

                                        CreateElicitationRequest module-attribute

                                        CreateElicitationRequest = Annotated[
                                            Annotated[FormElicitationRequest, Tag("form")]
                                            | Annotated[UrlElicitationRequest, Tag("url")]
                                            | Annotated[UnknownElicitationRequest, Tag(OTHER_TAG)],
                                            Discriminator(open_discriminator("mode", frozenset({"form", "url"}))),
                                        ]
                                        

                                        Parameters of elicitation/create: structured user input the agent asks for.

                                        CreateElicitationResponse module-attribute

                                        CreateElicitationResponse = Annotated[
                                            Annotated[AcceptElicitationResponse, Tag("accept")]
                                            | Annotated[DeclineElicitationResponse, Tag("decline")]
                                            | Annotated[CancelElicitationResponse, Tag("cancel")]
                                            | Annotated[UnknownElicitationResponse, Tag(OTHER_TAG)],
                                            Discriminator(open_discriminator("action", frozenset({"accept", "decline", "cancel"}))),
                                        ]
                                        

                                        Response to elicitation/create.

                                        ElicitationContentValue module-attribute

                                        ElicitationContentValue = str | int | float | bool | Sequence[str] | Any
                                        

                                        A value in an accepted elicitation's content; other JSON values are kept.

                                        ElicitationPropertySchema module-attribute

                                        ElicitationPropertySchema = Annotated[
                                            Annotated[StringPropertySchema, Tag("string")]
                                            | Annotated[NumberPropertySchema, Tag("number")]
                                            | Annotated[IntegerPropertySchema, Tag("integer")]
                                            | Annotated[BooleanPropertySchema, Tag("boolean")]
                                            | Annotated[MultiSelectPropertySchema, Tag("array")]
                                            | Annotated[UnknownPropertySchema, Tag(OTHER_TAG)],
                                            Discriminator(
                                                open_discriminator("type", frozenset({"string", "number", "integer", "boolean", "array"}))
                                            ),
                                        ]
                                        

                                        A form field: string (or single-select enum), number, integer, boolean or multi-select.

                                        ElicitationSchemaType module-attribute

                                        ElicitationSchemaType = Literal['object']
                                        

                                        Type of an elicitation schema: always object.

                                        MultiSelectItems module-attribute

                                        MultiSelectItems = Annotated[
                                            Annotated[StringMultiSelectItems, Tag("string")]
                                            | Annotated[TitledMultiSelectItems, Tag("titled")]
                                            | Annotated[UnknownMultiSelectItems, Tag(OTHER_TAG)],
                                            Discriminator(_multi_select_items_tag),
                                        ]
                                        

                                        Allowed values of a multi-select property: plain strings, or titled options (no type).

                                        StringFormat module-attribute

                                        StringFormat = Literal['email', 'uri', 'date', 'date-time'] | str
                                        

                                        Format of a string property; unknown formats are kept.

                                        AcceptElicitationResponse

                                        Bases: AnnotatedObject

                                        The user accepted and provided content.

                                        Source code in src/aclientp/schema/v2/elicitation.py
                                        class AcceptElicitationResponse(AnnotatedObject):
                                            """The user accepted and provided content."""
                                        
                                            action: Literal["accept"] = Field(default="accept", init=False)
                                        
                                            content: dict[str, ElicitationContentValue] | MISSING | None = MISSING
                                            """The content, matching the requested schema."""
                                        

                                        content class-attribute instance-attribute

                                        content: dict[str, ElicitationContentValue] | MISSING | None = MISSING
                                        

                                        The content, matching the requested schema.

                                        BooleanPropertySchema

                                        Bases: AnnotatedObject

                                        Schema for boolean properties in an elicitation form.

                                        Source code in src/aclientp/schema/v2/elicitation.py
                                        class BooleanPropertySchema(AnnotatedObject):
                                            """Schema for boolean properties in an elicitation form."""
                                        
                                            type: Literal["boolean"] = Field(default="boolean", init=False)
                                        
                                            title: str | MISSING | None = MISSING
                                            """Optional title for the property."""
                                        
                                            description: str | MISSING | None = MISSING
                                            """Human-readable description."""
                                        
                                            default: bool | MISSING | None = MISSING
                                            """Default value."""
                                        

                                        default class-attribute instance-attribute

                                        default: bool | MISSING | None = MISSING
                                        

                                        Default value.

                                        description class-attribute instance-attribute

                                        description: str | MISSING | None = MISSING
                                        

                                        Human-readable description.

                                        title class-attribute instance-attribute

                                        title: str | MISSING | None = MISSING
                                        

                                        Optional title for the property.

                                        CancelElicitationResponse

                                        Bases: AnnotatedObject

                                        The elicitation was cancelled.

                                        Source code in src/aclientp/schema/v2/elicitation.py
                                        class CancelElicitationResponse(AnnotatedObject):
                                            """The elicitation was cancelled."""
                                        
                                            action: Literal["cancel"] = Field(default="cancel", init=False)
                                        

                                        CompleteElicitationNotification

                                        Bases: AnnotatedObject

                                        Notification sent by the agent when a URL-based elicitation is complete.

                                        Source code in src/aclientp/schema/v2/elicitation.py
                                        class CompleteElicitationNotification(AnnotatedObject):
                                            """Notification sent by the agent when a URL-based elicitation is complete."""
                                        
                                            elicitation_id: ElicitationId
                                            """The ID of the elicitation that completed."""
                                        

                                        elicitation_id instance-attribute

                                        elicitation_id: ElicitationId
                                        

                                        The ID of the elicitation that completed.

                                        DeclineElicitationResponse

                                        Bases: AnnotatedObject

                                        The user declined.

                                        Source code in src/aclientp/schema/v2/elicitation.py
                                        class DeclineElicitationResponse(AnnotatedObject):
                                            """The user declined."""
                                        
                                            action: Literal["decline"] = Field(default="decline", init=False)
                                        

                                        ElicitationSchema

                                        Bases: AnnotatedObject

                                        Type-safe elicitation schema for requesting structured user input.

                                        Source code in src/aclientp/schema/v2/elicitation.py
                                        class ElicitationSchema(AnnotatedObject):
                                            """Type-safe elicitation schema for requesting structured user input."""
                                        
                                            type: ElicitationSchemaType = Field(default="object", init=False)
                                            """Type discriminator. Always ``"object"``. Any other value is rejected."""
                                        
                                            title: str | MISSING | None = MISSING
                                            """Optional title for the schema."""
                                        
                                            properties: dict[str, ElicitationPropertySchema]
                                            """Property definitions (must be primitive types)."""
                                        
                                            required: Sequence[str] | MISSING | None = MISSING
                                            """List of required property names."""
                                        
                                            description: str | MISSING | None = MISSING
                                            """Optional description of what this schema represents."""
                                        

                                        description class-attribute instance-attribute

                                        description: str | MISSING | None = MISSING
                                        

                                        Optional description of what this schema represents.

                                        properties instance-attribute

                                        properties: dict[str, ElicitationPropertySchema]
                                        

                                        Property definitions (must be primitive types).

                                        required class-attribute instance-attribute

                                        required: Sequence[str] | MISSING | None = MISSING
                                        

                                        List of required property names.

                                        title class-attribute instance-attribute

                                        title: str | MISSING | None = MISSING
                                        

                                        Optional title for the schema.

                                        type class-attribute instance-attribute

                                        type: ElicitationSchemaType = Field(default='object', init=False)
                                        

                                        Type discriminator. Always "object". Any other value is rejected.

                                        EnumOption

                                        Bases: AnnotatedObject

                                        A titled enum option with a const value, human-readable title, and optional description.

                                        Source code in src/aclientp/schema/v2/elicitation.py
                                        class EnumOption(AnnotatedObject):
                                            """A titled enum option with a const value, human-readable title, and optional description."""
                                        
                                            const: str
                                            """The constant value for this option."""
                                        
                                            title: str
                                            """Human-readable title for this option."""
                                        
                                            description: str | MISSING | None = MISSING
                                            """Human-readable description."""
                                        

                                        const instance-attribute

                                        const: str
                                        

                                        The constant value for this option.

                                        description class-attribute instance-attribute

                                        description: str | MISSING | None = MISSING
                                        

                                        Human-readable description.

                                        title instance-attribute

                                        title: str
                                        

                                        Human-readable title for this option.

                                        FormElicitationRequest

                                        Bases: _ScopedRequest

                                        The client renders a form from requested_schema.

                                        Source code in src/aclientp/schema/v2/elicitation.py
                                        class FormElicitationRequest(_ScopedRequest):
                                            """The client renders a form from ``requested_schema``."""
                                        
                                            mode: Literal["form"] = Field(default="form", init=False)
                                        
                                            requested_schema: ElicitationSchema
                                            """The form fields."""
                                        

                                        requested_schema instance-attribute

                                        requested_schema: ElicitationSchema
                                        

                                        The form fields.

                                        IntegerPropertySchema

                                        Bases: AnnotatedObject

                                        Schema for integer properties in an elicitation form.

                                        Source code in src/aclientp/schema/v2/elicitation.py
                                        class IntegerPropertySchema(AnnotatedObject):
                                            """Schema for integer properties in an elicitation form."""
                                        
                                            type: Literal["integer"] = Field(default="integer", init=False)
                                        
                                            title: str | MISSING | None = MISSING
                                            """Optional title for the property."""
                                        
                                            description: str | MISSING | None = MISSING
                                            """Human-readable description."""
                                        
                                            minimum: int | MISSING | None = MISSING
                                            """Minimum value (inclusive)."""
                                        
                                            maximum: int | MISSING | None = MISSING
                                            """Maximum value (inclusive)."""
                                        
                                            default: int | MISSING | None = MISSING
                                            """Default value."""
                                        

                                        default class-attribute instance-attribute

                                        default: int | MISSING | None = MISSING
                                        

                                        Default value.

                                        description class-attribute instance-attribute

                                        description: str | MISSING | None = MISSING
                                        

                                        Human-readable description.

                                        maximum class-attribute instance-attribute

                                        maximum: int | MISSING | None = MISSING
                                        

                                        Maximum value (inclusive).

                                        minimum class-attribute instance-attribute

                                        minimum: int | MISSING | None = MISSING
                                        

                                        Minimum value (inclusive).

                                        title class-attribute instance-attribute

                                        title: str | MISSING | None = MISSING
                                        

                                        Optional title for the property.

                                        MultiSelectPropertySchema

                                        Bases: AnnotatedObject

                                        Schema for multi-select (array) properties in an elicitation form.

                                        Source code in src/aclientp/schema/v2/elicitation.py
                                        class MultiSelectPropertySchema(AnnotatedObject):
                                            """Schema for multi-select (array) properties in an elicitation form."""
                                        
                                            type: Literal["array"] = Field(default="array", init=False)
                                        
                                            title: str | MISSING | None = MISSING
                                            """Optional title for the property."""
                                        
                                            description: str | MISSING | None = MISSING
                                            """Human-readable description."""
                                        
                                            min_items: int | MISSING | None = Field(default=MISSING, ge=0)
                                            """Minimum number of items to select."""
                                        
                                            max_items: int | MISSING | None = Field(default=MISSING, ge=0)
                                            """Maximum number of items to select."""
                                        
                                            items: MultiSelectItems
                                            """The items definition describing allowed values."""
                                        
                                            default: Sequence[str] | MISSING | None = MISSING
                                            """Default selected values."""
                                        

                                        default class-attribute instance-attribute

                                        default: Sequence[str] | MISSING | None = MISSING
                                        

                                        Default selected values.

                                        description class-attribute instance-attribute

                                        description: str | MISSING | None = MISSING
                                        

                                        Human-readable description.

                                        items instance-attribute

                                        The items definition describing allowed values.

                                        max_items class-attribute instance-attribute

                                        max_items: int | MISSING | None = Field(default=MISSING, ge=0)
                                        

                                        Maximum number of items to select.

                                        min_items class-attribute instance-attribute

                                        min_items: int | MISSING | None = Field(default=MISSING, ge=0)
                                        

                                        Minimum number of items to select.

                                        title class-attribute instance-attribute

                                        title: str | MISSING | None = MISSING
                                        

                                        Optional title for the property.

                                        NumberPropertySchema

                                        Bases: AnnotatedObject

                                        Schema for number (floating-point) properties in an elicitation form.

                                        Source code in src/aclientp/schema/v2/elicitation.py
                                        class NumberPropertySchema(AnnotatedObject):
                                            """Schema for number (floating-point) properties in an elicitation form."""
                                        
                                            type: Literal["number"] = Field(default="number", init=False)
                                        
                                            title: str | MISSING | None = MISSING
                                            """Optional title for the property."""
                                        
                                            description: str | MISSING | None = MISSING
                                            """Human-readable description."""
                                        
                                            minimum: float | MISSING | None = MISSING
                                            """Minimum value (inclusive)."""
                                        
                                            maximum: float | MISSING | None = MISSING
                                            """Maximum value (inclusive)."""
                                        
                                            default: float | MISSING | None = MISSING
                                            """Default value."""
                                        

                                        default class-attribute instance-attribute

                                        default: float | MISSING | None = MISSING
                                        

                                        Default value.

                                        description class-attribute instance-attribute

                                        description: str | MISSING | None = MISSING
                                        

                                        Human-readable description.

                                        maximum class-attribute instance-attribute

                                        maximum: float | MISSING | None = MISSING
                                        

                                        Maximum value (inclusive).

                                        minimum class-attribute instance-attribute

                                        minimum: float | MISSING | None = MISSING
                                        

                                        Minimum value (inclusive).

                                        title class-attribute instance-attribute

                                        title: str | MISSING | None = MISSING
                                        

                                        Optional title for the property.

                                        StringMultiSelectItems

                                        Bases: AnnotatedObject

                                        String item schema for multi-select enum properties.

                                        Source code in src/aclientp/schema/v2/elicitation.py
                                        class StringMultiSelectItems(AnnotatedObject):
                                            """String item schema for multi-select enum properties."""
                                        
                                            type: Literal["string"] = Field(default="string", init=False)
                                        
                                            enum: Sequence[str] = Field(min_length=1)
                                            """Allowed enum values. Must contain at least one value."""
                                        

                                        enum class-attribute instance-attribute

                                        enum: Sequence[str] = Field(min_length=1)
                                        

                                        Allowed enum values. Must contain at least one value.

                                        StringPropertySchema

                                        Bases: AnnotatedObject

                                        Schema for string properties in an elicitation form.

                                        Source code in src/aclientp/schema/v2/elicitation.py
                                        class StringPropertySchema(AnnotatedObject):
                                            """Schema for string properties in an elicitation form."""
                                        
                                            type: Literal["string"] = Field(default="string", init=False)
                                        
                                            title: str | MISSING | None = MISSING
                                            """Optional title for the property."""
                                        
                                            description: str | MISSING | None = MISSING
                                            """Human-readable description."""
                                        
                                            min_length: int | MISSING | None = Field(default=MISSING, ge=0)
                                            """Minimum string length."""
                                        
                                            max_length: int | MISSING | None = Field(default=MISSING, ge=0)
                                            """Maximum string length."""
                                        
                                            format: StringFormat | MISSING | None = MISSING
                                            """String format."""
                                        
                                            default: str | MISSING | None = MISSING
                                            """Default value."""
                                        
                                            enum: Sequence[str] | MISSING | None = Field(default=MISSING, min_length=1)
                                            """Enum values for untitled single-select enums. Must contain at least one value when
                                            present."""
                                        
                                            one_of: Sequence[EnumOption] | MISSING | None = Field(default=MISSING, min_length=1)
                                            """Titled enum options for titled single-select enums. Must contain at least one option when
                                            present."""
                                        

                                        default class-attribute instance-attribute

                                        default: str | MISSING | None = MISSING
                                        

                                        Default value.

                                        description class-attribute instance-attribute

                                        description: str | MISSING | None = MISSING
                                        

                                        Human-readable description.

                                        enum class-attribute instance-attribute

                                        enum: Sequence[str] | MISSING | None = Field(default=MISSING, min_length=1)
                                        

                                        Enum values for untitled single-select enums. Must contain at least one value when present.

                                        format class-attribute instance-attribute

                                        format: StringFormat | MISSING | None = MISSING
                                        

                                        String format.

                                        max_length class-attribute instance-attribute

                                        max_length: int | MISSING | None = Field(default=MISSING, ge=0)
                                        

                                        Maximum string length.

                                        min_length class-attribute instance-attribute

                                        min_length: int | MISSING | None = Field(default=MISSING, ge=0)
                                        

                                        Minimum string length.

                                        one_of class-attribute instance-attribute

                                        one_of: Sequence[EnumOption] | MISSING | None = Field(default=MISSING, min_length=1)
                                        

                                        Titled enum options for titled single-select enums. Must contain at least one option when present.

                                        title class-attribute instance-attribute

                                        title: str | MISSING | None = MISSING
                                        

                                        Optional title for the property.

                                        TitledMultiSelectItems

                                        Bases: AnnotatedObject

                                        Items definition for titled multi-select enum properties.

                                        Source code in src/aclientp/schema/v2/elicitation.py
                                        class TitledMultiSelectItems(AnnotatedObject):
                                            """Items definition for titled multi-select enum properties."""
                                        
                                            any_of: Sequence[EnumOption] = Field(min_length=1)
                                            """Titled enum options. Must contain at least one option."""
                                        

                                        any_of class-attribute instance-attribute

                                        any_of: Sequence[EnumOption] = Field(min_length=1)
                                        

                                        Titled enum options. Must contain at least one option.

                                        UnknownElicitationRequest

                                        Bases: Unknown

                                        A custom or future mode; values starting with _ are extensions.

                                        Source code in src/aclientp/schema/v2/elicitation.py
                                        class UnknownElicitationRequest(Unknown):
                                            """A custom or future mode; values starting with ``_`` are extensions."""
                                        
                                            mode: str
                                            """The mode."""
                                        
                                            message: str
                                            """What input is needed."""
                                        

                                        message instance-attribute

                                        message: str
                                        

                                        What input is needed.

                                        mode instance-attribute

                                        mode: str
                                        

                                        The mode.

                                        UnknownElicitationResponse

                                        Bases: Unknown

                                        A custom or future action; values starting with _ are extensions.

                                        Source code in src/aclientp/schema/v2/elicitation.py
                                        class UnknownElicitationResponse(Unknown):
                                            """A custom or future action; values starting with ``_`` are extensions."""
                                        
                                            action: str
                                            """The action."""
                                        

                                        action instance-attribute

                                        action: str
                                        

                                        The action.

                                        UnknownMultiSelectItems

                                        Bases: Unknown

                                        Custom or future typed multi-select items.

                                        Source code in src/aclientp/schema/v2/elicitation.py
                                        class UnknownMultiSelectItems(Unknown):
                                            """Custom or future typed multi-select items."""
                                        
                                            type: str
                                            """The item type."""
                                        

                                        type instance-attribute

                                        type: str
                                        

                                        The item type.

                                        UnknownPropertySchema

                                        Bases: Unknown

                                        A custom or future property type; values starting with _ are extensions.

                                        Source code in src/aclientp/schema/v2/elicitation.py
                                        class UnknownPropertySchema(Unknown):
                                            """A custom or future property type; values starting with ``_`` are extensions."""
                                        
                                            type: str
                                            """The property type."""
                                        

                                        type instance-attribute

                                        type: str
                                        

                                        The property type.

                                        UrlElicitationRequest

                                        Bases: _ScopedRequest

                                        The client directs the user to url.

                                        Source code in src/aclientp/schema/v2/elicitation.py
                                        class UrlElicitationRequest(_ScopedRequest):
                                            """The client directs the user to ``url``."""
                                        
                                            mode: Literal["url"] = Field(default="url", init=False)
                                        
                                            elicitation_id: ElicitationId
                                            """Unique identifier of the elicitation; completed with ``elicitation/complete``."""
                                        
                                            url: str
                                            """The URL to direct the user to."""
                                        

                                        elicitation_id instance-attribute

                                        elicitation_id: ElicitationId
                                        

                                        Unique identifier of the elicitation; completed with elicitation/complete.

                                        url instance-attribute

                                        url: str
                                        

                                        The URL to direct the user to.