Repository navigation
v1.0.0 — Customer Service AI Agent (first public release)
First public release of the Customer Service AI Agent multi-agent system.
Internal runtime version is tracked separately as 6.3 (
core/config.py). Thisv1.0.0marks the first public, documentation-complete release.PRODUCTION NOT_VERIFIED. This release is not a claim of production validation. Capability state is declared in docs/production-readiness.md: Implemented / Verified (Local|CI) / Not Verified.
Agent architecture
- Four-layer state machine: cache → routing → collaboration → post-response; 9 agent roles, 5 collaboration modes (Sequential / Parallel / Consultation / Hierarchical / ReAct). Single graph definition, deterministic nodes.
- Distributed Agent Runtime (hybrid real-time / async): real-time
POST /api/chatand/api/chat/streamstay inline (FastAPI → LangGraph → SSE); long tasks goPOST /api/runs→ Celery worker →GET /api/runs/{run_id}.- PostgreSQL LangGraph checkpoint shared across workers, crash-resumable (resume from checkpoint
next, not from scratch). - Redis session storage + Redis per-thread lock (
owner token+ TTL + Lua atomic compare-and-delete). - AgentRun is the single source of truth (
task_ignore_result=True; Celery result backend is not). - at-least-once dispatch + three-layer idempotency (run / thread / tool
tool_side_effectsledger), retry backoff,agent_dead_letters+replay_dead_run.py, Redis Stream run events.
- PostgreSQL LangGraph checkpoint shared across workers, crash-resumable (resume from checkpoint
- Evidence: Implemented; CI-verified on real PostgreSQL + Redis + multi-process Celery (
make runtime-e2e,make runtime-chaos,make runtime-verify).
RAG pipeline
- Qdrant vector store + BM25 hybrid retrieval → RRF fusion → cross-encoder rerank; query rewriting; retrieval contract; deterministic point IDs + migration tooling.
- Formal 649-query metrics:
NOT_VERIFIED. The shipped gold set carries no human relevance labels (DATASET_DEFECT). No Hit@K / MRR / NDCG / Recall number is claimed in this release.
MCP tools
- Function-calling tool registry (OpenAI format) + tool-result context engineering (budget / compression / offload / scope-safe reuse).
- MCP adapter is present on
main, default-off, read-only-first, with 11 fail-closed policy checks. - Not verified: real third-party MCP servers (network / auth / multi-replica / write tools).
HITL (human-in-the-loop)
- Governance boundary for high-risk tool side effects: risk grading (only HIGH requires approval; fail-closed on grading failure), interception before execution, durable
human_approvalstable, reviewer ≠ requester enforced in the service layer, RBAC (admin/supervisor), TTL expiry →EXPIRED(treated as reject, never default-allow), sanitized audit trail, and approval-derived idempotency key for exactly-once effects. HITL_ENABLEDdefaults tofalse. Not verified: real Kingdee ERP refund/order-write operations (governance mechanism verified via deterministic staging tools only).
Production readiness
- New
docs/production-readiness.md+ entry docs: architecture, agent-design, evaluation, deployment, limitations. - Verified (CI): canonical
rufflint, unit/integration/e2e on Python 3.10/3.11/3.12, distributed runtime on real PG + Redis, SIGKILL crash recovery, security scanning (strict mypy + bandit + secret guard). - Verified (Local):
make test(offline), doc-consistency guard, OTel collector smoke, DLQ replay. - Not verified: production cluster / multi-replica long-run stability / real user traffic, 649-query RAG metrics, real ERP writes, production QPS/P95/P99/token cost, persistent queryable trace backend, Nginx multi-replica scale-out, production worker autoscaling/backpressure, push approval notifications, real human-handoff workbench/ticketing.
Docs
- Every Mermaid diagram now uses one node declaration per line so GitHub renders all of them; a new structural guard (rule AJ) in
scripts/audit_doc_consistency.py(+ tests) prevents regression.