Skip to content

PromptResponse

Base classes

Name Children Inherits
Response
aclientp.schema.base
Base request model.

⋔ Inheritance diagram

graph TD
  95970859875040["agent_responses.PromptResponse"]
  95970861210848["base.Response"]
  95970862258240["base.AnnotatedObject"]
  95970862254416["base.Schema"]
  95970851503232["main.BaseModel"]
  125067848591872["builtins.object"]
  95970861210848 --> 95970859875040
  95970862258240 --> 95970861210848
  95970862254416 --> 95970862258240
  95970851503232 --> 95970862254416
  125067848591872 --> 95970851503232

🛈 DocStrings

Bases: Response

Response from processing a user prompt.

See protocol docs: Check for Completion

Source code in src/aclientp/schema/agent_responses.py
class PromptResponse(Response):
    """Response from processing a user prompt.

    See protocol docs: [Check for Completion](https://agentclientprotocol.com/protocol/prompt-turn#4-check-for-completion)
    """

    stop_reason: StopReason
    """Indicates why the agent stopped processing the turn."""

    usage: Usage | None = None
    """**UNSTABLE**: Token usage for this turn (optional)."""

stop_reason instance-attribute

stop_reason: StopReason

Indicates why the agent stopped processing the turn.

usage class-attribute instance-attribute

usage: Usage | None = None

UNSTABLE: Token usage for this turn (optional).

:fa-brands-github: Show source on GitHub