This is a Spring Boot WebFlux application that demonstrates AI agent integration using Semantic Kernel for intelligent task management. It provides a simple CRUD task list and an interactive chat agent.
See Tutorial: Build an agentic web app in Azure App Service with Semantic Kernel (Java).
- CRUD Operations: Create, Read, Update, Delete tasks using REST API.
- AI Agent: Semantic Kernel agent with simplified intent-based function calling.
- Azure Deployment: Azure Developer CLI (azd) template can create App Service with managed identity using
azd up.
The Semantic Kernel agent implementation uses the ChatCompletionAgent with automatic function calling:
- ChatCompletionAgent: Uses Microsoft's Semantic Kernel ChatCompletionAgent for intelligent task management.
- Automatic Function Calling: Configured with
FunctionChoiceBehavior.auto(true)to automatically call appropriate plugin functions. - Direct Plugin Integration: Uses
@DefineKernelFunctionannotations inTaskCrudPluginfor seamless integration.
├── .devcontainer/
│ └── devcontainer.json # Codespace definition
├── azure.yaml # Azure Developer CLI configuration
├── pom.xml # Maven project configuration
├── infra/ # Azure Developer CLI configuration
│ ├── main.bicep
│ └── main.parameters.json
└── src/
└── main/
├── java/
│ └── com/example/crudtaskswithagent/
│ ├── CrudTasksWithAgentApplication.java # Main application class
│ ├── controller/
│ │ ├── TaskController.java # REST API endpoints
│ │ └── AgentController.java # AI agent endpoints
│ ├── model/
│ │ └── TaskItem.java # Task entity
│ ├── plugin/
│ │ └── TaskCrudPlugin.java # Semantic Kernel plugin
│ ├── repository/
│ │ └── TaskRepository.java # Data repository
│ └── service/
│ └── SemanticKernelAgentService.java # SK agent service
└── resources/
├── application.properties # Application configuration
├── schema.sql # Database schema
└── static/
└── index.html # Frontend UI