elicitation
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| BooleanPropertySchema aclientp.schema.elicitation Schema for boolean properties in an elicitation form. |
||
| ElicitationCapabilities aclientp.schema.elicitation Elicitation capabilities supported by the client. |
||
| ElicitationCompleteNotification aclientp.schema.elicitation Notification sent by the agent when a URL-based elicitation is complete. |
||
| ElicitationFormCapabilities aclientp.schema.elicitation Form-based elicitation capabilities. |
||
| ElicitationRequest aclientp.schema.elicitation Request from the agent to elicit structured user input (``elicitation/create``). |
||
| ElicitationResponse aclientp.schema.elicitation Response from the client to an elicitation request. |
||
| ElicitationSchema aclientp.schema.elicitation Type-safe elicitation schema for requesting structured user input. |
||
| ElicitationUrlCapabilities aclientp.schema.elicitation URL-based elicitation capabilities. |
||
| EnumOption aclientp.schema.elicitation A titled enum option with a const value, human-readable title and optional description. |
||
| IntegerPropertySchema aclientp.schema.elicitation Schema for integer properties in an elicitation form. |
||
| MultiSelectPropertySchema aclientp.schema.elicitation Schema for multi-select (array) properties in an elicitation form. |
||
| NumberPropertySchema aclientp.schema.elicitation Schema for number (floating-point) properties in an elicitation form. |
||
| StringFormat aclientp.schema.elicitation String format types for string properties in elicitation schemas. |
||
| StringPropertySchema aclientp.schema.elicitation Schema for string properties in an elicitation form. |
||
| TitledMultiSelectItems aclientp.schema.elicitation Items definition for titled multi-select enum properties. |
||
| UntitledMultiSelectItems aclientp.schema.elicitation Items definition for untitled multi-select enum properties. |
🛈 DocStrings¶
Elicitation schema definitions.
Defines types for agent-initiated elicitation, where the agent requests structured input from the user via forms or URLs.
ElicitationActionType
module-attribute
¶
User action in response to an elicitation.
ElicitationContentValue
module-attribute
¶
Possible value types in elicitation content.
ElicitationModeType
module-attribute
¶
Elicitation mode. Values beginning with _ are implementation-specific.
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")],
Discriminator(_property_schema_discriminator),
]
Property schema for elicitation form fields.
Each variant corresponds to a JSON Schema "type" value.
MultiSelectItems
module-attribute
¶
MultiSelectItems = Annotated[
Annotated[UntitledMultiSelectItems, Tag("untitled")]
| Annotated[TitledMultiSelectItems, Tag("titled")],
Discriminator(_multi_select_items_discriminator),
]
Items for a multi-select (array) property schema.
BooleanPropertySchema
¶
Bases: AnnotatedObject
Schema for boolean properties in an elicitation form.
Source code in src/aclientp/schema/elicitation.py
ElicitationCapabilities
¶
Bases: AnnotatedObject
Elicitation capabilities supported by the client.
Source code in src/aclientp/schema/elicitation.py
form
class-attribute
instance-attribute
¶
form: ElicitationFormCapabilities | None = None
Whether the client supports form-based elicitation.
url
class-attribute
instance-attribute
¶
url: ElicitationUrlCapabilities | None = None
Whether the client supports URL-based elicitation.
ElicitationCompleteNotification
¶
Bases: AnnotatedObject
Notification sent by the agent when a URL-based elicitation is complete.
Source code in src/aclientp/schema/elicitation.py
ElicitationFormCapabilities
¶
Bases: AnnotatedObject
Form-based elicitation capabilities.
Source code in src/aclientp/schema/elicitation.py
ElicitationRequest
¶
Bases: Request
Request from the agent to elicit structured user input (elicitation/create).
The agent sends this to the client to request information from the user, either via a form or by directing them to a URL.
Mode and scope fields are flattened into the request on the wire:
mode: "form"carriesrequested_schema.mode: "url"carrieselicitation_idandurl.- Session scope sets
session_id(and optionallytool_call_id), request scope setsrequest_id(e.g. during auth before any session exists).
Source code in src/aclientp/schema/elicitation.py
296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 | |
elicitation_id
class-attribute
instance-attribute
¶
URL mode: the unique identifier for this elicitation.
request_id
class-attribute
instance-attribute
¶
Request scope: the JSON-RPC request this elicitation is tied to.
requested_schema
class-attribute
instance-attribute
¶
requested_schema: ElicitationSchema | None = None
Form mode: a JSON Schema describing the form fields to present to the user.
session_id
class-attribute
instance-attribute
¶
Session scope: the session this elicitation is tied to.
tool_call_id
class-attribute
instance-attribute
¶
Session scope: optional tool call within the session.
url
class-attribute
instance-attribute
¶
URL mode: the URL to direct the user to.
form
classmethod
¶
form(
message: str,
schema: ElicitationSchema,
*,
session_id: str | None = None,
tool_call_id: str | None = None,
request_id: int | str | None = None,
) -> Self
Create a form-based elicitation request.
Source code in src/aclientp/schema/elicitation.py
url_based
classmethod
¶
url_based(
message: str,
elicitation_id: str,
url: str,
*,
session_id: str | None = None,
tool_call_id: str | None = None,
request_id: int | str | None = None,
) -> Self
Create a URL-based elicitation request.
Source code in src/aclientp/schema/elicitation.py
ElicitationResponse
¶
Bases: Response
Response from the client to an elicitation request.
Source code in src/aclientp/schema/elicitation.py
content
class-attribute
instance-attribute
¶
content: dict[str, ElicitationContentValue] | None = None
For accept: the user-provided content, as an object matching the requested schema.
ElicitationSchema
¶
Bases: AnnotatedObject
Type-safe elicitation schema for requesting structured user input.
This represents a JSON Schema object with primitive-typed properties, as required by the elicitation specification.
Source code in src/aclientp/schema/elicitation.py
description
class-attribute
instance-attribute
¶
Optional description of what this schema represents.
properties
class-attribute
instance-attribute
¶
properties: dict[str, ElicitationPropertySchema] = Field(default_factory=dict)
Property definitions (must be primitive types).
required
class-attribute
instance-attribute
¶
List of required property names.
type
class-attribute
instance-attribute
¶
Type discriminator. Always "object".
ElicitationUrlCapabilities
¶
Bases: AnnotatedObject
URL-based elicitation capabilities.
Source code in src/aclientp/schema/elicitation.py
EnumOption
¶
Bases: AnnotatedObject
A titled enum option with a const value, human-readable title and optional description.
Source code in src/aclientp/schema/elicitation.py
IntegerPropertySchema
¶
Bases: AnnotatedObject
Schema for integer properties in an elicitation form.
Source code in src/aclientp/schema/elicitation.py
MultiSelectPropertySchema
¶
Bases: AnnotatedObject
Schema for multi-select (array) properties in an elicitation form.
Source code in src/aclientp/schema/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/elicitation.py
StringFormat
¶
String format types for string properties in elicitation schemas.
Source code in src/aclientp/schema/elicitation.py
StringPropertySchema
¶
Bases: AnnotatedObject
Schema for string properties in an elicitation form.
When enum_values or one_of is set, this represents a single-select enum.
Source code in src/aclientp/schema/elicitation.py
description
class-attribute
instance-attribute
¶
Human-readable description.
enum
class-attribute
instance-attribute
¶
Enum values for untitled single-select enums.
format
class-attribute
instance-attribute
¶
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] | None = None
Titled enum options for titled single-select enums.
pattern
class-attribute
instance-attribute
¶
Pattern the string must match.
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/elicitation.py
UntitledMultiSelectItems
¶
Bases: AnnotatedObject
Items definition for untitled multi-select enum properties.