-
v1.4.0 - Chat Runtime Stable
released this
2026-05-09 00:00:10 +02:00 | 253 commits to main since this releasev1.4.0 - Chat Runtime
Release Date: 2026-05-08
Milestone: Chat Runtime BackendOverview
Implements complete chat runtime for the Main Agent with conversation management, message persistence, model provider integration, and comprehensive API endpoints.
Features
Conversation Management
- Create Conversations: REST API to start new chat sessions with agents
- List Conversations: Query conversations by user with pagination
- Get Conversation Details: Retrieve full conversation history with messages
- Conversation Status: Track ACTIVE/CLOSED status for conversations
Message Handling
- Send Messages: POST user messages to conversations
- Message Persistence: All messages saved with full metadata
- Conversation History: Messages loaded in chronological order for context
Main Agent Integration
- Prompt Assembly: Loads Main Agent identity files (system-prompt, identity, soul, connections)
- Model Provider Integration: Routes messages through configured Ollama provider
- Context Building: Assembles system prompt + conversation history for each request
- Response Persistence: Saves assistant responses with full metadata
Response Metadata Tracking
- Provider Tracking: Links each response to model provider used
- Model Name: Records specific model (e.g., llama3.2)
- Latency Tracking: Measures response time in milliseconds
- Token Breakdown: Tracks prompt_tokens and completion_tokens separately
- Analytics Ready: Database schema supports future usage analytics
Error Handling
- Provider Errors: Catches model provider failures gracefully
- Timeout Handling: Detects and reports request timeouts
- Error Messages: Saves error states as assistant messages with ⚠️ prefix
- Exception Types: ModelProviderException, RequestTimeoutException
REST API
POST /api/conversations- Create new conversationGET /api/conversations- List user conversationsGET /api/conversations/{id}- Get conversation with messagesPOST /api/conversations/{id}/messages- Send message and get response
Technical Details
Database Schema
- New Migration V3: Adds metadata columns to messages table
provider_id(FK to model_providers)model_name(VARCHAR)latency_ms(INTEGER)prompt_tokens(INTEGER)completion_tokens(INTEGER)
Services
- ConversationService: CRUD operations for conversations
- MessageService: Message send/receive with provider orchestration
- MainAgentPromptService: Loads and assembles Main Agent identity
- OllamaProviderService: Integration with Ollama API
DTOs
- CreateConversationRequest (agentId, userId from header)
- SendMessageRequest (content)
- ConversationResponse (full conversation data)
- MessageResponse (message with metadata)
Resource Files
- Main Agent identity files copied to classpath:
src/main/resources/agents/main/ - Loaded at runtime via Spring ClassPathResource
Documentation
- docs/chat-api.md: Complete REST API reference with examples
Development Steps
This milestone consists of 7 development steps (v1.3.1-dev through v1.3.7-dev):
- v1.3.1-dev: Conversation CRUD APIs
- v1.3.2-dev: Message send API with persistence
- v1.3.3-dev: Main Agent prompt assembly
- v1.3.4-dev: Model provider integration
- v1.3.5-dev: Response metadata tracking
- v1.3.6-dev: Error handling
- v1.3.7-dev: API documentation
Hotfixes
- v1.3.8-hotfix: Fixed 6 compilation errors (ModelProvider method names, DTO entity mismatches, timestamp types)
- v1.3.9-hotfix: Added missing UUID import in DtoMapper
Testing
- ✅ Maven compilation successful
- ✅ Docker Compose build successful
- ✅ All 3 Flyway migrations applied (V1, V2, V3)
- ✅ Backend starts and passes health check
- ✅ PostgreSQL 18.3 database initialized
- ✅ All services (backend, postgres, redis, qdrant, dashboard) running
Next Steps
- v1.5.0 - Agent Lifecycle: Agent versioning, lifecycle hooks, state management
- v1.6.0 - Memory Layer: Short-term/long-term memory with vector embeddings
- v1.7.0 - Tool System: Tool definition, invocation, and response handling
- v1.8.0 - Dashboard UI: Web interface for chat, agents, and settings
Dependencies
- Spring Boot 4.0.0
- PostgreSQL 18.3
- Hibernate 7.1.8
- Flyway 11.2.0
- Ollama API integration
Migration Path
No breaking changes. New installations will automatically run all migrations (V1, V2, V3).
Contributors
Implemented in collaboration with GitHub Copilot CLI.
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads