microsoft / microsoft/agent-host-protocol
Support source attribution in agent responses
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 344
- Forks
- 122
- Avg merge
- 14h 12m
- Merged PRs (30d)
- 22
Description
Problem
An agent can explain an answer using web pages, files, or retrieved documents, but AHP has no shared way to say which sources support which parts of that answer.
Ordinary Markdown links help people open sources, but they do not give clients enough information to show a source preview or highlight the text it supports. Information attached only to a live action is also missing when another client joins or loads the conversation history.
Proposal
Add an optional attribution response part to the chat channel. It would identify an earlier text part, list its sources, and link text ranges to those sources.
This should work with any agent or harness. It should not require a particular model, search tool, website, local filesystem, or user interface.
Expected behavior
- The host can stream the answer first and add attribution before the turn ends.
- Sources can describe web pages, files, and documents, with optional titles, excerpts, and locations.
- Text ranges have a precise, language-independent meaning, including for non-ASCII text.
- Attribution survives turn completion, snapshots, reconnection, and history loading.
- A client that does not show attribution can still display the original answer normally.
- Attribution does not grant permission to fetch a resource or claim that the answer has been independently verified.
Scope
Add the protocol types, explain the behavior with a small example, regenerate the client libraries and schemas, and cover the wire format and shared-state behavior with the existing cross-language tests.
Search planning, search progress, ranking, and the appearance of citation badges or source panels are outside this change.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the protocol types and schemas, then inspect the existing cross-language tests for wire-format and shared-state coverage. Add the attribution response part, document its behavior with a small example, regenerate the client libraries and schemas, and extend the tests to cover streaming, completion, snapshots, reconnection, and history loading.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100