Skip to main content

Chapter 9 : Agents & Dashboard

Agents & Dashboard​

EasyManage helps you build and test AI Agents with No-Code.

  • AI Agents | Use EasyManage Builder Studio to design AI Agent Workflows as Agent Projects. Test and deploy them with companion Agent Server.

  • App Dashboard | Make available Apps containing AI Agents to your users. They can Run Agents, share insights and reports.

Using Agents & Dashboard​

  • View Sample Screens below to help you on using Agents.
  • Perform Agent Server Setup before Running Agents.

Agent Chat​

  • AI Agent Chat

agent-chat.png

  • Chat Response View Charts

agent-chat-view-chart.png

  • View As Mermaid Diagram, With Option: Download As PDF

agent-chat-mermaid.png

  • Chat Response Charts, Markdown Options
    • View As Mermaid Diagram, chart.js chart, Markdown formatted
    • With Button: Download As PDF

agent-chat-view-charts-md.png

  • Chat Response CSV Download Excel
    • View As Html table, Download Excel

agent-chat-download-excel.png

Agent Project​

  • AI Agent Workflows as Agent Projects

agent-proj.png

Run Agent With Human-in-the-loop​

  • Test AI Agents: With Approve Steps - Human-in-the-loop.

agent-test.png

Run Agent With Auto Approve​

  • Test AI Agents - Inventory: With Auto Approve

agent-test-inv.png

View MCP Tools Available​

  • To View/List MCP Tools Available to Chat or Agent Run:
    • Use chat/task with input prompt: List mcp tools available
    • The Agent Server console also displays all Tools Filters applied and final tool list.

LLM Response Metadata and Token Usage​

  • After each Chat Prompt or Agent Task Run:
    • The Agent Server console will display Response Metadata, Model used and Token Usage.

Schedule Agent Runs​

  • Schedule AI Agent Runs using Kestra
  • See details in resources\templates\agent\spring-java\integrating\kestra\README-kestra.md
    • To setup Kestra in separate docker container
  • Create Agent Run Schedule in Kestra
    • Using Agent Run Auto Approve : Agent Run Request (json)

agent-create-schedule.png

  • See Agent Run Schedule and Executions History in Kestra

agent-run-schedule.png

  • Email Agent Run reports:
    • To send an output report via email in Kestra, use the MailSend task

Agent Run Ops​

  • AI Agent Run Ops : Endpoints available

agent-run-ops.png

Agent Run Dashboard​

  • AI Agent Run Dashboard

agent-dashboard.png

Agent Server​

RAG Context​

  • Prompt Building - RAG Context Added

agent-prompt-building.png

Publish Agents in Apps​

  • Make available in Apps

agent-apps-for-users.png

Share Insights & Reports​

  • View and share insights and reports by app users

agent-share-reports.png

Agent Server Setup​

Agent Project uses companion Agent Server to Run Agents. Setup and Run Agent Server before Running Agents from App.

Agent Server Prerequisites​

Before Running AI Agents, Run Builds For Backend APIs, MCP Server, and then Agent Server.

Deploy & Run

  1. APIs: REST
  2. MCP Server: REST
    • Using Server Transport Streamable HTTP
  3. Agent Server

Note: You can use APIs GraphQL with MCP Server GraphQL.

Agent Server Run​

Use Docker Container Run method. Alternatively use One-click Build Run Scripts, to run without docker.

Docker Container Run​

Use Agent MCP Pack and Docker Container method, See Agent MCP Pack Docker Container

One-click Build Run Script​

  • For APIs REST, MCP REST
tip
  • Use One-click Build Run Script
  • Locate below in generated code folder:
    • resources\scripts\spring-java\build-run.bat
  • Build & Run Backend REST:
resources\scripts\spring-java\build-run.bat 1
  • Build & Run MCP REST:
resources\scripts\spring-java\build-run.bat 2
  • Build & Run Agent Server:
resources\scripts\spring-java\build-run.bat 3
  • Run All 3 together:
resources\scripts\spring-java\build-run.bat

Agent Server Compile & Run​

  • Locate Agent Server in downloaded code.

  • Downloads/EmGenDir_JohnDoe_WS_51186/WS_51186/agent/spring-java/agentserver

  • Go to this directory

  • Optionally, Edit MCP tool types excluded by default

    • Edit agent\spring-java\agentserver\src\main\resources\application.properties
    • View/change value of property:
    • em.mcptools.toolTypeExcl="create_|update_|delete_|get_table_data_all_"
  • Default tool types excluded reasons:

    • Filter Transaction Tools with "create|update|delete_". Enable when implementing AI Transactions.
    • Using tool type "gettable_data_all" is costly. Use only when table data is below 50 rows.
  • Compile & run.

  • Set OPENAI_API_KEY to use default OpenAI.

  • You can change to another LLM provider supported by Spring AI, by editing pom.xml, and set its key.

On Win:

set OPENAI_API_KEY=<your key>

mvnw clean package

mvnw spring-boot:run
  • Verify Started AgentServerApp:
2026-01-15T11:18:26.885+05:30  INFO 54448 --- [agentserver] [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port 9030 (http) with context path '/'
2026-01-15T11:18:26.917+05:30 INFO 54448 --- [agentserver] [ main] com.example.agentserver.AgentServerApp : Started AgentServerApp in 4.024 seconds (process running for 4.582)

agent-comp-server.png

Agent Server Endpoints​

TypeEndpointsParameters
GET Endpointslist-mcp-all-tools, list-mcp-server-wise-tools,
list-sessions , list-status , close-all-danger
No parameters
GET Endpointsstatus , step-results , restore-points , cancel , closeParameter: executionId
POST Endpointsapprove , rejectParameter: executionId
Request Body:
{ "approved": true, "reason": "string" }
POST EndpointsrestoreParameter: executionId
Request Body:
{ "stepIndex": 0, "reExecute": true }
Note: stepIndex is stepNumber - 1

Combine MCP Server with AI Agents​

When selected security methods, Combine MCP Server with AI Agents.

Combine with Agent Server​

Follow these guidelines:

  • MCP Server REST Combine with Agent Server
  • Packaging as jar so that Agent Server can use it as dependency.

Changes to MCP Server REST​

  • Locate Spring Java MCP Server REST project

    • mcp\spring-java\emmcp\app\mcprest
  • Edit pom.xml for mcprest

    • mcp\spring-java\emmcp\app\mcprest\pom.xml

Add packaging as jar:

    <groupId>com.example.emmcp</groupId>
<artifactId>mcprest</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>emmcp : app : mcprest</name>
<description>MCP REST</description>

Remove plugin:

    <build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Remove dependency:

        <dependency> 
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
  • Remove/Delete Java Config File:
  • mcp\spring-java\emmcp\app\mcprest\src\main\java\com\example\emmcp\app\SpringSecurityConfigBasicAuth.java
  • Build and install project
cd mcp\spring-java\emmcp
mvn clean install

Changes to Agent Server​

  • Locate Spring Java Agent Server project

    • agent\spring-java\agentserver
  • Edit pom.xml

    • agent\spring-java\agentserver\pom.xml

Enable Combined MCP Server: Locate below block and un-comment/enable:

        <!-- withmcp

<dependency>
<groupId>com.example.emmcp</groupId>
<artifactId>mcprest</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-starter-mcp-server-webmvc</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>

withmcp -->
  • Edit File AgentServerApp.java
    • agent\spring-java\agentserver\src\main\java\com\example\agentserver\AgentServerApp.java

Add scanBasePackages as below to @SpringBootApplication:

@SpringBootApplication(scanBasePackages = {"com.example.agentserver", "com.example.emmcp"})
  • Edit application.properties
    • agent\spring-java\agentserver\src\main\resources\application.properties

Enable Combined MCP Server: Locate below block and

- comment out **EM MCP Client** section:
- Enable uncomment **EM MCP Server Combined** section (Replace "#withmcp")
- Edit `em.mcp.authType=None` , Set Basic or Bearer as applicable.
- Edit `em.mcp.authToken=` , Set Token value.
# -----------------------------------------------------------------
# EM MCP Client

# STDIO Mode
#spring.ai.mcp.client.stdio.servers-configuration=mcp.json

# If SSE MCP Server (deprecated)
#spring.ai.mcp.client.sse.connections.easymanage-mcp.url=http://localhost:9040

# Streamable HTTP transport Mode
spring.ai.mcp.client.streamable-http.connections.server1.url=http://localhost:9040
spring.ai.mcp.client.streamable-http.connections.server1.endpoint=/mcp
#spring.ai.mcp.client.streamable-http.connections.server2.url=http://otherserver:8081
#spring.ai.mcp.client.streamable-http.connections.server2.endpoint=/custom-sse

spring.ai.mcp.client.type=SYNC

logging.level.io.modelcontextprotocol.client=WARN
logging.level.io.modelcontextprotocol.spec=WARN

#spring.ai.mcp.client.enabled=true
#spring.ai.mcp.client.type=SYNC
#spring.ai.mcp.client.toolcallback.enabled=true
#spring.ai.mcp.client.initialized=true
#spring.ai.mcp.client.annotation-scanner.enabled=true

# -----------------------------------------------------------------

#withmcp# -----------------------------------------------------------------
#withmcp# EM MCP Server Combined
#withmcp
#withmcp# Server Transport
#withmcp# ----------------------------------
#withmcp# STREAMABLE (Streamable HTTP transport)
#withmcp
#withmcpspring.ai.mcp.server.protocol=STREAMABLE
#withmcpspring.ai.mcp.server.type=SYNC
#withmcpspring.ai.mcp.server.instructions=This streamable server provides mcp tools
#withmcpspring.ai.mcp.server.tool-change-notification=true
#withmcpspring.ai.mcp.server.resource-change-notification=true
#withmcpspring.ai.mcp.server.prompt-change-notification=true
#withmcpspring.ai.mcp.server.streamable-http.mcp-endpoint=/mcp
#withmcpspring.ai.mcp.server.streamable-http.keep-alive-interval=60s
#withmcp
#withmcpspring.ai.mcp.server.name=mcprest
#withmcpspring.ai.mcp.server.version=0.0.1
#withmcp
#withmcp# Pass as arg when calling jar or define here
#withmcp# "args": ["-jar", "path/mcprest-1.0-SNAPSHOT.jar", "--em.mcp.apiUrl=restApiUrl" ]
#withmcp# e.g. em.mcp.apiUrl="http://127.0.0.1:9080/emdbrest"
#withmcpem.mcp.apiUrl=http://127.0.0.1:9080/emdbrest
#withmcpem.mcp.authType=None
#withmcpem.mcp.authToken=
#withmcp
#withmcp# -----------------------------------------------------------------
  • Add Bean @Primary For MCP Tools to populate and get all tools listing in ToolCallbackProvider.
  • Add file: agent\spring-java\agentserver\src\main\java\com\example\agentserver\McpToolsConfig.java

See below sample file. Use/replace all services @Service from your MCP Server REST project.

Sample McpToolsConfig.java

package com.example.agentserver; 

import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.ai.tool.method.MethodToolCallbackProvider;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Primary;

import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@Configuration
public class McpToolsConfig {

private final ApplicationContext applicationContext;

public McpToolsConfig(ApplicationContext applicationContext) {
this.applicationContext = applicationContext;
}

/*
@Bean
@Primary
public ToolCallbackProvider buildToolsAllRest() {

Map<String, Object> services = applicationContext.getBeansWithAnnotation(Service.class);
//System.out.println("\n--- Services found using getBeansWithAnnotation ---");
List<Object> serviceInstances = new ArrayList<>(services.values());
services.forEach((beanName, beanInstance) ->
System.out.println("Found service: " + beanName + " -> Class: " + beanInstance.getClass().getName())
);

return MethodToolCallbackProvider.builder()
.toolObjects(serviceInstances.toArray()
).build();
}
*/

@Bean
@Primary
public ToolCallbackProvider buildToolsAllRest(
com.example.emmcp.app.EmMcpRestService emMcpRestService,
com.example.emmcp.app.CustomerRestMcpService customerRestMcpService,
com.example.emmcp.app.InventoryRestMcpService inventoryRestMcpService,
com.example.emmcp.app.OrdersRestMcpService ordersRestMcpService,
com.example.emmcp.app.ProductRestMcpService productRestMcpService,
com.example.emmcp.app.ShippingRestMcpService shippingRestMcpService,
com.example.emmcp.app.TenantRestMcpService tenantRestMcpService
) {
return MethodToolCallbackProvider.builder()
.toolObjects(
emMcpRestService,
customerRestMcpService,
inventoryRestMcpService,
ordersRestMcpService,
productRestMcpService,
shippingRestMcpService,
tenantRestMcpService
).build();
}

}

  • Build and Run Agent Server
    • Follow Agent Server Setup
    • Note: Except You do not need to Build and Run MCP Server REST, as it is combined with Agent Server.