Components
Component methods enable the discovery, introspection, and execution of workflow components. These methods form the core of the Stepflow Protocol and are used extensively during workflow execution.
Overview
The component methods provide a complete lifecycle for working with components:
components/list
- Discover all available componentscomponents/info
- Get detailed information about a specific componentcomponents/execute
- Execute a component with input data
components/list Method
Method Name: components/list
Direction: Runtime → Component Server
Type: Request (expects response)
- Schema Viewer
- Schema Source
Loading ....
{
"description": "Sent from Stepflow to the component server to request a list of all available components.",
"type": "object"
}
- Schema Viewer
- Schema Source
Loading ....
{
"description": "Sent from the component server back to Stepflow with a list of all available components.",
"type": "object",
"properties": {
"components": {
"description": "A list of all available components.",
"type": "array",
"items": {
"$ref": "#/$defs/ComponentInfo"
}
}
},
"required": [
"components"
]
}
Request Example
{
"jsonrpc": "2.0",
"id": "list-components-001",
"method": "components/list",
"params": {}
}
Response Example
{
"jsonrpc": "2.0",
"id": "list-components-001",
"result": {
"components": [
{
"name": "data_processor",
"description": "Process and transform data records according to configurable rules"
},
{
"name": "http_client",
"description": "Make HTTP requests with automatic retry logic and response parsing"
}
]
}
}
components/info Method
Method Name: components/info
Direction: Runtime → Component Server
Type: Request (expects response)
- Schema Viewer
- Schema Source
Loading ....
{
"description": "Sent from Stepflow to the component server to request information about a specific component.",
"type": "object",
"properties": {
"component": {
"description": "The component to get information about.",
"$ref": "#/$defs/Component"
}
},
"required": [
"component"
]
}
- Schema Viewer
- Schema Source
Loading ....
{
"description": "Sent from the component server back to Stepflow with information about the requested component.",
"type": "object",
"properties": {
"info": {
"description": "Information about the component.",
"$ref": "#/$defs/ComponentInfo"
}
},
"required": [
"info"
]
}
Request Example
{
"jsonrpc": "2.0",
"id": "component-info-001",
"method": "components/info",
"params": {
"component": {
"name": "data_processor",
"path": "/python/data_processor"
}
}
}
Response Example
{
"jsonrpc": "2.0",
"id": "component-info-001",
"result": {
"info": {
"name": "data_processor",
"description": "Process and transform data records according to configurable rules",
"input_schema": {
"type": "object",
"properties": {
"records": {
"type": "array",
"items": {"type": "object"}
},
"rules": {
"type": "object",
"properties": {
"transformation": {
"type": "string",
"enum": ["uppercase", "lowercase", "title_case"]
}
}
}
},
"required": ["records", "rules"]
},
"output_schema": {
"type": "object",
"properties": {
"processed_records": {"type": "array"},
"summary": {"type": "object"}
},
"required": ["processed_records", "summary"]
}
}
}
}
components/execute Method
Method Name: components/execute
Direction: Runtime → Component Server
Type: Request (expects response)
- Schema Viewer
- Schema Source
Loading ....
{
"description": "Sent from Stepflow to the component server to execute a specific component with the provided input.",
"type": "object",
"properties": {
"component": {
"description": "The component to execute.",
"$ref": "#/$defs/Component"
},
"input": {
"description": "The input to the component.",
"$ref": "#/$defs/Value"
},
"step_id": {
"description": "The ID of the step being executed.",
"type": "string"
},
"run_id": {
"description": "The ID of the workflow run.",
"type": "string"
},
"flow_id": {
"description": "The ID of the flow being executed.",
"$ref": "#/$defs/BlobId"
}
},
"required": [
"component",
"input",
"step_id",
"run_id",
"flow_id"
]
}
- Schema Viewer
- Schema Source
Loading ....
{
"description": "Sent from the component server back to Stepflow with the result of the component execution.",
"type": "object",
"properties": {
"output": {
"description": "The result of the component execution.",
"$ref": "#/$defs/Value"
}
},
"required": [
"output"
]
}
Request Example
{
"jsonrpc": "2.0",
"id": "execute-data-processor-001",
"method": "components/execute",
"params": {
"component": {
"name": "data_processor",
"path": "/python/data_processor"
},
"input": {
"records": [
{"id": "record_1", "data": {"name": "John", "status": "active"}}
],
"rules": {
"transformation": "uppercase"
}
}
}
}
Response Example
{
"jsonrpc": "2.0",
"id": "execute-data-processor-001",
"result": {
"output": {
"processed_records": [
{
"id": "record_1",
"data": {"name": "JOHN", "status": "ACTIVE"},
"processed": true
}
],
"summary": {
"total": 1,
"processed": 1,
"errors": 0
}
}
}
}
Bidirectional Execution
Components that need to interact with the runtime during execution can make requests back to the runtime: