Calling Registered Functions#

Function Invocation

Once registered, functions in Flowkit can be called via the GRPC API. There are two primary methods:

  • RunFunction: Executes a function and returns a single response.

  • StreamFunction: Executes a function and returns a stream of responses.

These modes support both synchronous and real-time use cases.

grpcurl -plaintext -d '{"function": "add", "input": {...}}' \
  localhost:50051 flowkit.FlowkitService/RunFunction

grpcurl -plaintext -d '{"function": "stream_data"}' \
  localhost:50051 flowkit.FlowkitService/StreamFunction
Request and Response Format

Each request includes:

  • function: Name of the registered function

  • input: Key-value input map

  • session_id: (optional) Session identifier

  • user: (optional) User ID

Responses include:

  • output: Result or stream output

  • logs: Structured log messages (optional)

  • `