Downcity
API Reference

Session Types and Results

The most important fields and meanings in Session input and output objects

Session Types and Results

The most common input and output objects are:

  • AgentSessionSetInput
  • AgentSessionPromptInput
  • AgentSessionTurnHandle
  • AgentSessionTurnResult
  • AgentSessionEvent
  • AgentSessionMetadata

AgentSessionPromptInput

Core field:

  • query

AgentSessionTurnHandle

Core fields:

  • id
  • result
  • finished

AgentSessionTurnResult

Core fields:

  • turnId
  • success
  • error
  • text

For most users, text is the field they consume most directly. Use session.subscribe() when you need real-time UI updates before finished resolves.