action server.yaml
Rasa SDK - Action Server Endpoint
Description
HTTP API of the action server which is used by Rasa to execute custom actions.
Servers
- URL:
http://localhost:5055/webhook- Description: Local development action server
Paths
/
POST
- Summary: Core request to execute a custom action
- Description: Rasa Core sends a request to the action server to execute a certain custom action. As a response to the action call from Core, you can modify the tracker, e.g. by setting slots and send responses back to the user.
- Operation ID:
call_action - Request Body:
- Description: Describes the action to be called and provides information on the current state of the conversation.
- Required: true
- Content:
- application/json:
- Schema:
- Type: object
- Properties:
- next_action:
- Description: The name of the action which should be executed.
- Type: string
- sender_id:
- Description: Unique id of the user who is having the current conversation.
- Type: string
- tracker:
- $ref: '#/components/schemas/Tracker'
- domain:
- $ref: '#/components/schemas/Domain'
- next_action:
- Properties:
- Type: object
- Schema:
- application/json:
Responses
- 200:
- Description: Action was executed successfully.
- Content:
- application/json:
- Schema:
- Type: object
- Properties:
- events:
- Description: Events returned by the action.
- Type: array
- Items:
- $ref: '#/components/schemas/Event'
- responses:
- Description: List of responses which should be sent to the user.
- Type: array
- Items:
- $ref: '#/components/schemas/Response'
- events:
- Properties:
- Type: object
- Schema:
- application/json:
- 400:
- Description: Action execution was rejected. This is the same as returning an
ActionExecutionRejectedevent. - Content:
- application/json:
- Schema:
- Type: object
- Properties:
- action_name:
- Type: string
- Description: Name of the action which rejected its execution.
- error:
- Type: string
- Description: The error message.
- action_name:
- Properties:
- Type: object
- Schema:
- application/json:
- Description: Action execution was rejected. This is the same as returning an
- 500:
- Description: The action server encountered an exception while running the action.
Components
Schemas
- Response:
- OneOf:
- $ref: '#/components/schemas/TextResponse'
- $ref: '#/components/schemas/TemplateResponse'
- $ref: '#/components/schemas/ButtonResponse'
- OneOf:
TextResponse
- Description: Text which the bot should utter.
- Type: object
- Properties:
- text:
- Description: The text which should be uttered.
- Type: string
- text:
- Required:
- text
TemplateResponse
- Description: Response template the bot should utter.
- Type: object
- Properties:
- template:
- Description: Name of the template
- Type: string
- additionalProperties:
- Description: Keyword argument to fill the template
- Type: string
- template:
- Required:
- template
ButtonResponse
- Description: Text with buttons which should be sent to the user.
- Type: object
- Properties:
- text:
- Type: string
- Description: Message
- buttons:
- Type: array
- Items:
- $ref: '#/components/schemas/Button'
- text:
Button
- Description: A button which can be clicked by the user in the conversation.
- Type: object
- Properties:
- title:
- Type: string
- Description: The text on the button
- payload:
- Type: string
- Description: Payload which is sent if the button is pressed.
- title:
SlotValue
- OneOf:
- Type: string
- Type: array
- Items:
- Type: string
- Items:
Slot
- Type: object
- AdditionalProperties:
- $ref: '#/components/schemas/SlotValue'
- Example:
- slot_name: slot_value
Entity
- Type: object
- Description: Entities within a message.
- Properties:
- start:
- Type: integer
- Description: Char offset of the start
- end:
- Type: integer
- Description: Char offset of the end
- value:
- Type: string
- Description: Found value for entity
- entity:
- Type: string
- Description: Type of the entity
- confidence:
- Type: number
- start:
- Required:
- start
- end
- value
- entity
Intent
- Type: object
- Description: Intent of the text
- Properties:
- confidence:
- Type: number
- Description: Confidence of the intent
- Example: 0.6323
- name:
- Type: string
- Description: Intent name
- Example: greet
- confidence:
- Required:
- confidence
- name
BasicCommand
- Type: object
- Properties:
- command:
- Type: string
- Description: Command to be executed
- Example: very basic
- command:
StartFlowCommand
- AllOf:
- $ref: '#/components/schemas/BasicCommand'
- Type: object
- Properties:
- command:
- Enum:
- start flow
- Example: start flow
- Enum:
- flow:
- Type: string
- Description: Name of the flow to be started
- Example: transfer_money
- command:
CancelFlowCommand
- AllOf:
- $ref: '#/components/schemas/BasicCommand'
- Type: object
- Properties:
- command:
- Enum:
- cancel flow
- Example: cancel flow
- Enum:
- command:
ClarifyCommand
- AllOf:
- $ref: '#/components/schemas/BasicCommand'
- Type: object
- Properties:
- command:
- Enum:
- clarify
- Example: clarify
- Enum:
- options:
- Type: array
- Items:
- Type: string
- command:
SetSlotCommand
- AllOf:
- $ref: '#/components/schemas/BasicCommand'
- Type: object
- Properties:
- command:
- Enum:
- set slot
- Example: set slot
- Enum:
- name:
- Type: string
- Description: Name of the slot to be set
- Example: name
- value:
- Type: any
- Description: Value of the slot to be set
- Example: John Doe
- command:
ChitChatAnswerCommand
- AllOf:
- $ref: '#/components/schemas/BasicCommand'
- Type: object
- Properties:
- command:
- Enum:
- chitchat
- Example: chitchat
- Enum:
- command:
KnowledgeAnswerCommand
- AllOf:
- $ref: '#/components/schemas/BasicCommand'
- Type: object
- Properties:
- command:
- Enum:
- knowledge
- Example: knowledge
- Enum:
- command:
HumanHandoffCommand
- AllOf:
- $ref: '#/components/schemas/BasicCommand'
- Type: object
- Properties:
- command:
- Enum:
- human handoff
- Example: human handoff
- Enum:
- command:
SkipQuestionCommand
- AllOf:
- $ref: '#/components/schemas/BasicCommand'
- Type: object
- Properties:
- command:
- Enum:
- skip question
- Example: skip question
- Enum:
- command:
Command
- AnyOf:
- $ref: '#/components/schemas/StartFlowCommand'
- $ref: '#/components/schemas/CancelFlowCommand'
- $ref: '#/components/schemas/ClarifyCommand'
- $ref: '#/components/schemas/SetSlotCommand'
- $ref: '#/components/schemas/ChitChatAnswerCommand'
- $ref: '#/components/schemas/KnowledgeAnswerCommand'
- $ref: '#/components/schemas/HumanHandoffCommand'
- $ref: '#/components/schemas/SkipQuestionCommand'
ParseResult
- Type: object
- Properties:
- entities:
- Type: array
- Description: Parsed entities
- Items:
- $ref: '#/components/schemas/Entity'
- intent:
- $ref: '#/components/schemas/Intent'
- intent_ranking:
- Type: array
- Description: Scores of all intents
- Items:
- $ref: '#/components/schemas/Intent'
- text:
- Type: string
- Description: Text of the message
- Example: Hello!
- message_id:
- Type: string
- Description: ID of the message
- Example: b2831e73-1407-4ba0-a861-0f30a42a2a5
- metadata:
- Type: object
- Properties: {}
- commands:
- Type: array
- Description: Commands to be executed
- Items:
- $ref: '#/components/schemas/Command'
- flows_from_semantic_search:
- Type: array
- Items:
- Type: array
- Items:
- Type: string
- Type: number
- Items:
- Type: array
- flows_in_prompt:
- Type: array
- Items:
- Type: string
- Description: NLU parser information. If set, message will not be passed through NLU, but instead this parsing information will be used.
- entities:
- Required:
- text
BasicEvent
- Type: object
- Properties:
- event:
- Type: string
- Description: Event name
- Example: slot
- timestamp:
- Type: number
- Description: Unix timestamp (float) of when the event was applied.
- Example: 1774447464.622012
- metadata:
- Type: object
- Description: Arbitrary metadata attached to the event by the channel or model, e.g. session_id, model_id, assistant_id, model_name.
- AdditionalProperties: true
- Example:
- session_id: eed351b9-a996-4bb8-83ea-1d18e7cd4905
- model_id: 80687713793f4d07957e8e51f73df866
- assistant_id: my-assistant
- event:
- Required:
- event
UserEvent
- AllOf:
- $ref: '#/components/schemas/BasicEvent'
- Type: object
- Description: Event for incoming user message.
- Properties:
- event:
- Enum:
- user
- Example: user
- Enum:
- text:
- Type: string
- Nullable: true
- Description: Text of user message.
- input_channel:
- Type: string
- Nullable: true
- message_id:
- Type: string
- Nullable: true
- parse_data:
- $ref: '#/components/schemas/ParseResult'
- anonymized_at:
- Type: string
- Nullable: true
- Description: ISO 8601 timestamp of when PII in this event was anonymized, or
nullif the event has not been anonymized.
- event:
BotEvent
- AllOf:
- $ref: '#/components/schemas/BasicEvent'
- Type: object
- Description: Event for an outgoing bot message.
- Properties:
- event:
- Enum:
- bot
- Example: bot
- Enum:
- text:
- Type: string
- Nullable: true
- Description: Text of the bot response.
- data:
- Type: object
- Nullable: true
- Description: Rich response payload (buttons, images, attachments, etc.).
- Properties:
- image:
- Type: string
- Nullable: true
- buttons:
- Type: array
- Nullable: true
- Items:
- Type: object
- attachment:
- Type: string
- Nullable: true
- elements:
- Type: array
- Nullable: true
- Items:
- Type: object
- quick_replies:
- Type: array
- Nullable: true
- Items:
- Type: object
- custom:
- Nullable: true
- attachment:
- Type: object
- image:
- anonymized_at:
- Type: string
- Nullable: true
- Description: ISO 8601 timestamp of when PII in this event was anonymized, or
nullif the event has not been anonymized.
- event:
SessionStartedEvent
- AllOf:
- $ref: '#/components/schemas/BasicEvent'
- Type: object
- Properties:
- event:
- Enum:
- session_started
- Example: session_started
- Enum:
- event:
ActionEvent
- AllOf:
- $ref: '#/components/schemas/BasicEvent'
- Type: object
- Properties:
- event:
- Enum:
- action
- Example: action
- Enum:
- policy:
- Type: string
- Nullable: true
- confidence:
- Type: number
- Nullable: true
- name:
- Type: string
- Nullable: true
- hide_rule_turn:
- Type: boolean
- action_text:
- Type: string
- Nullable: true
- event:
SlotEvent
- AllOf:
- $ref: '#/components/schemas/BasicEvent'
- Type: object
- Properties:
- event:
- Enum:
- slot
- Example: slot
- Enum:
- name:
- Type: string
- value:
- Type: {}
- filled_by:
- Type: string
- Nullable: true
- Description: Identifier of the extractor that filled the slot (e.g.
LLM,CommandPayloadReader), ornullif not set by an extractor. - Example: LLM
- anonymized_at:
- Type: string
- Nullable: true
- Description: ISO 8601 timestamp of when PII in this event was anonymized, or
nullif the event has not been anonymized.
- event:
- Required:
- name
- value
ResetSlotsEvent
- AllOf:
- $ref: '#/components/schemas/BasicEvent'
- Type: object
- Properties:
- event:
- Enum:
- reset_slots
- Example: reset_slots
- Enum:
- event:
RestartEvent
- AllOf:
- $ref: '#/components/schemas/BasicEvent'
- Type: object
- Properties:
- event:
- Enum:
- restart
- Example: restart
- Enum:
- event:
ReminderEvent
- AllOf:
- $ref: '#/components/schemas/BasicEvent'
- Type: object
- Properties:
- event:
- Enum:
- reminder
- Example: reminder
- Enum:
- event:
CancelReminderEvent
- AllOf:
- $ref: '#/components/schemas/BasicEvent'
- Type: object
- Properties:
- event:
- Enum:
- cancel_reminder
- Example: cancel_reminder
- Enum:
- event:
PauseEvent
- AllOf:
- $ref: '#/components/schemas/BasicEvent'
- Type: object
- Properties:
- event:
- Enum:
- pause
- Example: pause
- Enum:
- event:
ResumeEvent
- AllOf:
- $ref: '#/components/schemas/BasicEvent'
- Type: object
- Properties:
- event:
- Enum:
- resume
- Example: resume
- Enum:
- event:
FollowupEvent
- AllOf:
- $ref: '#/components/schemas/BasicEvent'
- Type: object
- Properties:
- event:
- Enum:
- followup
- Example: followup
- Enum:
- event:
ExportEvent
- AllOf:
- $ref: '#/components/schemas/BasicEvent'
- Type: object
- Properties:
- event:
- Enum:
- export
- Example: export
- Enum:
- event:
UndoEvent
- AllOf:
- $ref: '#/components/schemas/BasicEvent'
- Type: object
- Properties:
- event:
- Enum:
- undo
- Example: undo
- Enum:
- event:
RewindEvent
- AllOf:
- $ref: '#/components/schemas/BasicEvent'
- Type: object
- Properties:
- event:
- Enum:
- rewind
- Example: rewind
- Enum:
- event:
AgentEvent
- AllOf:
- $ref: '#/components/schemas/BasicEvent'
- Type: object
- Properties:
- event:
- Enum:
- agent
- Example: agent
- Enum:
- event:
EntitiesAddedEvent
- AllOf:
- $ref: '#/components/schemas/BasicEvent'
- Type: object
- Properties:
- event:
- Enum:
- entities
- Example: entities
- Enum:
- entities:
- Type: array
- Items:
- Type: object
- Properties:
- start:
- Type: integer
- end:
- Type: integer
- entity:
- Type: string
- confidence:
- Type: number
- extractor:
- Type: string
- Nullable: true
- value:
- Type: {}
- role:
- Type: string
- Nullable: true
- group:
- Type: string
- Nullable: true
- start:
- Properties:
- Type: object
- Required:
- entity
- value
- Required:
- entities
- event:
UserFeaturizationEvent
- AllOf:
- $ref: '#/components/schemas/BasicEvent'
- Type: object
- Properties:
- event:
- Enum:
- user_featurization
- Example: user_featurization
- Enum:
- use_text_for_featurization:
- Type: boolean
- Description: Whether the user message text was used for featurization.
- Example: false
- event:
ActionExecutionRejectedEvent
- AllOf:
- $ref: '#/components/schemas/BasicEvent'
- Type: object
- Properties:
- event:
- Enum:
- action_execution_rejected
- Example: action_execution_rejected
- Enum:
- event:
FormValidationEvent
- AllOf:
- $ref: '#/components/schemas/BasicEvent'
- Type: object
- Properties:
- event:
- Enum:
- form_validation
- Example: form_validation
- Enum:
- event:
LoopInterruptedEvent
- AllOf:
- $ref: '#/components/schemas/BasicEvent'
- Type: object
- Properties:
- event:
- Enum:
- loop_interrupted
- Example: loop_interrupted
- Enum:
- event:
FormEvent
- AllOf:
- $ref: '#/components/schemas/BasicEvent'
- Type: object
- Properties:
- event:
- Enum:
- form
- Example: form
- Enum:
- event:
ActiveLoopEvent
- AllOf:
- $ref: '#/components/schemas/BasicEvent'
- Type: object
- Properties:
- event:
- Enum:
- active_loop
- Example: active_loop
- Enum:
- event:
StackEvent
- AllOf:
- $ref: '#/components/schemas/BasicEvent'
- Type: object
- Description: CALM dialogue stack update event. Contains a JSON Patch document describing the change applied to the conversation stack.
- Properties:
- event:
- Enum:
- stack
- Example: stack
- Enum:
- update:
- Type: string
- Description: JSON Patch (RFC 6902) string describing the stack mutation, e.g. add/replace/remove operations on stack frames.
- Example:
-[{"op": "add", "path": "/0", "value": {"frame_id": "Z9X2EAS9","flow_id": "tax_issue", "step_id": "START", "frame_type":"regular", "type": "flow"}}]
- event:
- Required:
- update
FlowStartedEvent
- AllOf:
- $ref: '#/components/schemas/BasicEvent'
- Type: object
- Description: Emitted when a CALM flow begins execution.
- Properties:
- event:
- Enum:
- flow_started
- Example: flow_started
- Enum:
- flow_id:
- Type: string
- Description: ID of the flow that started.
- Example: tax_issue
- event:
- Required:
- flow_id
FlowCompletedEvent
- AllOf:
- $ref: '#/components/schemas/BasicEvent'
- Type: object
- Description: Emitted when a CALM flow finishes execution.
- Properties:
- event:
- Enum:
- flow_completed
- Example: flow_completed
- Enum:
- flow_id:
- Type: string
- Description: ID of the flow that completed.
- Example: tax_issue
- step_id:
- Type: string
- Description: ID of the last step executed before the flow completed.
- Example: tax_issue_4_utter_submit_issue
- event:
- Required:
- flow_id
Event
- AnyOf:
- $ref: '#/components/schemas/UserEvent'
- $ref: '#/components/schemas/BotEvent'
- $ref: '#/components/schemas/SessionStartedEvent'
- $ref: '#/components/schemas/ActionEvent'
- $ref: '#/components/schemas/SlotEvent'
- $ref: '#/components/schemas/ResetSlotsEvent'
- $ref: '#/components/schemas/RestartEvent'
- $ref: '#/components/schemas/ReminderEvent'
- $ref: '#/components/schemas/CancelReminderEvent'
- $ref: '#/components/schemas/PauseEvent'
- $ref: '#/components/schemas/ResumeEvent'
- $ref: '#/components/schemas/FollowupEvent'
- $ref: '#/components/schemas/ExportEvent'
- $ref: '#/components/schemas/UndoEvent'
- $ref: '#/components/schemas/RewindEvent'
- $ref: '#/components/schemas/AgentEvent'
- $ref: '#/components/schemas/EntitiesAddedEvent'
- $ref: '#/components/schemas/UserFeaturizationEvent'
- $ref: '#/components/schemas/ActionExecutionRejectedEvent'
- $ref: '#/components/schemas/FormValidationEvent'
- $ref: '#/components/schemas/LoopInterruptedEvent'
- $ref: '#/components/schemas/FormEvent'
- $ref: '#/components/schemas/ActiveLoopEvent'
- $ref: '#/components/schemas/StackEvent'
- $ref: '#/components/schemas/FlowStartedEvent'
- $ref: '#/components/schemas/FlowCompletedEvent'
EventList
- Type: array
- Items:
- $ref: '#/components/schemas/Event'
LatestAction
- Type: object
- Properties:
- action_name:
- Type: string
- Description: latest action name
- action_text:
- Type: string
- Description: text of last bot utterance
- action_name:
- Description: Latest bot action.
Tracker
- Type: object
- Description: Conversation tracker which stores the conversation state.
- Properties:
- sender_id:
- Type: string
- Description: ID of the conversation
- Example: default
- user_id:
- Type: string
- Nullable: true
- Description: Optional identifier of the end user associated with this conversation. Omitted from serialized output when
null. - Example: usr_a1b2c3d4e5f6
- current_session_id:
- Type: string
- Nullable: true
- Description: Session ID derived from the metadata of the last stored event.
nullwhen the last event isConversationInactive, indicating no active session. - Example: 4b3c1e2a-91f0-4d8e-b123-abc123def456
- slots:
- Type: array
- Description: Slot values
- Items:
- $ref: '#/components/schemas/Slot'
- latest_message:
- $ref: '#/components/schemas/ParseResult'
- latest_event_time:
- Type: number
- Description: Most recent event time
- Example: 1537645578.314389
- followup_action:
- Type: string
- Description: Deterministic scheduled next action
- paused:
- Type: boolean
- Description: Bot is paused
- Example: false
- stack:
- Type: array
- Nullable: true
- Items:
- Type: object
- Properties: {}
- Type: object
- Example:
- frame_id: 8UJPHH5C
- flow_id: transfer_money
- step_id: START
- frame_type: regular
- type: flow
- events:
- Description: Event history
- $ref: '#/components/schemas/EventList'
- latest_input_channel:
- Type: string
- Description: Communication channel
- Example: rest
- latest_action_name:
- Type: string
- Description: Name of last bot action
- Example: action_listen
- latest_action:
- $ref: '#/components/schemas/LatestAction'
- active_loop:
- Type: object
- Description: Name of the active loop
- Properties:
- name:
- Type: string
- Description: Name of the active loop
- Example: restaurant_form
- name:
- sender_id:
IntentDescription
- Type: object
- AdditionalProperties:
- Type: object
- Properties:
- use_entities:
- Type: boolean
- use_entities:
SlotDescription
- Type: object
- Properties:
- auto_fill:
- Type: boolean
- initial_value:
- Type: string
- Nullable: true
- type:
- Type: string
- values:
- Type: array
- Items:
- Type: string
- auto_fill:
- Required:
- type
- auto_fill
TemplateDescription
- Type: object
- Properties:
- text:
- Type: string
- Description: Template text
- text:
- Required:
- text
Domain
- Type: object
- Description: The bot's domain.
- Properties:
- config:
- Type: object
- Description: Additional option
- Properties:
- store_entities_as_slots:
- Type: boolean
- Description: Store all entities as slot when found
- Example: false
- store_entities_as_slots:
- intents:
- Type: array
- Description: All intent names and properties
- Items:
- $ref: '#/components/schemas/IntentDescription'
- entities:
- Type: array
- Description: All entity names
- Items:
- Type: string
- Example:
- person
- location
- slots:
- Description: Slot names and configuration
- Type: object
- AdditionalProperties:
- $ref: '#/components/schemas/SlotDescription'
- responses:
- Description: Bot response templates
- Type: object
- AdditionalProperties:
- $ref: '#/components/schemas/TemplateDescription'
- actions:
- Description: Available action names
- Type: array
- Items:
- Type: string
- Example:
- action_greet
- action_goodbye
- action_listen
- config: