5.1 About Conversational Agent Chat
Conversational Agent Chat lets client applications interact with MicroTx Workflows agent profiles through REST APIs. You can use this feature to build custom chat experiences where users ask questions, receive streamed agent responses, and continue a conversation with retained context.
MicroTx Workflows does not provide a built-in chat UI for this feature. Instead, it exposes REST APIs that customers can use to build their own web, mobile, or enterprise chat interface. The REST API specification is available through Swagger. A sample conversational agent application, such as a medical history retrieval chat sample, is available in the MicroTx samples repository.
A conversational agent uses the same Agent Profile model used by Agentic Tasks in workflows. To use an agent profile for chat, enable the Conversational capability in the agent profile. If you also want to use the same profile inside workflows, enable the Workflow capability as well.
The agent profile defines the agent's role, instructions, LLM profile, model, tools, MCP servers, memory setting, prompt variables, model parameters, and guardrails. During chat execution, MicroTx Workflows passes the user input to the agent, loads chat context when memory is enabled, invokes the configured LLM and tools, and streams progress and final response events back to the client using server-sent events (SSE).
Use Conversational Agent Chat for scenarios such as:
- Customer support assistants.
- Enterprise knowledge assistants.
- Medical, financial, or operational inquiry assistants.
- Workflow-driven assistants that can start or check workflows.
- Multi-agent assistants that delegate work to specialized agents.
- RAG-based assistants that retrieve information from vector stores.
Chat Memory
Conversational agent chat supports memory through the agent profile.
When memory is enabled, MicroTx Workflows loads recent chat messages and a running conversation summary for the chat session. This context is added to the prompt so the agent can respond based on the current conversation. The service maintains:
- Short-term memory: Recent chat messages for the session.
- Long-term summary: A compact summary of earlier conversation context.
- Chat history: Persisted user and agent messages that can be retrieved through the chat history APIs.
When memory is disabled on the agent profile, MicroTx Workflows does not load the previous chat context into the prompt. Each request is handled as a fresh interaction, although chat messages may still be stored for history and audit purposes.
Tools for Conversational Agents
Conversational agents can use tools configured in the agent profile. In addition to common tools, MicroTx Workflows supports special agentic tools such as:
- RAG Retrieval Tool: Allows an agent to retrieve relevant context from a vector store and use it in the response.
- Agent Execute Tool: Allows an agent to call another agent profile, enabling nested or multi-agent interactions.
- MicroTx Workflow Tool: Allows an agent to start an allowed workflow and check workflow execution status. This tool uses an allow-list of workflow names to restrict what the agent can invoke.
- MCP Server Tools: Allows agents to access external tools and services through configured MCP servers.
REST APIs for Conversational Agent Chat
MicroTx Workflows exposes APIs to chat with agents and manage chat history.
POST /api/conversational-agent/chat: Starts or continues a chat session and streams the response using SSE.GET /api/conversational-agent/history/{agentName}: Lists chat sessions for an agent.GET /api/conversational-agent/history/{agentName}/{chatSessionId}: Retrieves chat history for a specific session.DELETE /api/conversational-agent/history/{agentName}: Deletes chat history for an agent.DELETE /api/conversational-agent/history/{agentName}/{chatSessionId}: Deletes a specific chat session.
The chat request includes the agent name, chat session ID, and user input.
{
"agentName": "medical_history_agent",
"chatSessionId": "session-001",
"userInput": "Summarize the patient history and highlight open risks."
}
The chat API streams intermediate events such as memory loading, LLM request start, tool call start, tool call end, heartbeat events, and the final result.
Parent topic: Agentic AI