What are agent comments?
Agent comments let your AI agents participate in collaboration the same way humans do — by leaving comments and findings anchored to a document. Instead of building a separate UI for agent output, your agent calls the Velt Comment Annotations REST APIs to create annotations that render in the standard Velt comments experience. Agent comments are built on top of the same Comments feature, but they render with a special UI: each agent finding is a suggestion with Accept and Reject buttons on the comment dialog. When a reviewer accepts or rejects a finding, the outcome is emitted on the comment element as thesuggestionAccepted / suggestionRejected events, so you can apply the change to your own data or trigger follow-up logic.
Any agent that can make an HTTP request can do this — a custom agent you register in the Velt Console, or an external agent running in your own framework (LangChain, CrewAI, a cron job, etc.).
How it works
- Your agent runs and produces a finding (a spelling error, an accessibility issue, a code-review note, etc.).
- Your agent calls the Add Comment Annotations API with an
agentblock attached to the root comment. The server stampssourceType: "agent"on both the comment and the annotation, and generates the annotation-level agent block. - The finding renders in Velt as a suggestion that humans can review, accept, or reject.
- You read agent annotations back with the Get Comment Annotations API using agent-specific filters (
agentId,executionId,agentSource, and more).
The agent block
Attach an agent object to the root comment (commentData[0]). It is discriminated on agentSource:
Set the annotation
type to "suggestion" so the finding is classified as an agent suggestion rather than a regular comment.
The reason object
The reason object carries the finding’s details. Here’s each field with a description and an example value.
A note on the difference between the two “fix” fields, since it’s easy to conflate them:
suggestion is prose meant for a human to read in the comment, while suggestedFix is the actual replacement value. For a spelling correction, for instance, suggestedFix would be just "Welcome" — the corrected word itself, not a sentence about it.
Putting it together, a fully-populated reason looks like:
title, description, severity) are required — everything else is optional, and any extra custom fields you add beyond this list are preserved by the server.
Example: leave a comment from an external agent
This is the most common path — an agent running in your own framework leaves a finding. UseagentSource: "external" and supply your own agentName.
Reading agent comments back
Use the Get Comment Annotations API with agent-specific filters to fetch what your agents have left. Only one agent filter may be supplied per request.cURL
type: "suggestion" and sourceType: "agent" at the annotation root, an annotation-root agent block, and an agent block on each agent-authored comment (comments[].agent).
The Get Comment Annotations API requires the advanced queries option to be enabled in the Velt Console and the v4 series of the Velt SDK. See the API reference for details.
Handle accept / reject in your app
Because agent findings render with Accept and Reject buttons on the comment dialog, the outcome is emitted on the comment element. Subscribe to thesuggestionAccepted and suggestionRejected events to apply the change to your own data or trigger follow-up logic. The SDK records the outcome and persists the suggestion — applying the change is your code’s job.
API reference
- Add Comment Annotations — full reference for the Add API, including the
agentblock and agent suggestion examples. - Get Comment Annotations — full reference for the Get API, including all agent filters and response field notes.
- Comment Events — subscribe to the
suggestionAcceptedandsuggestionRejectedcomment events to react to accept/reject outcomes.

