Feature Request: Session Export and Replay for Agent Debugging
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 冷清
- 技术栈
- java, typescript
调研方向
首先检查 Copilot SDK 现有的会话处理方式,以及 issue 中展示的拟议 loadSession/replay API。确定应如何表示导出的消息、工具调用、MCP 交互、元数据和模型配置,然后定义导出会话并重放会话以进行调试或测试的完成标准。
由索引模型根据 Issue 内容生成。
描述
Title
Feature Request: Session Export and Replay for Agent Debugging
Description
Problem
When building agents with the Copilot SDK, debugging complex multi-turn conversations can be difficult.
Developers often encounter situations where:
- An agent behaves unexpectedly after several turns.
- A tool invocation produces an incorrect result.
- Context accumulation affects later responses.
- Bugs only appear after a specific sequence of interactions.
Currently, reproducing these issues typically requires manually recreating the entire conversation flow.
Proposed Solution
Add session export and replay capabilities to the Copilot SDK.
Session Export
Allow developers to export a session including:
- User messages
- Assistant messages
- Tool calls
- Tool results
- MCP interactions
- Session metadata
- Model configuration
Example:
{
"sessionId": "...",
"messages": [...],
"toolCalls": [...],
"metadata": {...}
}
Session Replay
Provide APIs to replay exported sessions for debugging and testing.
Example:
const session = await sdk.loadSession("./session.json");
await session.replay();
Optional Features
- Replay until a specific turn
- Step-by-step execution
- Compare outputs across SDK versions
- Compare outputs across models
- Deterministic replay mode
Use Cases
Agent Development
Reproduce user-reported failures without requiring users to recreate conversations.
Regression Testing
Verify that SDK upgrades do not change agent behavior unexpectedly.
Tool Debugging
Inspect exactly how tool calls and results affected agent decisions.
Benchmarking
Compare responses across different models using the same session history.
Benefits
- Easier debugging
- Better reproducibility
- Improved regression testing
- Faster issue triage
- Better developer experience for agent builders
Alternatives Considered
- Manual logging of messages
- Custom session serialization
- Third-party observability platforms
These approaches require significant additional implementation and are not standardized across SDK users.
- 主要语言
- Java
- 星标
- 10.5k
- 派生
- 1.5k
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 130
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/copilot-sdk 的其他 Issue
-
agentic-workflows
难度 2/5 1-3 小时 新手友好度 65/100
github/copilot-sdk#2760 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
github/copilot-sdk#2759 ·
-
documentation
难度 1/5 1 小时以内 新手友好度 85/100
github/copilot-sdk#2758 ·
-
agentic-workflows
难度 2/5 1-3 小时 新手友好度 68/100
github/copilot-sdk#2709 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 78/100
github/copilot-sdk#2673 ·
查看 github/copilot-sdk 的全部 Issue
相似的 Issue
-
certification
难度 1/5 1 小时以内 新手友好度 80/100
-
难度 2/5 1-3 小时 新手友好度 75/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's 未关闭bug ecr
难度 2/5 1-3 小时 新手友好度 75/100
-
Needs: Triage Type: Feature request
难度 2/5 1-3 小时 新手友好度 70/100
AntennaPod/AntennaPod#8794 ·
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
难度 2/5 1-3 小时 新手友好度 75/100