Content
# OpenAgentFlow-Java
OpenAgentFlow-Java is an open-source AI Agent workflow platform based on **Java 21 + Spring Boot 3 + Vue 3**. The project is oriented towards enterprise knowledge base Q&A, tool calling, MCP access, workflow orchestration, runtime tracing, and model evaluation scenarios, aiming to provide a runnable, traceable, evaluable, and scalable AI Agent application development foundation.
## Why Develop Core Links In-House
OpenAgentFlow-Java's goal is not to create a simple AI call demo but to fully present the core links of an enterprise-level Agent platform. The Agent orchestration, RAG knowledge base, tool calling, MCP access, workflow execution, tracing, model evaluation, and cost governance in the project are all developed in-house, allowing developers to directly understand the underlying process, learn key designs, and conduct secondary development.
The project does not bind capabilities to a specific AI framework. Models, embeddings, vector databases, and tool calls are designed with an open and adaptable approach. Currently, it defaults to using OpenAI-compatible interfaces, MySQL, Redis, and Milvus; subsequently, it can be extended to Spring AI, LangChain4j, or other model gateways as needed. This leaves pluggable engineering space for enterprise landing.
## Core Capabilities
- **Model Access**: OpenAI-compatible, Bean Ark, Ollama, DeepSeek, Qwen and other supplier configurations, supporting connectivity testing, ordinary dialogue, and SSE stream output.
- **Agent Management**: Agent CRUD, publishing, copying, deleting, model parameters, system prompts, resource-level permissions, and debugging operations.
- **Prompt Template Center**: System, User, RAG, Tool, Evaluation, and Workflow prompt template management, supporting variable parsing, version publishing, copying, rollback, and Agent binding.
- **RAG Knowledge Base**: Knowledge base CRUD, document upload, parsing, slicing, embedding, Milvus writing, retrieval testing, reference source, and Agent binding.
- **Tool Calling**: REST API, Webhook, database query, MCP tools, supporting schema, connectivity testing, risk level, call log, and tracing.
- **Visual Workflow**: Vue Flow canvas, supporting start, LLM, RAG, tool, condition, and end nodes, supporting publishing, versioning, and execution tracing.
- **MCP Access**: MCP Server CRUD, HTTP JSON-RPC connection testing, tools/prompts/resources discovery, synchronization to tool center, and Agent/workflow calling.
- **Runtime Observation Tracing**: Unified recording of LLM, RAG, tool, workflow, and evaluation steps, displaying token, time-consuming, error, and reference source.
- **Cost and Usage Center**: Statistics of token, cost, time-consuming by service provider, model, Agent, user, workflow, and evaluation, supporting detailed export, price configuration, and quota interception.
- **Organization Space Governance**: Organization, workspace, space member, resource ownership, and space-level access control, supporting Agent, knowledge base, tool, workflow isolation by space.
- **Operation Monitoring and Alerting**: Unified display of platform health, key indicators, alerting rules, alerting events, notification channels, and one-click inspection, supporting daily operation and delivery acceptance.
- **Model Evaluation**: Evaluation set, sample import, batch execution of Agent, rule scoring, model/prompt/knowledge base strategy comparison, and low-score sample tracing.
- **Agent Historical Session**: Each Agent supports saving historical sessions, message lists, continuing dialogue, new sessions, and deleting sessions by user.
- **Open Source Engineering**: Docker Compose, `.env.example`, CI, scripts, License, Issue/PR templates, and open-source documentation.
## Technology Stack
| Level | Technology |
| --- | --- |
| Front-end | Vue 3.5, TypeScript, Vite, Vue Router, Vue Flow, lucide-vue-next |
| Back-end | Java 21, Spring Boot 3.3, Spring Security, JWT, MyBatis-Plus |
| Data | MySQL 8, Redis 7, Milvus 2.4 |
| AI | OpenAI-compatible Chat, Embedding, Function Calling, MCP |
| Engineering | Docker Compose, GitHub Actions, PowerShell scripts |
## Interface Preview



See more screenshots in [Demo Process](docs/演示流程.md).
## Quick Start
### Docker Compose
```powershell
cd E:\xm\OpenAgentFlow-Java\dm
Copy-Item .env.example .env
docker compose up -d --build
```
Access addresses:
- Front-end: http://localhost:5173
- Back-end: http://localhost:8080/api
- Swagger: http://localhost:8080/api/swagger-ui.html
Default account:
```text
admin / 123456
```
### Local Development
```powershell
cd E:\xm\OpenAgentFlow-Java\dm
.\scripts\start-dev.ps1
```
Local build verification:
```powershell
.\scripts\build-all.ps1
```
Stop local service:
```powershell
.\scripts\stop-dev.ps1
```
## Directory Structure
```text
dm/
.github/ GitHub Actions, Issue templates, PR templates
docs/ Architecture, quick start, configuration, demo process, roadmap, interface screenshots
docs/截图/ Login page, workbench, intelligent agent, debug台, workflow, runtime log screenshots
scripts/ Local development and Docker start/stop scripts
openagentflow-backend/ Spring Boot back-end
openagentflow-frontend/ Vue 3 front-end
openagentflow-sql/ MySQL initialization scripts
docker-compose.yml One-click start MySQL, Redis, Milvus, back-end, front-end
.env.example Example environment variables
LICENSE MIT License
```
## Documentation
- [Quick Start](docs/快速启动.md)
- [Architecture](docs/架构说明.md)
- [Configuration](docs/配置说明.md)
- [Demo Process](docs/演示流程.md)
- [Roadmap](docs/路线图.md)
- [Production Deployment](docs/生产部署.md)
- [Operation Monitoring](docs/运营监控.md)
- [MySQL SQL](openagentflow-sql/mysql/README.md)
## Configuration Convention
The back-end reads environment variables by default. If not configured, it uses local development default values:
- MySQL: `openagentflow`, default `root/123456`
- Redis: `localhost:6379`
- Milvus: `localhost:19530`
- Milvus switch: `OAF_MILVUS_ENABLED`, local development script will automatically set to `false` if 19530 is not listening, back-end uses MySQL vector fallback to start.
- Back-end context path: `/api`
- JWT Secret: production environment must be covered by `OAF_JWT_SECRET`
Real model API Key will not be written into source code, SQL, or README. SQL only initializes model suppliers and model access points. Real Key please configure in system settings or local database.
## SQL Initialization
MySQL script directory:
```text
openagentflow-sql/mysql
```
Execution order:
```text
V001__database_common.sql
V002__all_feature_tables.sql
V003__indexes_views_seed.sql
V004__milvus_integration.sql
V005__refresh_zh_comments.sql
V006__refresh_admin_password.sql
V007__seed_doubao_model_provider.sql
V008__agent_crud_permissions.sql
V009__rag_embedding_model_and_permissions.sql
V010__usage_cost_center.sql
V011__organization_workspace_governance.sql
V012__async_task_center.sql
V013__audit_risk_governance_center.sql
V014__model_gateway_governance.sql
V015__knowledge_governance_enhancement.sql
V016__ops_monitor_alert_center.sql
V017__prompt_template_center.sql
```
Docker Compose will automatically execute these scripts when initializing MySQL for the first time.
## Current Version Status
| Phase | Status | Description |
| --- | --- | --- |
| P0 Login, permission, model access | Completed | JWT, Redis, model suppliers, SSE |
| P1 Agent Management | Completed | CRUD, publishing, copying, deleting, running, Agent permissions |
| P2 RAG Knowledge Base | Completed | Upload, parsing, slicing, embedding, Milvus, reference source |
| P3 Tool Calling | Completed | REST API, Webhook, DB Query, tool log |
| P4 Trace Runtime Observation | Completed | Runtime list, step details, RAG/Tool/LLM unified link |
| P5 Workflow Orchestration | Completed | Vue Flow, node execution, context variables, tracing |
| P6 MCP Tool Access | Completed | Server management, discovery, synchronization, calling, auditing |
| P7 Model Evaluation | Completed | Evaluation set, batch running, indicators, comparison, tracing |
| P8 GitHub Open Source Release Preparation | Completed | Docker, CI, scripts, License, open-source documentation |
| P9 Agent Historical Session | Completed | Session list, message persistence, continuing dialogue, debug台 historical panel |
| P10 Cost and Usage Center | Completed | Usage statistics, cost details, model price, quota interception, daily report, export, tracing jump |
| P11 Organization/Space/Resource Governance | Completed | Organization, workspace, members, resource ownership, space permissions, and front-end management page |
| P12 Asynchronous Task Center | Completed | Unified task queue, progress, log, cancellation, retry, knowledge base document processing has been accessed |
| P13 Audit and Risk Governance Center | Completed | Operation audit collection, risk event collection, high-risk confirmation approval, disposal closed-loop |
| P14 Production Deployment Hardening | Completed | prod Profile, Secret verification, security headers, production Compose, non-root container, deployment documentation |
| P15 Model Gateway and Model Governance | Completed | Routing strategy, candidate models, health statistics, failure fallback, gateway call observation |
| P16 Knowledge Base Governance Enhancement | Completed | Governance strategy, problem scanning, quality scoring, risk level, delivery problem closed-loop |
| P17 Platform Operation Monitoring and Alert Center | Completed | Operation overview, health matrix, alerting rules, alerting events, notification channels, one-click inspection |
| P18 Notification Center and Message Reachability | Postponed | Has been adjusted to low priority, and will be done later |
| P19 Prompt Template Center and Version Governance | Completed | Prompt template CRUD, variable parsing, version publishing, copying, rollback, Agent binding |
## Demo Suggestions
1. Log in with `admin / 123456`.
2. Configure real model API Key in system settings.
3. Open Prompt Template Center, create or publish System Prompt template, and bind in Agent details page.
4. Initiate a model dialogue in the debug台 and view Run ID.
5. Upload knowledge base documents, wait for processing, and then perform retrieval testing.
6. Bind knowledge base to Agent and view reference source in debug台.
7. Create a tool and bind it to Agent, triggering Tool Calling.
8. Open runtime log and view complete tracing of LLM, RAG, Tool.
9. Create a workflow and run it, and view workflow tracing.
10. Access MCP Server, discover and test MCP tools.
11. Create an evaluation set, import samples, run evaluation, and jump to low-score sample tracing.
12. Open usage center and view model cost trend, call details, dimension splitting, and quota rules.
13. Open organization space, create team space, add members, and confirm Agent, knowledge base, tool, workflow belongs to space.
14. Open task center and view real-time progress and log of knowledge base document parsing, slicing, embedding, Milvus writing.
15. Open risk governance and view audit log, high-risk tool, MCP risk, fence event and confirmation request, and complete disposal record.
16. Use `.env.prod` and `docker-compose.prod.yml` to verify production deployment configuration and confirm default key cannot start production back-end.
17. Open operation monitoring, click immediate inspection, view MySQL, Redis, Milvus, model suppliers, task queue, API quality and model quality status, and process alerting events.
## Open Source Release Checklist
- [x] Root-level `.gitignore`
- [x] `.env.example`
- [x] MIT `LICENSE`
- [x] Dockerfile and Docker Compose
- [x] GitHub Actions CI
- [x] Issue / PR templates
- [x] Local start, stop, build scripts
- [x] README open source home page
- [x] Architecture, configuration, quick start, demo, roadmap documentation
- [x] SQL initialization instructions
- [x] Chinese interface screenshots
## P8 Verification Records
- `docker compose config` passed, Compose file can be normally parsed.
- Back-end has used JDK 21 and specified Maven local repository to execute `mvn -DskipTests compile`, result passed.
- Front-end has executed `npm run build`, result passed.
- GitHub Actions CI, Issue templates, PR templates, License, `.env.example`, Dockerfile, Docker Compose, development scripts and Chinese docs documents have been supplemented.
- Chinese interface screenshots have been added: `login page.png`, `workbench.png`, `intelligent agent management.png`, `debug台.png`, `workflow orchestration.png`, `runtime log.png`.
- Real model API Key has been confirmed not written into source code, SQL, README or docs; example configuration only retains placeholder Secret and local development default values.
## Local Start Records
- `scripts/start-dev.ps1` will release 8080 and 5173 ports first, then start back-end and front-end.
- If Milvus `localhost:19530` is not detected locally, script will automatically set `OAF_MILVUS_ENABLED=false`, back-end starts normally and retains MySQL vector fallback; if you need real Milvus writing, please start Milvus and run script.
## P9 Verification Records
- Agent historical session interface has been added: `/agents/{agentId}/sessions`, `/agents/{agentId}/sessions/{sessionId}/messages`.
- Agent debug message has been written to `agent_session` and `agent_message`, and `session_id` has been written to runtime record.
- Debug台 supports historical session list, new session, open historical message, delete session and continue dialogue.
- Back-end has used JDK 21 and specified Maven local repository to execute `mvn -DskipTests compile`, result passed.
- Front-end has executed `npm run build`, result passed.
## P10 Verification Records
- Back-end cost interface has been added: `/usage/console`, `/usage/overview`, `/usage/daily`, `/usage/breakdown`, `/usage/calls`, `/usage/calls/export`, `/usage/quotas`.
- Model input/output per thousand Token unit price has been accessed to system settings page and model configuration interface; real cost is calculated by `model_config.input_price_per_1k`, `model_config.output_price_per_1k`.
- Chat, Agent running and workflow LLM node has been accessed to quota pre-estimation interception; supports global, user, role, Agent, service provider, model quota; after call, written to `runtime_llm_call`, `runtime_trace_step.cost_amount`, `runtime_run.total_cost`, `runtime_cost_daily` and `model_usage_quota` used value.
- Front-end “usage center” page has been added, supports overview card, cost trend, model/Agent/user/workflow/evaluation dimension splitting, call details, CSV export, quota add/edit/delete and tracing jump.
- New “recalculate historical cost” capability: first fill in model input/output per thousand Token unit price in system settings, then click “recalculate historical cost” in usage center, can fill in historical call cost back to call details, tracing, total cost, cost report and quota used value.
- If usage center shows Token but cost is 0, corresponding model `input_price_per_1k` and `output_price_per_1k` are still 0; this is not model call failure, but cost billing price has not been configured.
- SQL migration `V010__usage_cost_center.sql` has been added, including usage center permissions, statistics index and example global daily quota.
- Back-end has used JDK 21 and specified Maven local repository to execute `mvn "-Dmaven.repo.local=D:\kfhj\maven\mavenopenagent" -DskipTests compile`, result passed.
- Front-end has executed `npm run build`, result passed.
## P11 Verification Records
- SQL migration `V011__organization_workspace_governance.sql` has been added, created `oaf_organization`, `oaf_organization_member`, `oaf_workspace`, `oaf_workspace_member`, `oaf_workspace_resource` table, and added `workspace_id` field for Agent, knowledge base, tool, workflow, MCP Server.
- Default organization and default workspace has been initialized; existing Agent, knowledge base, tool, workflow, MCP Server will be automatically belong to default workspace.
- Organization / workspace interface has been added: `/organizations`, `/workspaces`, `/workspaces/{id}`, `/workspaces/{id}/members`.
- Agent, knowledge base, tool, workflow has been accessed to space attribution and space member permission judgment; retains original owner, ACL and global administrator permissions.
- Front-end “organization space” page has been added, supports organization list, workspace list, space creation/editing, member add/remove and space resource statistics.
- Back-end has used JDK 21 and specified Maven local repository to execute `mvn "-Dmaven.repo.local=D:\kfhj\maven\mavenopenagent" -DskipTests compile`, result passed.
- Front-end has executed `npm run build`, result passed.
## P12 Verification Records
- Asynchronous task center has been added: unified task queue, progress, log, cancellation, retry, knowledge base document processing has been accessed.
- Back-end has used JDK 21 and specified Maven local repository to execute `mvn "-Dmaven.repo.local=D:\kfhj\maven\mavenopenagent" -DskipTests compile`, result passed.
- Front-end has executed `npm run build`, result passed.
## P13 Verification Records
- Audit log has been added: operation audit collection, risk event collection, high-risk confirmation approval, disposal closed-loop.
- Back-end has used JDK 21 and specified Maven local repository to execute `mvn "-Dmaven.repo.local=D:\kfhj\maven\mavenopenagent" -DskipTests compile`, result passed.
- Front-end has executed `npm run build`, result passed.
## P14 Verification Records
- prod Profile has been added, Secret verification has been added, security headers have been added, production Compose has been added, non-root container has been added, deployment documentation has been added.
## P15 Verification Records
- Routing strategy has been added, candidate models have been added, health statistics have been added, failure fallback has been added, gateway call observation has been added.
## P16 Verification Records
- Governance strategy has been added, problem scanning has been added, quality scoring has been added, risk level has been added, delivery problem closed-loop has been added.
## P17 Verification Records
- Operation overview has been added, health matrix has been added, alerting rules have been added, alerting events have been added, notification channels have been added, one-click inspection has been added.
## P18 Verification Records
- Notification center has been added, message reachability has been added.
## P19 Verification Records
- Prompt template has been added, variable parsing has been added, version publishing has been added, added to Agent.
## P12 Verification Record
- A new SQL migration `V012__async_task_center.sql` has been added, creating `async_task` and `async_task_log`, with Chinese comments for each table and field.
- New asynchronous task center backend interfaces have been added: `/tasks/overview`, `/tasks`, `/tasks/{id}`, `/tasks/{id}/cancel`, `/tasks/{id}/retry`.
- A new platform asynchronous task thread pool `oafAsyncTaskExecutor` has been added to avoid time-consuming tasks occupying web request threads.
- Knowledge base document upload processing has been connected to the task center, with parsing, slicing, Embedding, MySQL saving, Milvus writing, and failure reasons all written to unified task progress and logs.
- A new frontend "Task Center" page has been added, supporting task statistics, filtering, listing, details, logs, cancellation, and retrying; knowledge base details pages can jump to view task center logs.
- The backend has been compiled using JDK 21 and a specified Maven local repository, with the command `mvn "-Dmaven.repo.local=D:\kfhj\maven\mavenopenagent" -DskipTests compile`, and the result is successful.
- The frontend has been executed with `npm run build`, and the result is successful.
## P13 Verification Record
- A new SQL migration `V013__audit_risk_governance_center.sql` has been added, creating a `risk_governance_event` table for risk governance events, and supplementing audit, tool invocation, protection, and confirmation request indexes.
- A new operation audit filter has been added, with business interface access automatically writing to `audit_operation_log`, recording user, path, method, status code, time-consuming, IP, and failure reasons.
- New audit and risk governance interfaces have been added: `/governance/overview`, `/governance/audits`, `/governance/risks`, `/governance/confirmations`, `/governance/risks/{id}/handle`, `/governance/confirmations/{id}/approve`, `/governance/confirmations/{id}/reject`.
- High-risk tools, MCP high-risk capabilities, high-risk confirmation requests, failed or high-risk tool invocations, and runtime protection events have been aggregated into unified risk events, supporting disposal status and remarks.
- A new frontend "Risk Governance" page has been added, supporting overview indicators, risk event filtering, disposal, risk evidence viewing, high-risk confirmation approval, and operation audit retrieval.
- The backend has been compiled using JDK 21 and a specified Maven local repository, with the command `mvn "-Dmaven.repo.local=D:\kfhj\maven\mavenopenagent" -DskipTests compile`, and the result is successful.
- The frontend has been executed with `npm run build`, and the result is successful.
## P14 Verification Record
- A new backend production configuration `application-prod.yml` has been added, converging Actuator details, default closure of Swagger, enabling readiness/liveness, supporting production CORS domain configuration, and connection pool parameters.
- A new production startup verification `ProductionStartupValidator` has been added, prohibiting default JWT Secret, weak Secret, localhost CORS, and default MySQL password startup under the `prod` profile.
- Security response headers have been supplemented for backend interfaces, and CORS origin has been changed to `OAF_CORS_ALLOWED_ORIGINS` configuration.
- Docker images have been hardened: backend non-root user operation, frontend use of non-privileged Nginx, Nginx increase security response headers, gzip, static cache, and SSE proxy parameters.
- New `docker-compose.prod.yml`, `.env.prod.example`, `scripts/prod-up.ps1`, `scripts/prod-down.ps1`, and Chinese documentation `docs/生产部署.md` have been added.
- Production Compose only exposes frontend gateway ports by default, with MySQL, Redis, Milvus, MinIO, etcd not directly mapped to the host machine.
- The command `docker compose --env-file .env.prod.example -f docker-compose.prod.yml config` has been executed, and the production Compose configuration can be normally parsed.
- The backend has been compiled using JDK 21 and a specified Maven local repository, with the command `mvn "-Dmaven.repo.local=D:\kfhj\maven\mavenopenagent" -DskipTests compile`, and the result is successful.
- The frontend has been executed with `npm run build`, and the result is successful.
## Maintenance Agreement
- New or modified Java classes, methods, fields, and major business logic require supplementary Chinese comments.
- Each modification to frontend, backend, SQL, project structure, dependencies, configuration, startup method, or key functions requires synchronous updates to README or docs.
- Frontend pages have been built according to prototype diagrams, and subsequent priority is given to maintaining existing page structures and visuals, without arbitrary redoing of pages.
- Do not write real model API keys into source code, SQL, README, docs, or submission records.
## P15 Verification Record
- A new SQL migration `V014__model_gateway_governance.sql` has been added, supplementing `route_policy_id`, `gateway_scene_type`, `route_decision`, and `fallback_used` fields for `runtime_llm_call`, and adding Chinese comments for new fields and related routing table fields.
- A default model routing strategy `default-agent-chat` has been initialized, with a scene of `AGENT_CHAT`, and the currently enabled Chat model has been written into the candidate model list.
- New backend model gateway capabilities have been added: `/model-gateway/overview`, `/model-gateway/policies`, `/model-gateway/health`, `/model-gateway/calls`, supporting routing strategy CRUD, candidate model governance, health statistics, recent invocation, and fallback observability.
- Agent debugging dialogue and workflow LLM nodes have been connected to the model gateway: explicit model selection or agent-bound models maintain direct connection; unspecified models select candidate models according to scene strategy; failed models automatically fallback to the next candidate model according to strategy.
- Model gateway decisions have been written into LLM invocation logs, with Trace and cost usage centers continuing to statistically token, cost, time-consuming, and success/failure status according to actual invocation models.
- A new frontend "Model Gateway" page has been added, supporting policy lists, policy forms, candidate models, model health, recent gateway invocation, and 24-hour failure rate/rollback times viewing.
- Left navigation Chinese labels have been synchronously restored, and a new "Model Gateway" entry has been added.
- The issue of old comments and commands sticking together in `scripts/start-dev.ps1` has been fixed, and subsequent local startup will release 8080/5173 and then pull up new processes.
- The backend has been compiled using JDK 21 and a specified Maven local repository, with the command `mvn "-Dmaven.repo.local=D:\kfhj\maven\mavenopenagent" -DskipTests compile`, and the result is successful.
- The frontend has been executed with `npm run build`, and the result is successful.
## P16 Verification Record
- A new SQL migration `V015__knowledge_governance_enhancement.sql` has been added, creating `knowledge_governance_policy` and `knowledge_governance_issue`, with Chinese comments for each table and field, and initializing default knowledge base governance strategies.
- New backend knowledge base governance capabilities have been added: `/knowledge-governance/overview`, `/knowledge-governance/quality`, `/knowledge-governance/scan`, `/knowledge-governance/issues`, `/knowledge-governance/policies`.
- Governance scanning has covered parsing failure, processing stuck, long-term update, lack of vectors, Milvus synchronization exception, slice token exception, unbound smart agent, empty knowledge base, and other delivery risks.
- Governance scanning will obey the `autoIssueEnabled` switch in the strategy; specified knowledge base closing automatic generation of issues, scanning will not create new open issues.
- A new frontend "Knowledge Governance" page has been added, supporting governance overview, issue scanning, issue processing, governance strategy CRUD, knowledge base quality scoring, and risk level viewing.
- Chinese documentation `docs/知识库治理.md` has been added to explain P16's capability range, interfaces, frontend entry, and local verification method.
- Left navigation Chinese display has been restored, and a new "Knowledge Governance" entry `/knowledge-governance` has been added.
- The backend has been compiled using JDK 21 and a specified Maven local repository, with the command `mvn "-Dmaven.repo.local=D:\kfhj\maven\mavenopenagent" -DskipTests compile`, and the result is successful.
- The frontend has been executed with `npm run build`, and the result is successful.
- Local services have been started: backend `http://localhost:8080/api`, frontend `http://localhost:5173`; login status verification knowledge governance overview, scanning, issue list, quality list, strategy list all succeed.
## Global List Pagination Update Record
- A new frontend universal pagination capability has been added: `components/PaginationBar.vue` and `composables/usePagination.ts`, with all frontend lists uniformly displaying 10 items per page and providing previous page, next page, total number, and current range prompts.
- The main pages that have accessed pagination include: workbench recent running records, smart agent list/detail binding list, knowledge base list/detail list, knowledge governance issue/strategy/quality list, tool center, MCP Server/MCP tool/capability list, workflow list, running records and Trace steps, model gateway, evaluation set/evaluation result, organization space, asynchronous task center, audit risk governance center, usage center, operation monitoring, system settings, template square.
- The debugging station is a high-frequency operation page, with left smart agent, historical session, and right reference source, tool invocation not using pagination, but instead using fixed-height list boxes and internal scrolling bars when content exceeds.
- Server-side pagination default values have been uniformly set to 10 items: running records, usage call details, risk governance events, audit logs, asynchronous task center will default return 10 items when not explicitly passing `pageSize`.
- Frontend `npm run build` has been executed, and the result is successful; backend `mvn "-Dmaven.repo.local=D:\kfhj\maven\mavenopenagent" -DskipTests compile` has been executed using JDK 21 and a specified Maven local repository, and the result is successful.
## Menu Bar Repair Record
- The issue of menu bar exceeding the page after adding menu items has been fixed: sidebar maintains fixed height, brand area and collapse button fixed, menu list independently scrolls vertically.
- Single-line ellipsis and horizontal overflow protection have been added to menu text to avoid Chinese menu items or subsequent added menu items stretching the sidebar width.
- Mobile end narrow sidebar style remains unchanged, with only icons displayed in narrow screens.
- Frontend `npm run build` has been executed, and the result is successful.
## Debugging Station Layout Repair Record
- Pagination display has been canceled for left smart agent list, historical session list, right reference source list, and tool invocation list in the debugging station.
- Left smart agent and historical session have been split into two fixed-height list boxes, with content exceeding using internal scrolling bars.
- Right Trace panel has been changed to fixed grid layout: basic Trace information fixed, reference source list and tool invocation list have independent scrolling bars, no longer using right overall scrolling bar.
- Left debugging panel has been changed to fixed grid layout: top Agent/model selector fixed, smart agent list and historical session list have independent scrolling bars, no longer using left overall scrolling bar.
- Frontend `npm run build` has been executed, and the result is successful.
## Knowledge Governance Page Layout Update Record
- "Governance issue list", "Governance strategy list", and "Knowledge base quality list" have been changed into three card-style switching entries, with only the currently selected list area displayed.
- The page internal linked new/edit form for governance strategy has been removed and replaced with a popup window in the "Governance strategy list" card.
- Governance strategy editing also reuses the same popup window, with the list itself retaining pagination, editing, and deletion operations.
- Frontend `npm run build` has been executed, and the result is successful.
## Usage Center Page Layout Update Record
- "Cost trend", "Dimension split", "Call cost details", and "Quota rules" have been changed into four card-style switching entries, with only the currently selected business area displayed.
- The page internal linked new/edit form for quota rules has been removed and replaced with a popup window in the "Quota rules" card.
- Quota editing also reuses the same popup window, with the quota rule list itself retaining pagination, editing, and deletion operations.
- Frontend `npm run build` has been executed, and the result is successful.
## Operation Monitoring Page Layout Update Record
- The top "Open alarm", "Abnormal component", "Task backlog", and "Today's cost" of operation monitoring have been changed into a horizontal row of statistical cards consistent with the smart agent list.
- "Platform health matrix", "Alarm events", "Alarm handling", "Alarm rules", "Inspection items", and "Notification channels" have been changed into six card-style switching entries, with only the currently selected business area displayed.
- The page internal linked new/edit form for alarm rules has been removed and replaced with a popup window in the "Alarm rules" card.
- Alarm rule editing also reuses the same popup window, with the alarm rule list itself retaining pagination, filtering, editing, and deletion operations.
- Frontend `npm run build` has been executed, and the result is successful.
## Model Gateway Page Layout Update Record
- "Routing strategy", "Model health", and "Recent gateway call" have been changed into three card-style switching entries, with only the currently selected business area displayed.
- The page internal linked new/edit form for routing strategy has been removed and replaced with a popup window in the "Routing strategy" card.
- Routing strategy editing also reuses the same popup window, with the routing strategy list itself retaining pagination, editing, and deletion operations.
- Frontend `npm run build` has been executed, and the result is successful.
## Organization Space Page Layout Update Record
- The top "Organization number", "Workspace", "Space members", and "Managed resources" of organization space have been changed into a horizontal row of statistical cards consistent with the smart agent list.
- "Organization list", "Workspace", and "Members & roles" have been changed into three card-style switching entries, with only the currently selected business area displayed.
- The page internal linked new/edit form for workspace has been removed and replaced with a popup window in the "Workspace" card.
- Workspace editing also reuses the same popup window, with the workspace list itself retaining pagination, selection, and editing operations.
- Organization list new organization has been changed from page internal linked form to right corner "New organization" button triggering popup window.
- Members & roles new members & roles have been changed from page internal linked form to right corner "New members & roles" button triggering popup window.
- Frontend `npm run build` has been executed, and the result is successful.
## Operation Page Unified Layout Update Record
- Task center page top statistics have been changed into a horizontal row of statistical cards, with task queue remaining as the main list view.
- Risk governance page top statistics have been changed into a horizontal row of statistical cards, and "Risk events", "High-risk confirmation", and "Operation audit" have been changed into card-style switching entries.
- Risk governance page risk details have been changed from card switching to dialog box display, clicking risk row or details button can view and dispose of risk.
- Evaluation set management page has been changed into a horizontal row of statistical cards, and "Evaluation set", "Sample import", "Run evaluation", and "Recent evaluation task" have been changed into card-style switching entries; new/edit evaluation set has been changed into a dialog box.
- Evaluation result page "Model strategy comparison", "Sample results", and "Low score sample details" have been changed into card-style switching entries.
- System settings page "User & role permissions", "Model supplier configuration", and "Model list" have been changed into card-style switching entries; new/edit model supplier has been changed into a dialog box.
- Task center page task details have been changed from card switching to dialog box display, clicking task row or details button can view complete execution information.
- Frontend `npm run build` has been executed, and the result is successful.
## P17 Verification Record
- A new SQL migration `V016__ops_monitor_alert_center.sql` has been added, creating `ops_alert_rule`, `ops_alert_event`, `ops_health_check`, and `ops_notify_channel` tables, with all tables and fields containing Chinese comments.
- Default station notification channels, default Webhook channels, 7 inspection items, and 5 default alarm rules have been initialized, and `ops:monitor:view` and `ops:monitor:manage` permissions have been written for the administrator role.
- New operation monitoring interfaces have been added: `/ops-monitor/overview`, `/ops-monitor/health`, `/ops-monitor/inspect`, `/ops-monitor/rules`, `/ops-monitor/events`, `/ops-monitor/checks`, `/ops-monitor/channels`.
- Health inspection has been connected: MySQL, Redis, Milvus, model supplier, asynchronous task queue, API quality, and model quality inspection.
- Alarm rule evaluation has been connected: support API failure rate, API average time-consuming, model failure rate, model average time-consuming, task backlog, task failure rate, untreated knowledge governance issues, and today's cost indicators.
- Alarm triggering has been connected to station notification, with default distribution to `super_admin` and `admin` users.
- New operation monitoring page and left navigation entry `/ops` have been added, supporting overview card, health matrix, alarm event handling, alarm rule CRUD, inspection items, and notification channel viewing, with all lists displaying 10 items per page.
- Chinese documentation `docs/运营监控.md` has been added to explain P17's capability range, interfaces, data tables, frontend entry, and local verification method.
- Local MySQL `openagentflow` has been successfully applied `V016__ops_monitor_alert_center.sql`.
- Backend has been compiled using JDK 21 and a specified Maven local repository, with the command `mvn "-Dmaven.repo.local=D:\kfhj\maven/mavenopenagent" -DskipTests compile`, and the result is successful.
- Frontend has been executed with `npm run build`, and the result is successful.
## P19 Verification Record
- The new priority has been arranged to put the P18 notification center into practice after P19 Prompt template center and version management are completed.
- A new SQL migration `V017__prompt_template_center.sql` has been added to refresh the Chinese table field comments in `prompt_template` and `prompt_template_version`, add the `prompt:manage` permission, and initialize the default Prompt template version.
- New backend Prompt template center interfaces have been added: `/prompt-templates/overview`, `/prompt-templates`, `/prompt-templates/{id}`, `/prompt-templates/{id}/publish`, `/prompt-templates/{id}/copy`, `/prompt-templates/{id}/versions/{versionId}/rollback`.
- A new backend Prompt template service has been added to support template CRUD, variable JSON verification, automatic parsing of variables from `{{variable name}}`, version publishing, version copying, and rollback.
- A new "Prompt Template Center" page and left navigation entry `/prompts` have been added to the frontend, supporting template filtering, pagination, editing pop-ups, variable preview, version publishing, copying, and rollback.
- A System Prompt template selection has been added to the Agent details page, which reads the published System Prompt template and automatically fills in the template content. When saved, it writes `systemPromptTemplateId`.
- The issue where the top tab of the Agent new/edit page only highlights but does not switch content has been fixed. Now, "Basic Information", "Model Parameters", "Prompt Configuration", "Knowledge Base Binding", "Tool Binding", "Workflow Binding", and "Security Policy" will all switch to the corresponding configuration panel.
- The issue with the three-column layout of "Knowledge Base Binding", "Tool Binding", and "Workflow Binding" lists on the Agent new/edit page has been fixed, which caused abnormal width and length. It has been changed to a single-column full-width list with a fixed height and internal scrolling.
- The "New Agent" on the agent list page has been changed from jumping to the details page to creating a pop-up window. It retains all card switching: Basic Information, Model Parameters, Prompt Configuration, Knowledge Base Binding, Tool Binding, Workflow Binding, and Security Policy. During creation, it synchronously saves the binding relationships of knowledge base, tool, and workflow.
- The status short text case of the "Security Policy" card in the new agent pop-up window has been corrected to avoid the single character "草" and uniformly display as "Enabled / Unpublished".
- `V017__prompt_template_center.sql` has been successfully applied to the local MySQL `openagentflow`.
- The frontend has executed `npm run build`, and the result is passed.
- The backend has used JDK 21 and the specified Maven local repository to execute `mvn "-Dmaven.repo.local=D:\kfhj\maven\mavenopenagent" -DskipTests compile`, and the result is passed. If running Maven directly, set `JAVA_HOME=D:\kfhj\jdk\jdk-21.0.11` first to avoid compiling failure due to the system default Java 8.
## IAM User and Permission Center Update Record
- A new SQL migration `V018__iam_admin_center.sql` has been added to initialize the `iam:manage` permission and grant it to `super_admin` and `admin` roles by default.
- `V018__iam_admin_center.sql` has been successfully applied to the local MySQL `openagentflow`, and the verification `iam:manage` permission record count is 1.
- New backend IAM management interfaces have been added: `/iam-admin/overview`, `/iam-admin/users`, `/iam-admin/departments`, `/iam-admin/roles`, `/iam-admin/roles/{id}/permissions`, `/iam-admin/permissions`.
- A new backend IAM management service has been added to support user CRUD, user soft deletion, BCrypt password saving, user department setting, system role assignment, department tree CRUD, role CRUD, and role permission batch configuration.
- The system settings page has been changed from a static user mock to a real interface, retaining the original "Model Supplier Configuration" and "Model List" cards, and adding "User Management", "Department Tree", and "Role Permissions" card switching.
- New user pop-ups, department pop-ups, and role permission pop-ups have been added to the frontend. The user pop-up allows setting the department and system role, and the role pop-up allows checking menu/API permissions.
- The backend has used JDK 21 and the specified Maven local repository to execute `mvn "-Dmaven.repo.local=D:\kfhj\maven\mavenopenagent" -DskipTests compile`, and the result is passed.
- The frontend has executed `npm run build`, and the result is passed.
## Login and Logout Update Record
- A logout button has been added to the top bar of the frontend, which calls the backend `/auth/logout` interface to delete the token status in Redis.
- A new frontend `logout()` API encapsulation has been added, which cleans up `oaf_access_token` and `oaf_current_user` when logging out. Even if the token has expired or there is a network anomaly, it will return to the login page.
- The top bar user information now reads from the local current user cache instead of fixedly displaying `admin`.
- The frontend has executed `npm run build`, and the result is passed. The backend logout interface already exists, and no backend code was modified or started during this update.
## Default Demo Account Repair Record
- It has been confirmed that the original seed data only initialized the `admin` login account, and `developer` and `user` only exist in the `iam_role` role table. Therefore, they could not be logged in directly before.
- A new SQL migration `V019__seed_default_login_users.sql` has been added to initialize the `developer / 123456` and `user / 123456` two demo login accounts and bind them to the `developer` and `user` system roles, respectively.
- `V019__seed_default_login_users.sql` has been successfully written and verified in the local MySQL `openagentflow`: the passwords `123456` for `admin`, `developer`, and `user` accounts all pass BCrypt matching.
## Menu Permission Filtering Update Record
- A new frontend permission tool `src/api/permissions.ts` has been added to uniformly maintain the mapping relationship between menus and permission codes.
- The left menu has been changed to dynamically filter according to the current login user's `currentUser.permissions`. The `super_admin` and `admin` roles display all menus by default.
- After logging in successfully, it no longer jumps to `/dashboard` by default. Instead, it jumps to the first menu that the user has permission to avoid entering a page without permission.
- The frontend routing guard has been connected to the menu permission judgment. When a user directly accesses a menu path without permission, it will automatically jump to the first accessible menu.
- The frontend has executed `npm run build`, and the result is passed. No backend code was modified or started during this update.
## Menu Bar Adaptive Height Update Record
- The left menu bar layout has been adjusted: when there are fewer menu items, the "Collapse" button is no longer forced to the bottom. The sidebar content will naturally arrange according to the actual menu height.
- When there are many menu items, the menu list internal scrolling is still retained to avoid the whole page being stretched out by the long menu.
- The frontend has executed `npm run build`, and the result is passed. No backend code was modified or started during this update.
## List Density and Long Field Display Update Record
- A unified viewport height limit has been added to all standard list cards that include pagination components: when the list content exceeds the available page height, a vertical scrollbar appears inside the list card, and the pagination bar is fixed at the bottom of the card. The table header remains at the top while scrolling.
- Internal scrolling rules have been supplemented for non-standard table pagination scenarios, such as template square, workflow sidebar list, and pop-up binding list, to avoid long lists continuing to stretch the page height.
- A new frontend global long field suspension viewing capability has been added: table cells, list row titles/descriptions, and encoded fields are omitted by default in one line. When the mouse moves to a truncated or longer text, a floating layer showing the complete content appears.
- The height of the top summary data card has been compressed by about half, and the card switching entrance, quick card, template card, supplier card, list row, and filter interval distance have been synchronously compressed to give more visual space to the business list below.
- The frontend has executed `npm run build`, and the result is passed. No backend code was modified, and the backend was not automatically started or restarted.
## Indicator Card Piecewise Update Record
- The top summary indicator cards on each page have been changed from a horizontal full-width large card to a fixed small-width nearly square card. On the desktop, it no longer occupies the whole line in four equal parts and visually appears more like a compact data block.
- The indicator cards now use an automatic filling layout, which arranges horizontally on a wide screen and automatically wraps when the space is insufficient. The values, titles, and descriptions are omitted in one line to avoid stretching the card width or height.
- The frontend has executed `npm run build`, and the result is passed. No backend code was modified, and the backend was not automatically started or restarted.
## Indicator Card Horizontal Adaptive Update Record
- According to the latest requirements, the top summary indicator cards on each page have been restored to horizontally adapt and fill the entire line. The cards are evenly distributed in width according to the current number and do not wrap automatically.
- Compact height, single-line omission, and icon top-right layout are retained to ensure that the list area below still obtains more visual space.
- The frontend has executed `npm run build`, and the result is passed. No backend code was modified, and the backend was not automatically started or restarted.
## P26 RAG Retrieval Quality Enhancement Record
- The knowledge base retrieval test interface `/knowledge-bases/{id}/retrieval-test` has been enhanced to support vector retrieval, keyword retrieval, hybrid retrieval, candidate recall number, TopK, similarity threshold, low confidence threshold, low confidence rejection, and local rules Rerank.
- Detailed explanations have been added to the retrieval results: final score, vector score, keyword score, rerank score, hit reason, candidate number, whether low confidence, whether to suggest an answer, and rejection reason.
- The default retrieval configuration for Agent binding knowledge base has been upgraded to hybrid retrieval + local rules rerank + low confidence rejection. During chat debugging, if the knowledge base does not recall reliable sources, system constraints are injected to require the model to clearly state that the data is insufficient to avoid fabricating.
- A new knowledge base vector reconstruction interface `/knowledge-bases/{id}/vectors/rebuild` has been added, which executes batch Embedding, MySQL vector update, and Milvus synchronization through the asynchronous task center. The task center adds a "Knowledge Base Vector Rebuild" type filter.
- A retrieval quality parameter panel, low confidence prompt, detailed score display, and "Rebuild Vector" entry have been added to the knowledge base details page. After submitting the rebuild task, you can jump to the task center to view the progress.
- The backend has executed `mvn "-Dmaven.repo.local=D:\kfhj\maven\mavenopenagent" -DskipTests compile` and the frontend has executed `npm run build`, and both results are passed. The backend was not automatically started or restarted.
## License
[MIT](LICENSE)
Connection Info
You Might Also Like
No recommendations available