Skip to content

Feat/ai agent - #42

Merged
borhanst merged 47 commits into
mainfrom
feat/ai-agent
Aug 17, 2026
Merged

Feat/ai agent#42
borhanst merged 47 commits into
mainfrom
feat/ai-agent

Conversation

@borhanst

Copy link
Copy Markdown
Owner

No description provided.

borhanst added 30 commits July 17, 2026 19:26
- Implemented AI Dashboard routes for monitoring agent performance, costs, and tool calls.
- Created dependency injection for AI agents with AdminDeps.
- Developed model-bound agents with auto CRUD tools via inheritance.
- Introduced AI Plugin for integrating AI capabilities into the admin panel.
- Established a tool system for registration and management of AI tools.
- Added usage tracking models and functionality for logging AI interactions.
- Designed HTML template for the AI Dashboard.
- Updated project dependencies to include pydantic-ai.
- Added unit tests for AI agent integration and related components.
- Implemented a new AI tools registry page with a responsive grid layout to display registered tools.
- Added a floating AI chat widget that allows users to interact with the AI assistant from any page.
- Enhanced the chat widget with message handling, typing indicators, and input resizing.
- Updated dependencies for AI-related packages to support new features and improvements.
fix tool calling issue
…agement

- Implemented conversation history retrieval and display in the AI chat interface.
- Added endpoints for listing, loading, and deleting conversations.
- Introduced a new tool registry method for resolving tool names.
- Enhanced message deserialization for better handling of stored messages.
- Updated AI usage logging to include latency and error tracking.
- Improved chat UI with a sidebar for conversation management and a more responsive design.
- Added functionality to create new conversations and delete existing ones.
- Refactored chat input handling and message formatting for better user experience.
- Added AI chat, logs, and dashboard pages with user resolution handling.
- Implemented AI usage tracking models: AIUsageLog, AIConversation, and AIMessage.
- Introduced example AI integration with custom tools for product and customer management.
- Enhanced SQLAlchemy backend to support new AI models and schemas.
- Updated built-in schemas to include AI-related fields and relationships.
- Added tests to ensure AI models are registered correctly based on configuration.
- Increased default retries for AIAgentConfig from 1 to 3.
- Added a new error formatting helper to provide detailed error messages based on debug mode.
- Enhanced message deserialization to handle new message types and improved filtering of None values.
- Refactored various functions for better readability and consistency.
- Removed example AI integration file to streamline the project structure.
- Updated tests to reflect changes in AIAgentConfig and added tests for new functionality.
…t logging

- Introduced `ModelAIAgent` for auto-generating CRUD tools based on SQLAlchemy models.
- Added support for write operations with audit logging capabilities.
- Improved tool registration logic to respect granular permissions for create, update, and delete actions.
- Enhanced logging for tool execution and agent runs to capture detailed information.
- Updated dependencies to include new backend adapters for ORM-agnostic operations.
- Refactored database query functions to utilize backend adapters when available.
- Added JSON serialization utility for handling complex data types in chat responses.
- Improved UI for selecting AI agents in the chat widget.
- Added comprehensive tests for the new `ModelAIAgent` functionality and its configurations.
- Updated AIAgent interface to accept messages as either string or list of messages.
- Introduced attachment validation and MIME type detection in a new attachments module.
- Implemented file upload endpoint for AI chat, allowing users to attach files.
- Enhanced conversation logging to include attachments.
- Updated chat UI to display attached files and their previews.
- Added tests for attachment validation and upload functionality.
- Introduced AIChatConfig for managing allowed file types and size limits.
- Introduced a unified data access layer with SqlAlchemyDataAccess to centralize SQLAlchemy interactions and provide an ORM-agnostic interface.
- Updated AdminDeps to utilize the new data access layer, simplifying dependency management across AI tools.
- Refactored model agent functions to leverage the new data access methods for fetching records by primary key.
- Consolidated JSON serialization logic into a single serializer to handle various data types consistently.
- Enhanced the AI chat service to orchestrate conversation management, including loading history and persisting turns.
- Improved error handling and logging throughout the AI module, ensuring better traceability and debugging.
- Added support for session backend adapters in usage logging to accommodate custom ORM backends.
- Added SMS provider architecture in `fastapi_admin_kit.notifications.sms`.
- Created abstract base class `SMSProvider` with methods for sending messages and checking status.
- Implemented `TwilioSMSProvider` for sending SMS via Twilio API.
- Added example custom SMS provider `MyCustomSMSProvider` for user-defined implementations.
- Introduced notification schemas for managing notifications and preferences in the database.
- Updated `mkdocs.yml` to include documentation for notifications.
- Added tests for the notification system, covering SMS and email providers, preferences, and integration with the admin app.
- Added documentation for enabling AI on existing projects, detailing three deployment modes: Development, Alembic, and SKIP_CREATE_TABLES.
- Updated Alembic setup documentation to clarify that AI tables are always included in migrations.
- Enhanced JSON API to exclude internal and AI models when AI is disabled.
- Modified example notifications to defer table creation to Admin.setup() for better AI management.
- Refactored AdminDatabase to conditionally create AI tables based on the ai_enabled flag.
- Improved Admin class to handle AI middleware and preflight checks for missing AI tables.
- Updated CRUD API to respect skip_auto_routes for internal tables.
- Added helper functions for managing AI table names and internal table exclusions.
- Implemented tests to ensure AI tables are created/managed correctly based on the ai_enabled flag.
- Introduced a script to generate CHANGELOG.md from GitHub releases and tags.
- Updated `get_db_session` to utilize a backend-agnostic session adapter.
- Removed legacy session wrapping and streamlined session retrieval.
- Replaced direct SQLAlchemy session execution with new session methods across various modules.
- Enhanced import/export functionality to leverage the new session methods.
- Added end-to-end tests for the InMemoryBackend to ensure compatibility and functionality.
- Improved pagination logic to utilize the new session methods for counting and fetching results.
…in-memory backend support and comprehensive tests
…comprehensive support for model change events and real-time updates

- Added ChangeNotificationConfig for customizable notification settings per model.
- Introduced dispatch_model_change function to handle notification dispatching on CRUD operations.
- Enhanced ModelAdmin with get_notification_recipients hook for custom recipient logic.
- Implemented tests for notification events and recipient configurations.
- Updated frontend to handle real-time notifications via WebSocket and polling fallback.
- Refactored notification service to support batch notifications with dynamic channels.
@borhanst
borhanst merged commit 63af471 into main Aug 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant