中文:运行时流程
Runtime paths for startup, model import, entity/relation writes, Query Service, AgentGateway, and MCP.
sequenceDiagram
participant Main as umodel-server
participant Bootstrap as internal/bootstrap
participant Workspace as Workspace Store
participant Graph as GraphStore Provider
participant HTTP as REST Router
Main->>Bootstrap: parse flags and build app
Bootstrap->>Graph: select provider
Bootstrap->>Workspace: initialize workspace persistence
Bootstrap->>HTTP: register routes and UI handler
HTTP-->>Main: listen on address
Runtime flags:
| Flag | Meaning |
|---|---|
--addr |
API listen address, for example :8080. |
--data |
Local data root. |
--graphstore |
Provider name: memory, file.memory, or local.ladybug. |
sequenceDiagram
participant Client
participant API as REST API
participant UModel as UModel Service
participant Validator as Schema Validator
participant Graph as GraphStore
Client->>API: POST /api/v1/umodel/{workspace}/import
API->>UModel: import path or pack
UModel->>Validator: validate elements
Validator-->>UModel: validation result
UModel->>Graph: put UModel elements
Graph-->>UModel: write result
UModel-->>Client: import result
The bundled multi-domain quickstart sample uses the same path, wrapped by:
POST /api/v1/samples/{workspace}/multi-domain-quickstart:importsequenceDiagram
participant Client
participant API
participant Store as EntityStore
participant Graph as GraphStore
Client->>API: entities:write or relations:write
API->>Store: validate workspace and payload
Store->>Graph: write records
Graph-->>Store: write result
Store-->>Client: accepted / failed items
EntityStore is write-oriented. Runtime reads go through Query Service.
sequenceDiagram
participant Client
participant API
participant Query as Query Service
participant Planner as Parser and planner
participant Graph as GraphStore
Client->>API: POST /api/v1/query/{workspace}/execute
API->>Query: query request
Query->>Planner: parse SPL
Planner-->>Query: source and operators
Query->>Graph: read model/entity/topology data
Graph-->>Query: rows
Query-->>Client: rows and explain metadata
AgentGateway exposes a safe agent-facing layer:
- Discovery lists tools, resources, and next actions.
- Query tools execute or explain SPL.
- Resources expose metadata and templates.
- Write tools stay disabled unless explicitly enabled.
umodel-mcp connects MCP clients to the same AgentGateway semantics used by REST.
With file.memory, GraphStore data is saved under:
data/graphstore/file-memory/workspaces/<workspace>/
├── umodels.json
├── entities.json
└── relations.json
Workspace metadata is saved separately at:
data/workspaces.json
Storage details: Storage And GraphStore Providers.