Development environment setup#1
Open
rockrxf78 wants to merge 2 commits into
Open
Conversation
Co-authored-by: rockrxf78 <rockrxf78@users.noreply.github.com>
…egration - 4-state session machine (idle/ai_serving/waiting_human/human_connected/closed) - ConversationContextManager with LRU eviction and LLM context injection - CustomerProfileManager with SQLite persistence and lead tracking - ProductManager with JSON-based product catalog and search - EscalationManager with queue management for human agent handoff - 5 LLM Tools: query_product, check_order, escalate_to_human, update_customer_profile, create_lead - Sales Skill template (SKILL.md) for AI behavior guidance - MessageRouter for session-state-based message routing - TimeoutManager for conversation and queue timeouts - Dashboard-friendly configuration schema - 31 unit tests covering all managers Co-authored-by: rockrxf78 <rockrxf78@users.noreply.github.com>
|
Cursor Agent can help with this pull request. Just |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces a new
astrbot_plugin_smart_customer_serviceplugin. It solves the problem of needing an intelligent, AI-first customer service agent for sales inquiries, with a robust human fallback mechanism for complex cases. It leverages AstrBot's LLM capabilities to provide automated responses based on a defined "Sales Skill" and allows for seamless escalation to human agents.Modifications / 改动点
New Plugin: Created
astrbot_plugin_smart_customer_service/with a modular architecture.Core Managers: Implemented
SessionManager(4-state machine),ConversationContextManager,CustomerProfileManager(SQLite),ProductManager(JSON),EscalationManager(queue), andTimeoutManager.LLM Tools: Developed 5 LLM tools:
query_product,check_order,escalate_to_human,update_customer_profile,create_lead.AstrBot Integration: Integrated with AstrBot's event pipeline (
@filter.on_llm_request(),@filter.on_llm_response(),@filter.event_message_type()) and added 9 command handlers.Sales Skill: Defined a
SKILL.mdtemplate for the LLM, outlining sales strategy, escalation rules, and behavioral guidelines.Configuration & Docs: Added
_conf_schema.jsonfor Dashboard configuration,README.md,HelpTextBuilder, and a detailed research report.Tests: Added 31 unit tests for the new plugin.
Documentation: Updated
AGENTS.mdwith Cursor Cloud specific setup instructions.This is NOT a breaking change. / 这不是一个破坏性变更。
Screenshots or Test Results / 运行截图或测试结果
Plugin verification: loaded in dashboard, config panel working, all commands responding correctly.
Testing Summary:
uv run ruff check astrbot_plugin_smart_customer_service/— all checks passeduv run ruff format astrbot_plugin_smart_customer_service/— all files formatteduv run pytest tests/test_smart_customer_service.py -v— 31 tests passeduv run pytest -q tests/— 696 total tests passed (665 original + 31 new), no regressions/cs_help,/transfer_human,/end_servicecommands confirmed correct functionality and session management.Checklist / 检查清单
requirements.txt和pyproject.toml文件相应位置。/ I have ensured that no new dependencies are introduced, OR if new dependencies are introduced, they have been added to the appropriate locations inrequirements.txtandpyproject.toml.