Skip to main content

agentmux_srv/server/
message_flow_handler.rs

1// Copyright 2026, AgentMux Corp.
2// SPDX-License-Identifier: Apache-2.0
3
4//! `GET /api/v1/message-flow`: the last messages this srv handled between agents, oldest first, as ids and times
5//! only (`backend::message_flow`). In memory, so empty after a restart. Read-only.
6
7use axum::response::{IntoResponse, Json};
8use serde_json::json;
9
10pub async fn handle_message_flow() -> impl IntoResponse {
11    Json(json!({ "messages": crate::backend::message_flow::recent() }))
12}