This document provides a comprehensive overview of the Astron Agent platform architecture, covering its purpose, core components, technology stack, and deployment model. Astron Agent is an enterprise-grade Agentic Workflow development platform that integrates AI workflow orchestration, model management, AI and MCP tool integration, RPA automation, and team collaboration features.
For detailed deployment instructions, see Getting Started. For specific service documentation, refer to Core Services Architecture. For workflow orchestration details, see Workflow Engine.
Sources: README.md13-22 docs/README-zh.md13-28
Astron Agent follows a multi-layered microservices architecture with clear separation of concerns across frontend, backend API gateway, core business services, infrastructure, and external integrations.
Sources: docker/astronAgent/docker-compose.yaml1-658 docker/astronAgent/.env.example88-102
All services communicate within the astron-agent-network Docker bridge network. Nginx serves as the entry point, routing requests based on path prefixes:
| Path Pattern | Target Service | Purpose |
|---|---|---|
/ | console-frontend:1881 | Frontend application |
/runtime-config.js | console-frontend:1881 | Dynamic configuration (no cache) |
/console-api/* | console-hub:8080 | Backend API gateway |
/workflow/v1/chat/completions | core-workflow:7880 | Workflow SSE streaming |
/console-api/chat-message/* | console-hub:8080 | Chat SSE streaming |
Sources: docker/astronAgent/nginx/nginx.conf45-163
Astron Agent is built on a polyglot microservices architecture leveraging multiple programming languages and frameworks optimized for different service characteristics.
Technology Distribution:
| Component | Language/Framework | Purpose |
|---|---|---|
console-frontend | React, TypeScript, Vite | User interface SPA |
console-hub | Spring Boot 3.x, Java 21 | API gateway, request routing |
core-tenant | Go 1.21+, Fiber | High-performance multi-tenancy service |
core-agent | Python 3.9+, FastAPI | Agent orchestration and execution |
core-workflow | Python 3.9+, FastAPI | Workflow engine with SSE support |
core-knowledge | Python 3.9+, FastAPI | RAG system integration |
core-link | Python 3.9+, FastAPI | HTTP and MCP tool management |
core-database | Python 3.9+, FastAPI | Dynamic memory database |
core-rpa | Python 3.9+, FastAPI | RPA task automation |
core-aitools | Python 3.9+, FastAPI | AI capabilities (TTS, OCR, etc.) |
Sources: docker/astronAgent/docker-compose.yaml164-632 console/frontend/index.html1-80 console/backend/hub/src/main/resources/application.yml1-233
The platform uses a database-per-service pattern for data isolation:
| Database | Owner Services | Purpose |
|---|---|---|
sparkdb_manager (PostgreSQL) | core-database | User-specific dynamic schemas for memory operations |
tenant (MySQL) | core-tenant | Application and user management |
agent (MySQL) | core-agent | Bot definitions and chat history |
workflow (MySQL) | core-workflow | Workflow versions and execution state |
spark-link (MySQL) | core-link | Tool definitions and versions |
astron_console (MySQL) | console-hub | Bot marketplace and publishing |
Sources: docker/astronAgent/.env.example15-67 docker/astronAgent/docker-compose.yaml7-147
The frontend is a React single-page application built with TypeScript and Vite, featuring runtime configuration injection for deployment flexibility.
Key characteristics:
window.__APP_CONFIG__ object loaded via /runtime-config.jsVITE_* environment variablesSources: console/frontend/index.html14-17 console/frontend/public/runtime-config.js1-3 docker/astronAgent/nginx/nginx.conf54-78
The console-hub service is a Spring Boot application acting as the primary API gateway with OAuth2 resource server capabilities.
Key responsibilities:
@SpacePreAuth annotationsResponseEnum and MessageSourceConfiguration classes:
OAUTH2_ISSUER_URI, OAUTH2_JWK_SET_URI, OAUTH2_AUDIENCESources: console/backend/hub/src/main/resources/application.yml1-233 docker/astronAgent/docker-compose.yaml529-632
The core services are Python FastAPI applications implementing specific business capabilities:
Sources: docker/astronAgent/.env.example146-189 docker/astronAgent/docker-compose.yaml164-481
Astron Agent implements OAuth2/OIDC with PKCE through Casdoor as the identity provider, with dual-layer authentication separating user and service contexts.
Key configuration:
CONSOLE_CASDOOR_URL, CONSOLE_CASDOOR_ID, CONSOLE_CASDOOR_APP, CONSOLE_CASDOOR_ORGOAUTH2_ISSUER_URI, OAUTH2_JWK_SET_URI, OAUTH2_AUDIENCEAPP_AUTH_API_KEY, TENANT_KEY (not user JWT)Sources: docker/astronAgent/.env.example104-112 console/backend/hub/src/main/resources/application.yml53-60 docker/astronAgent/.env.example172-176
The platform implements space-based multi-tenancy with three space types:
| Space Type | Description | User Limit |
|---|---|---|
| Personal | Individual workspace | 1 user |
| Team | Collaborative workspace | 100 users |
| Enterprise | Organization-wide workspace | 500 users |
Authorization enforcement:
uid and app_id@SpacePreAuth triggers membership check via core-tenantuid, space-id, enterprise-id injected into service callsSources: console/backend/hub/src/main/resources/application.yml201-214 docker/astronAgent/.env.example255-259
Astron Agent integrates with multiple external platforms to provide comprehensive AI capabilities.
The platform uses unified credentials for multiple iFLYTEK services:
Required configuration:
PLATFORM_APP_ID, PLATFORM_API_KEY, PLATFORM_API_SECRET - Shared credentialsSPARK_API_PASSWORD - Additional password for LLM APISPARK_RTASR_API_KEY - Real-time ASR service keySPARK_VIRTUAL_MAN_APP_ID, SPARK_VIRTUAL_MAN_API_KEY, SPARK_VIRTUAL_MAN_API_SECRET - Virtual human serviceSources: docker/astronAgent/.env.example210-242 console/backend/hub/src/main/resources/application.yml127-139
The platform supports OpenAI-compatible API endpoints for flexibility:
| Configuration | Purpose | Example |
|---|---|---|
AI_ABILITY_CHAT_BASE_URL | Base URL (without /chat/completions) | https://spark-api-open.xf-yun.com/v1 |
AI_ABILITY_CHAT_MODEL | Model identifier | generalv3.5 |
AI_ABILITY_CHAT_API_KEY | Authentication key | your-api-key |
Sources: docker/astronAgent/.env.example216-219 console/backend/hub/src/main/resources/application.yml142-149
Optional integration with RagFlow for document processing and vector search:
RAGFLOW_BASE_URL, RAGFLOW_API_TOKEN, RAGFLOW_DEFAULT_GROUPXINGHUO_DATASET_IDcore-knowledge abstracts backend selection behind unified APISources: docker/astronAgent/.env.example179-183 docker/astronAgent/docker-compose.yaml389-419
Integration with iFLYTEK RPA cloud service for automation tasks:
https://newapi.iflyrpa.com (configurable via RPA_URL)XIAOWU_RPA_TASK_CREATE_URL endpointXIAOWU_RPA_TASK_QUERY_URL endpointcore-rpa manages task lifecycleSources: docker/astronAgent/.env.example136-141
The platform uses a polyglot persistence approach with database-per-service isolation:
PostgreSQL (Memory Database):
{RUNTIME_ENV}_{uid}_{database_id}core-database servicePOSTGRES_HOST:POSTGRES_PORT/sparkdb_managerMySQL (Business Data):
Sources: docker/astronAgent/.env.example15-29 docker/astronAgent/docker-compose.yaml7-43 console/backend/hub/src/main/resources/application.yml13-39
MinIO provides S3-compatible object storage with bucket-per-service isolation:
| Bucket | Owner Service | Content Type |
|---|---|---|
workflow | core-workflow | Workflow execution artifacts |
console-oss | console-hub | Console uploads and assets |
| General | core-aitools | AI-generated content (images, audio) |
Configuration:
OSS_ENDPOINT (internal: minio:9000)OSS_REMOTE_ENDPOINT (external access)OSS_ACCESS_KEY_ID, OSS_ACCESS_KEY_SECRETOSS_TTL (default: 157788000 seconds ≈ 5 years)Sources: docker/astronAgent/.env.example54-67 docker/astronAgent/docker-compose.yaml126-147 console/backend/hub/src/main/resources/application.yml117-124
Redis provides caching and distributed operations with database partitioning:
| Database Index | Owner Services | Purpose |
|---|---|---|
| 0 | core-agent, Default | General caching, default database |
| 1 | console-hub | Console-specific cache |
| Others | Various | Service-specific isolation |
Configuration:
REDIS_ADDR=redis:6379REDIS_IS_CLUSTER=true, REDIS_CLUSTER_ADDRREDIS_PASSWORD (optional)REDIS_EXPIRE (default: 3600s)Sources: docker/astronAgent/.env.example31-40 docker/astronAgent/docker-compose.yaml46-59
Apache Kafka provides event-driven architecture capabilities:
KAFKA_ENABLE=0 (disabled by default)spark-agent-builder (used by core-agent and core-workflow)KAFKA_SERVERS, KAFKA_TIMEOUT, KAFKA_REPLICATION_FACTORSources: docker/astronAgent/.env.example46-52 docker/astronAgent/docker-compose.yaml98-124
The platform uses Docker Compose with strict health-check based dependency ordering:
Health check configuration:
HEALTH_CHECK_INTERVAL=30sHEALTH_CHECK_TIMEOUT=10sHEALTH_CHECK_RETRIES=60 (30 minutes total wait)condition: service_healthy enforces startup orderExample health check:
Sources: docker/astronAgent/docker-compose.yaml1-658 docker/astronAgent/.env.example311-314
The platform uses a comprehensive .env file with 200+ configuration variables:
Configuration categories:
KAFKA_ENABLE, OTLP_ENABLE, WORKFLOW_ENABLEDPriority order:
.env file valuesSources: docker/astronAgent/.env.example1-317
The platform uses GitHub Actions with three automated workflows:
| Workflow | Trigger | Actions |
|---|---|---|
| CI | PR/push to main/master | Quality checks, tests, coverage reports |
| Build & Push | Merge to main/master | Multi-arch Docker builds (amd64, arm64), push to GHCR |
| Release | Tag push (v*..) | Changelog generation, GitHub releases |
Image registry:
ghcr.io/iflytek/astron-agent/*ASTRON_AGENT_VERSION (default: latest)Sources: docker/astronAgent/.env.example8-9
All services communicate within a single Docker bridge network:
astron-agent-networkEXPOSE_NGINX_PORT=80) is exposed by defaultEXPOSE_MINIO_CONSOLE_PORT=18999)Sources: docker/astronAgent/docker-compose.yaml636-638
The platform supports complete bot lifecycle from creation to multi-channel publishing:
Sources: console/backend/hub/src/main/resources/application.yml176-195
The core-workflow service provides node-based workflow execution with:
WORKFLOW_DEBUG_URL)Sources: docker/astronAgent/.env.example251-253 docker/astronAgent/nginx/nginx.conf81-106
The core-link service manages HTTP and MCP tools:
spark-link databaseSources: docker/astronAgent/.env.example143-144
The core-knowledge service abstracts RAG backends:
/knowledge/v1/chunk/querySources: docker/astronAgent/.env.example179-183
The core-database service provides dynamic SQL capabilities:
uid and app_id injection for row-level securitySources: docker/astronAgent/.env.example133-134 docker/astronAgent/docker-compose.yaml196-226
The platform supports distributed tracing and metrics via OTLP:
OTLP_ENABLE=0 (disabled by default)OTLP_ENDPOINT=127.0.0.1:4317core-agent, core-workflow, core-link, core-database, core-aitools)Configuration:
OTLP_METRIC_EXPORT_INTERVAL_MILLIS=3000OTLP_TRACE_MAX_QUEUE_SIZE=2048OTLP_TRACE_MAX_EXPORT_BATCH_SIZE=2048Sources: docker/astronAgent/.env.example69-80
Each service maintains its own logging:
./config/{service}/logs//var/log/nginx/access.log (mounted volume)Sources: docker/astronAgent/docker-compose.yaml188-477
Astron Agent is a production-ready, enterprise-grade AI agent platform with:
The platform is designed for scalability, reliability, and extensibility, supporting both rapid API-based prototyping and production-grade enterprise deployments.
Sources: README.md1-132 docker/astronAgent/docker-compose.yaml1-658
Refresh this wiki