Monitor Endpoints

Estimated reading: 4 minutes 170 views

The /monitor endpoints are for internal Robility flow functionality, primarily related to running flows in the Playground, storing chat history, and generating flow logs.

This information is primarily for those who are building custom components or contributing to the Robility flow codebase in a way that requires calling or understanding these endpoints.

For typical application development with Robility flow, there are more appropriate options for monitoring, debugging, and memory management. For more information, see the following:

1. Logs: Robility flow log storage locations, customization options, and where to view logs in the visual editor
2. Test flows in the Playground: Run flows and inspect message history
3. Memory management options: Robility flow storage locations and options, including the database, cache, and chat history

Vertex builds

The Vertex build endpoints (/monitor/builds) are exclusively for Playground functionality.

When you run a flow in the Playground, Robility flow calls the /build/$FLOW_ID/flow endpoint. This call retrieves the flow data, builds a graph, and executes the graph. As each component (or node) is executed, the build_vertex function calls build_and_run, which may call the individual components’ def_build method, if it exists. If a component doesn’t have a def_build function, the build still returns to a component.

The build function allows components to execute logic at runtime. For example, the Recursive Character Text Splitter component is a child of the LCTextSplitterComponent class. When text needs to be processed, the parent class’s build method is called, which creates a RecursiveCharacterTextSplitter object and uses it to split the text according to the defined parameters. The split text is then passed on to the next component. This all occurs when the component is built.

Get Vertex builds

Retrieve Vertex builds for a specific flow.

curl -X GET \

  “$ROBILITY FLOW_URL/api/v1/monitor/builds?flow_id=$FLOW_ID” \

  -H “accept: application/json” \

  -H “x-api-key: $ROBILITY FLOW_API_KEY”

Delete Vertex builds

Delete Vertex builds for a specific flow.

curl -X DELETE \

  “$ROBILITY FLOW_URL/api/v1/monitor/builds?flow_id=$FLOW_ID” \

  -H “accept: */*” \

  -H “x-api-key: $ROBILITY FLOW_API_KEY”

Messages endpoints

The /monitor/messages endpoints store, retrieve, edit, and delete records in the message table in Robility flow.db Typically, these are called implicitly when running flows that produce message history, or when inspecting and modifying Playground memories.

Get messages

Retrieve a list of messages:

curl -X GET \

  “$ROBILITY FLOW_URL/api/v1/monitor/messages” \

  -H “accept: application/json” \

  -H “x-api-key: $ROBILITY FLOW_API_KEY”

To filter messages, use the flow_id, session_id, sender, and sender_name query parameters.

To sort the results, use the order_by query parameter.

This example retrieves messages sent by Machine and AI in a given chat session (session_id) and orders the messages by timestamp.

curl -X GET \

  “$ROBILITY FLOW_URL/api/v1/monitor/messages?flow_id=$FLOW_ID&session_id=01ce083d-748b-4b8d-97b6-33adbb6a528a&sender=Machine&sender_name=AI&order_by=timestamp” \

  -H “accept: application/json” \

  -H “x-api-key: $ROBILITY FLOW_API_KEY”

Delete messages

Delete specific messages by their IDs.

This example deletes the message retrieved in the previous GET /messages example.

curl -v -X DELETE \

  “$ROBILITY FLOW_URL/api/v1/monitor/messages” \

  -H “accept: */*” \

  -H “Content-Type: application/json” \

  -H “x-api-key: $ROBILITY FLOW_API_KEY” \

  -d ‘[“MESSAGE_ID_1”, “MESSAGE_ID_2”]’

Update message

Update a specific message by its ID.

This example updates the text value of message 3ab66cc6-c048-48f8-ab07-570f5af7b160.

curl -X PUT \

  “$ROBILITY FLOW_URL/api/v1/monitor/messages/3ab66cc6-c048-48f8-ab07-570f5af7b160” \

  -H “accept: application/json” \

  -H “Content-Type: application/json” \

  -H “x-api-key: $ROBILITY FLOW_API_KEY” \

  -d ‘{

  “text”: “testing 1234”

}’

Update session ID

Update the session ID for messages.

This example updates the session_ID value 01ce083d-748b-4b8d-97b6-33adbb6a528a to different_session_id.

curl -X PATCH \

  “$ROBILITY FLOW_URL/api/v1/monitor/messages/session/01ce083d-748b-4b8d-97b6-33adbb6a528a?new_session_id=different_session_id” \

  -H “accept: application/json” \

  -H “x-api-key: $ROBILITY FLOW_API_KEY”

Delete messages by session

Delete all messages for a specific session.

curl -X DELETE \

  “$ROBILITY FLOW_URL/api/v1/monitor/messages/session/different_session_id_2” \

  -H “accept: */*” \

  -H “x-api-key: $ROBILITY FLOW_API_KEY”

Get transactions

Retrieve all transactions, which are interactions between components, for a specific flow. This information is also available in flow logs.

curl -X GET \

  “$ROBILITY FLOW_URL/api/v1/monitor/transactions?flow_id=$FLOW_ID&page=1&size=50” \

  -H “accept: application/json” \

  -H “x-api-key: $ROBILITY FLOW_API_KEY”

Share this Doc

Monitor Endpoints

Or copy link

CONTENTS