# cheny813/yunxi-agent-platform architecture

> Architecture diagram of the GitHub repository cheny813/yunxi-agent-platform, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cheny813/yunxi-agent-platform
- Repository: https://github.com/cheny813/yunxi-agent-platform

## Overview

yunxi is an enterprise multi-agent platform built on AgentScope. Its principal workflow accepts chat requests, resolves identity and context, runs a configurable intent pipeline to select an agent, executes it synchronously or as a stream, and returns the result while retaining conversation state. The README also documents MCP tools, RAG and memory, skills/MUSE, file and session capabilities, A2A collaboration, and Aistio governance. Workflow links follow the README; sampled code confirms selected service behavior, but many runtime connections are documented rather than inspected directly.

Main entry points: [`agent-core/src/main/java/io/yunxi/platform/execution/AgentExecutionEngine.java`](https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/execution/AgentExecutionEngine.java) (Execution engine), [`agent-core/src/main/java/io/yunxi/platform/conversation/ChatAppService.java`](https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/conversation/ChatAppService.java) (Chat service), [`agent-core/src/main/java/io/yunxi/platform/agent/service/AgentService.java`](https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/agent/service/AgentService.java) (Agent runtime), [`agent-core/src/main/java/io/yunxi/platform/conversation/ConversationDomainService.java`](https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/conversation/ConversationDomainService.java) (Conversation state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_conversation["Chat workflow"]
  node_chat_api["Chat API"]
  node_chat_service["Chat service"]
  node_conversation_domain["Conversation state"]
end

subgraph group_decision["Intent and execution"]
  node_execution["Execution engine"]
  node_intent["Intent pipeline"]
  node_intent_stages["Intent stages"]
  node_agent_service["Agent runtime<br/>[AgentService.java]"]
  node_model["Model factory<br/>[ModelFactory.java]"]
end

subgraph group_knowledge["Knowledge and state"]
  node_rag["RAG retrieval"]
  node_memory["Memory system"]
  node_persistence["Persistence"]
  node_database[("Conversation store")]
  node_file_api["File upload"]
  node_file_service["File processing"]
end

subgraph group_extensions["Tools and collaboration"]
  node_mcp["MCP integration"]
  node_a2a["A2A collaboration<br/>[A2AClient.java]"]
  node_skills["Skills and MUSE"]
end

subgraph group_operations["Governance and insight"]
  node_aistio["Aistio governance"]
  node_trace["Trace and metrics"]
  node_otel(("OTel collector"))
end

node_user(("User"))

node_user -->|"submits chat"| node_chat_api
node_chat_api -->|"dispatches"| node_chat_service
node_chat_service -->|"manages state"| node_conversation_domain
node_chat_service -->|"executes request"| node_execution
node_execution -->|"runs pipeline"| node_intent
node_intent -->|"classifies and routes"| node_intent_stages
node_execution -->|"retrieves context"| node_rag
node_execution -->|"loads memory"| node_memory
node_execution -->|"invokes agent"| node_agent_service
node_agent_service -->|"calls model"| node_model
node_execution -.->|"uses tools"| node_mcp
node_execution -.->|"loads skills"| node_skills
node_execution -->|"updates conversation"| node_conversation_domain
node_conversation_domain -->|"persists state"| node_persistence
node_persistence -->|"reads and writes"| node_database
node_file_api -->|"uploads file"| node_file_service
node_file_service -.->|"provides file context"| node_rag
node_agent_service -.->|"collaborates remotely"| node_a2a
node_aistio -.->|"exposes governance"| node_execution
node_execution -->|"records execution"| node_trace
node_trace -.->|"exports telemetry"| node_otel

click node_chat_api "https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/controller/AgentController.java"
click node_chat_service "https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/conversation/ChatAppService.java"
click node_conversation_domain "https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/conversation/ConversationDomainService.java"
click node_execution "https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/execution/AgentExecutionEngine.java"
click node_intent "https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/intent/DefaultIntentEngine.java"
click node_intent_stages "https://github.com/cheny813/yunxi-agent-platform/tree/main/agent-core/src/main/java/io/yunxi/platform/intent"
click node_agent_service "https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/agent/service/AgentService.java"
click node_model "https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/agent/model/ModelFactory.java"
click node_rag "https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/execution/interceptors/RagRetrievalInterceptor.java"
click node_memory "https://github.com/cheny813/yunxi-agent-platform/tree/main/agent-core/src/main/java/io/yunxi/platform/memory"
click node_persistence "https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/persistence/PersistenceManager.java"
click node_database "https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/persistence/repository/ConversationRepository.java"
click node_file_api "https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/controller/FileUploadController.java"
click node_file_service "https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/file/FileUploadService.java"
click node_mcp "https://github.com/cheny813/yunxi-agent-platform/tree/main/agent-core/src/main/java/io/yunxi/platform/agent/mcp"
click node_a2a "https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/a2a/A2AClient.java"
click node_skills "https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/agent/spi/MuseToolRegistrar.java"
click node_aistio "https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/aistio/controller/AistioContractController.java"
click node_trace "https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/controller/TraceController.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_chat_api,node_chat_service,node_conversation_domain,node_user toneBlue
class node_execution,node_intent,node_intent_stages,node_agent_service,node_model toneAmber
class node_rag,node_memory,node_persistence,node_database,node_file_api,node_file_service toneMint
class node_mcp,node_a2a,node_skills toneRose
class node_aistio,node_trace,node_otel toneIndigo
```

## Components

### Chat workflow

- [Chat API](https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/controller/AgentController.java): `agent-core/src/main/java/io/yunxi/platform/controller/AgentController.java`
- [Chat service](https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/conversation/ChatAppService.java): `agent-core/src/main/java/io/yunxi/platform/conversation/ChatAppService.java`
- [Conversation state](https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/conversation/ConversationDomainService.java): `agent-core/src/main/java/io/yunxi/platform/conversation/ConversationDomainService.java`

### Intent and execution

- [Execution engine](https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/execution/AgentExecutionEngine.java): `agent-core/src/main/java/io/yunxi/platform/execution/AgentExecutionEngine.java`
- [Intent pipeline](https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/intent/DefaultIntentEngine.java): `agent-core/src/main/java/io/yunxi/platform/intent/DefaultIntentEngine.java`
- [Intent stages](https://github.com/cheny813/yunxi-agent-platform/tree/main/agent-core/src/main/java/io/yunxi/platform/intent): `agent-core/src/main/java/io/yunxi/platform/intent`
- [Agent runtime](https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/agent/service/AgentService.java): `agent-core/src/main/java/io/yunxi/platform/agent/service/AgentService.java`
- [Model factory](https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/agent/model/ModelFactory.java): `agent-core/src/main/java/io/yunxi/platform/agent/model/ModelFactory.java`

### Knowledge and state

- [RAG retrieval](https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/execution/interceptors/RagRetrievalInterceptor.java): `agent-core/src/main/java/io/yunxi/platform/execution/interceptors/RagRetrievalInterceptor.java`
- [Memory system](https://github.com/cheny813/yunxi-agent-platform/tree/main/agent-core/src/main/java/io/yunxi/platform/memory): `agent-core/src/main/java/io/yunxi/platform/memory`
- [Persistence](https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/persistence/PersistenceManager.java): `agent-core/src/main/java/io/yunxi/platform/persistence/PersistenceManager.java`
- [Conversation store](https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/persistence/repository/ConversationRepository.java): `agent-core/src/main/java/io/yunxi/platform/persistence/repository/ConversationRepository.java`
- [File upload](https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/controller/FileUploadController.java): `agent-core/src/main/java/io/yunxi/platform/controller/FileUploadController.java`
- [File processing](https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/file/FileUploadService.java): `agent-core/src/main/java/io/yunxi/platform/file/FileUploadService.java`

### Tools and collaboration

- [MCP integration](https://github.com/cheny813/yunxi-agent-platform/tree/main/agent-core/src/main/java/io/yunxi/platform/agent/mcp): `agent-core/src/main/java/io/yunxi/platform/agent/mcp`
- [A2A collaboration](https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/a2a/A2AClient.java): `agent-core/src/main/java/io/yunxi/platform/a2a/A2AClient.java`
- [Skills and MUSE](https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/agent/spi/MuseToolRegistrar.java): `agent-core/src/main/java/io/yunxi/platform/agent/spi/MuseToolRegistrar.java`

### Governance and insight

- [Aistio governance](https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/aistio/controller/AistioContractController.java): `agent-core/src/main/java/io/yunxi/platform/aistio/controller/AistioContractController.java`
- [Trace and metrics](https://github.com/cheny813/yunxi-agent-platform/blob/main/agent-core/src/main/java/io/yunxi/platform/controller/TraceController.java): `agent-core/src/main/java/io/yunxi/platform/controller/TraceController.java`
- **OTel collector**

### Other components

- **User**

## Connections

- User → Chat API: submits chat
- Chat API → Chat service: dispatches
- Chat service → Conversation state: manages state
- Chat service → Execution engine: executes request
- Execution engine → Intent pipeline: runs pipeline
- Intent pipeline → Intent stages: classifies and routes
- Execution engine → RAG retrieval: retrieves context
- Execution engine → Memory system: loads memory
- Execution engine → Agent runtime: invokes agent
- Agent runtime → Model factory: calls model
- Execution engine → MCP integration: uses tools
- Execution engine → Skills and MUSE: loads skills
- Execution engine → Conversation state: updates conversation
- Conversation state → Persistence: persists state
- Persistence → Conversation store: reads and writes
- File upload → File processing: uploads file
- File processing → RAG retrieval: provides file context
- Agent runtime → A2A collaboration: collaborates remotely
- Aistio governance → Execution engine: exposes governance
- Execution engine → Trace and metrics: records execution
- Trace and metrics → OTel collector: exports telemetry
