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:

  • AgentSession
  • RemoteAgentSession
  • AgentSessionSetInput
  • AgentSessionPromptInput
  • AgentSessionTurnHandle
  • AgentSessionTurnResult
  • AgentSessionEvent
  • AgentSessionInfo

AgentSessionPromptInput

Core field:

  • query

AgentSessionTurnHandle

Core fields:

  • id
  • result
  • finished

AgentSessionTurnResult

Core fields:

  • turnId
  • success
  • error
  • text
  • assistantMessage (usually available on local sessions)

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