Plan in-app AI chat and Fix It assistant
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
This is a broad foundation plan and does not name implementation files. Start by reading the recommended first implementation slice and checking the existing plan, usage-tracking, and backend API patterns; the proposed conversation endpoints are listed in Phase 3. Done means the first read-only foundation slice has plan limits, persistent usage tracking, limit enforcement, a configurable provider abstraction, and minimal admin/system visibility.
由索引模型根据 Issue 内容生成。
描述
Goal
Add an in-app AI assistant for Exceptionless that lets users ask project questions in plain English and powers a Fix It / Explain button on events and stacks.
The in-app assistant should reuse the same core capabilities as the hosted MCP server, but it should be implemented as a first-party backend feature rather than calling MCP over HTTP from the app.
Product rules
- AI is available only on selected paid plans.
- Usage is token-based because provider billing is token-based.
- Start with included monthly token budgets only.
- Do not support overage billing in v1.
- Track provider cost internally from day one.
- Start read-only; any write actions must require explicit user confirmation.
Initial plan fields:
ai_enabledai_monthly_token_limitai_max_tokens_per_requestai_max_tool_calls_per_requestai_max_context_bytesai_allowed_modelsai_overage_enabled = false
Phase 1: Shared AI tool layer
Extract reusable backend tool logic so MCP and in-app AI use the same permission checks, validation, result shaping, and truncation behavior.
Suggested services:
AiToolCatalogAiToolExecutorAiContextBuilderAiUsageTrackerAiPlanLimitService
The in-app chat should call shared internal services directly. It should not call /mcp over HTTP.
Phase 2: Usage metering and limits
Add persistent usage tracking per organization.
Track:
- organization id
- user id
- operation:
chat,fix_it,explain_event,explain_stack - model
- input tokens
- output tokens
- total tokens
- estimated provider cost
- created date / month bucket
Enforce before and during requests:
- plan allows AI
- monthly token budget remaining
- per-request max token cap
- max tool calls
- max context size
Use a reservation or capped request budget so a single request cannot materially overspend the remaining monthly allowance.
Phase 3: Backend chat API
Add API endpoints such as:
POST /api/v2/ai/conversationsGET /api/v2/ai/conversationsGET /api/v2/ai/conversations/{id}POST /api/v2/ai/conversations/{id}/messages- optional streaming endpoint for assistant responses
The backend owns:
- permission checks
- plan checks
- usage reservation
- model calls
- tool calls
- persisted conversation history
Phase 4: Chat UI
Add a project-scoped AI chat surface in the app.
Potential entry points:
- Account AI Tools page
- project settings
- client setup page
- profile menu
- later: sidebar/global command menu
UI should show:
- current project / organization context
- token usage this month
- remaining token budget
- limit reached state
- conversation history
Phase 5: Fix It / Explain buttons
Add Fix It / Explain buttons on stack and event detail pages.
Clicking starts a conversation with preloaded context:
- project
- stack/event id
- stack trace
- request info
- environment
- recent occurrences
- version/release info if available
- related stacks/events if useful
Assistant response should be structured:
- likely cause
- evidence
- suggested fix
- assumptions
- next debugging steps
- related Exceptionless links
Phase 6: Confirmed write actions later
After read-only chat is useful, add confirmed write actions:
- mark fixed in version
- snooze
- mark future events critical
- add reference link
The assistant may propose an action, but the UI should execute it only after explicit user confirmation. All write actions should be audited.
Phase 7: Overage billing later
After real usage data exists, add pay-as-you-go.
Add:
ai_overage_enabledai_monthly_spend_limit_centsai_overage_price_per_million_tokens- internal provider cost tracking
- markup calculation
User options:
- stop at included token limit
- allow overage up to a monthly cap
Recommended first implementation slice
Start with foundation work only:
- Add plan AI limit fields.
- Add AI usage tracking.
- Add backend limit enforcement service.
- Add provider abstraction, with model calls behind config/feature flag.
- Keep the first slice read-only.
- Add minimal admin/system visibility for usage and limits.
A later PR can add the first user-facing read-only chat and Fix It experience.
- 主要语言
- C#
- 星标
- 2.5k
- 派生
- 508
- 平均合并
- 2 天 17 小时
- 30 天内合并 PR
- 40
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
exceptionless/Exceptionless 的其他 Issue
-
bug documentation
难度 2/5 1-3 小时 新手友好度 78/100
exceptionless/Exceptionless#2707 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 85/100
exceptionless/Exceptionless#2706 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
exceptionless/Exceptionless#2705 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 88/100
exceptionless/Exceptionless#2704 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 73/100
exceptionless/Exceptionless#2703 ·
维护者通常 1 天内回复
查看 exceptionless/Exceptionless 的全部 Issue
相似的 Issue
-
bug effort:S P3
难度 2/5 1-3 小时 新手友好度 85/100
nightscout/nocturne#3093 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 3 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100