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
¶
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
¶
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
¶
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
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
CancelElicitationResponse
¶
Bases: AnnotatedObject
The elicitation was cancelled.
Source code in src/aclientp/schema/v2/elicitation.py
CompleteElicitationNotification
¶
Bases: AnnotatedObject
Notification sent by the agent when a URL-based elicitation is complete.
Source code in src/aclientp/schema/v2/elicitation.py
elicitation_id
instance-attribute
¶
elicitation_id: ElicitationId
The ID of the elicitation that completed.
DeclineElicitationResponse
¶
ElicitationSchema
¶
Bases: AnnotatedObject
Type-safe elicitation schema for requesting structured user input.
Source code in src/aclientp/schema/v2/elicitation.py
description
class-attribute
instance-attribute
¶
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
¶
List of required property names.
title
class-attribute
instance-attribute
¶
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
FormElicitationRequest
¶
Bases: _ScopedRequest
The client renders a form from requested_schema.
Source code in src/aclientp/schema/v2/elicitation.py
IntegerPropertySchema
¶
Bases: AnnotatedObject
Schema for integer properties in an elicitation form.
Source code in src/aclientp/schema/v2/elicitation.py
MultiSelectPropertySchema
¶
Bases: AnnotatedObject
Schema for multi-select (array) properties in an elicitation form.
Source code in src/aclientp/schema/v2/elicitation.py
default
class-attribute
instance-attribute
¶
Default selected values.
description
class-attribute
instance-attribute
¶
Human-readable description.
max_items
class-attribute
instance-attribute
¶
Maximum number of items to select.
min_items
class-attribute
instance-attribute
¶
Minimum number of items to select.
title
class-attribute
instance-attribute
¶
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
default
class-attribute
instance-attribute
¶
Default value.
description
class-attribute
instance-attribute
¶
Human-readable description.
maximum
class-attribute
instance-attribute
¶
Maximum value (inclusive).
minimum
class-attribute
instance-attribute
¶
Minimum value (inclusive).
title
class-attribute
instance-attribute
¶
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
enum
class-attribute
instance-attribute
¶
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
description
class-attribute
instance-attribute
¶
Human-readable description.
enum
class-attribute
instance-attribute
¶
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
¶
Maximum string length.
min_length
class-attribute
instance-attribute
¶
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
¶
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
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
UnknownElicitationResponse
¶
Bases: Unknown
A custom or future action; values starting with _ are extensions.
Source code in src/aclientp/schema/v2/elicitation.py
UnknownMultiSelectItems
¶
Bases: Unknown
Custom or future typed multi-select items.
Source code in src/aclientp/schema/v2/elicitation.py
UnknownPropertySchema
¶
Bases: Unknown
A custom or future property type; values starting with _ are extensions.
Source code in src/aclientp/schema/v2/elicitation.py
UrlElicitationRequest
¶
Bases: _ScopedRequest
The client directs the user to url.
Source code in src/aclientp/schema/v2/elicitation.py
elicitation_id
instance-attribute
¶
elicitation_id: ElicitationId
Unique identifier of the elicitation; completed with elicitation/complete.