spring-ai-alibaba-admin/README.md
Spring AI Alibaba Repo: https://github.com/alibaba/spring-ai-alibaba
Spring AI Alibaba Website: https://java2ai.com
Spring AI Alibaba Website Repo: https://github.com/springaialibaba/spring-ai-alibaba-website
English | δΈζ
Agent Studio is an AI Agent development and evaluation platform based on Spring AI Alibaba, designed to provide developers and enterprises with a complete AI Agent lifecycle management solution. The platform supports a complete workflow from Prompt engineering, dataset management, evaluator configuration to experiment execution and result analysis, helping users quickly build, test, and optimize AI Agent applications.
git clone https://github.com/spring-ai-alibaba/spring-ai-alibaba-admin.git
cd spring-ai-alibaba-admin
Modify the model configuration in spring-ai-alibaba-admin-server-start/model-config.yaml according to your model provider.
π‘ Get Your DashScope API Key: Visit Alibaba Cloud Bailian Console to get a free API key.
If you need to modify the Nacos address, please update the configuration in the spring-ai-alibaba-admin-server-start/src/main/resources/application.yml file
nacos:
server-addr: ${nacos-address}
Navigate to the docker/middleware directory in the project root and execute the startup script to launch the required middleware services (MySQL, Elasticsearch, Nacos, Redis, RocketMQ):
cd docker/middleware
sh run.sh
Navigate to the spring-ai-alibaba-admin-server-start directory and start the application:
mvn spring-boot:run
Navigate to the frontend directory in the project root, read the corresponding README to install dependencies and configure the environment, then start the service:
cd packages/main
npm run dev
Open your browser and visit http://localhost:8000 to use the SAA Admin platform.
At this point, you can already manage, debug, evaluate, and observe prompts on the platform. If you expect your Spring AI Alibaba Agent application to integrate with Nacos for prompt loading and dynamic updates, and observe the online running status, you can refer to step 6 to configure your AI Agent application.
In your Spring AI Alibaba Agent application, add the following dependencies
<dependencies>
<!-- Introduce spring ai alibaba agent nacos proxy module -->
<dependency>
<groupId>com.alibaba.cloud.ai</groupId>
<artifactId>spring-ai-alibaba-agent-nacos</artifactId>
<version>{spring.ai.alibaba.version}</version>
</dependency>
<!-- Introduce observability module -->
<dependency>
<groupId>com.alibaba.cloud.ai</groupId>
<artifactId>spring-ai-alibaba-autoconfigure-arms-observation</artifactId>
<version>{spring.ai.alibaba.version}</version>
</dependency>
<!-- For implementing various OTel related components, such as automatic loading of Tracer, Exporter -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- For connecting micrometer generated metrics to otlp format -->
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-otlp</artifactId>
</dependency>
<!-- For replacing micrometer underlying trace tracer with OTel tracer -->
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-tracing-bridge-otel</artifactId>
</dependency>
<!-- For reporting spans generated by OTel tracer according to otlp protocol -->
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-exporter-otlp</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-autoconfigure-model-tool</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
Specify Nacos address and promptKey
spring.ai.alibaba.agent.proxy.nacos.serverAddr={replace nacos address, example: 127.0.0.1:8848}
spring.ai.alibaba.agent.proxy.nacos.username={replace nacos username, example: nacos}
spring.ai.alibaba.agent.proxy.nacos.password={replace nacos password, example: nacos}
spring.ai.alibaba.agent.proxy.nacos.promptKey={replace with promptKey, example: mse-nacos-helper}
Set observability parameters
management.otlp.tracing.export.enabled=true
management.tracing.sampling.probability=1.0
management.otlp.tracing.endpoint=http://{admin address}:4318/v1/traces
management.otlp.metrics.export.enabled=false
management.otlp.logging.export.enabled=false
management.opentelemetry.resource-attributes.service.name=agent-nacos-prompt-test
management.opentelemetry.resource-attributes.service.version=1.0
spring.ai.chat.client.observations.log-prompt=true
spring.ai.chat.observations.log-prompt=true
spring.ai.chat.observations.log-completion=true
spring.ai.image.observations.log-prompt=true
spring.ai.vectorstore.observations.log-query-response=true
spring.ai.alibaba.arms.enabled=true
spring.ai.alibaba.arms.tool.enabled=true
spring.ai.alibaba.arms.model.capture-input=true
spring.ai.alibaba.arms.model.capture-output=true
This project is open source under the Apache License 2.0 license.
We welcome submitting Issues and Pull Requests to help improve the project.