feat(prompt): add AI disclosure policy for external service communications#2476
feat(prompt): add AI disclosure policy for external service communications#2476
Conversation
…tions When the agent posts messages, comments, issues, or other human-readable content to external services (Slack, GitHub, Discord, Linear, Notion, etc.), it should always include a brief note indicating the content was generated by an AI agent on behalf of the user. This applies universally — whether through dedicated tools, MCP integrations, or direct API calls — ensuring transparency regardless of the communication channel. Co-authored-by: openhands <openhands@all-hands.dev>
Python API breakage checks — ✅ PASSEDResult: ✅ PASSED |
REST API breakage checks (OpenAPI) — ✅ PASSEDResult: ✅ PASSED |
all-hands-bot
left a comment
There was a problem hiding this comment.
🟡 Taste Rating: Acceptable
This solves a real transparency problem with a simple, pragmatic approach. The instruction is comprehensive and covers the right cases.
This PR modifies the system prompt template, which directly affects agent behavior. Per repo guidelines, prompt changes require human review with lightweight evals before approval. A maintainer should verify this doesn't negatively impact benchmark performance.
Assessment
✅ Solving a real problem: AI-generated content appearing as human-written is genuinely misleading
✅ Simple implementation: Just adds a rule to the prompt, no complexity
✅ Comprehensive coverage: Lists platforms, covers all integration types
Verdict: Good change, but needs human approval due to prompt modification policy.
| <EXTERNAL_SERVICES> | ||
| * When interacting with external services like GitHub, GitLab, or Bitbucket, use their respective APIs instead of browser-based interactions whenever possible. | ||
| * Only resort to browser-based interactions with these services if specifically requested by the user or if the required operation cannot be performed via API. | ||
| * **AI disclosure**: When posting messages, comments, issues, or any content to external services that will be read by humans (e.g., Slack messages, GitHub/GitLab comments, PR/MR descriptions, Discord messages, Linear/Jira issues, Notion pages, emails, etc.), always include a brief note indicating the content was generated by an AI agent on behalf of the user. For example, you could add a line like: _"This [message/comment/issue/PR] was created by an AI assistant (OpenHands) on behalf of [user]."_ This applies to any communication channel — whether through dedicated tools, MCP integrations, or direct API calls. |
There was a problem hiding this comment.
🟡 Suggestion: This bullet point is quite long (~5 lines of text). Consider breaking it into sub-bullets for readability:
| * **AI disclosure**: When posting messages, comments, issues, or any content to external services that will be read by humans (e.g., Slack messages, GitHub/GitLab comments, PR/MR descriptions, Discord messages, Linear/Jira issues, Notion pages, emails, etc.), always include a brief note indicating the content was generated by an AI agent on behalf of the user. For example, you could add a line like: _"This [message/comment/issue/PR] was created by an AI assistant (OpenHands) on behalf of [user]."_ This applies to any communication channel — whether through dedicated tools, MCP integrations, or direct API calls. | |
| * **AI disclosure**: When posting messages, comments, issues, or any content to external services that will be read by humans, always include a brief note indicating the content was generated by an AI agent on behalf of the user. | |
| - **Platforms**: Slack, GitHub/GitLab (comments, PR/MR descriptions), Discord, Linear/Jira, Notion, email, etc. | |
| - **Example format**: _"This [message/comment/issue/PR] was created by an AI assistant (OpenHands) on behalf of [user]."_ | |
| - **Scope**: This applies to any communication channel — dedicated tools, MCP integrations, or direct API calls. |
That said, the current version is clear and complete. This is a minor style preference, not a blocking issue.
VascoSch92
left a comment
There was a problem hiding this comment.
Makes sense.
Sometimes I have a hard time understanding who is writing what 😄
Summary
Adds an AI disclosure instruction to the
<EXTERNAL_SERVICES>section of the system prompt. When the agent posts messages, comments, issues, or any human-readable content to external services, it should include a brief note indicating the content was generated by an AI agent on behalf of the user.Motivation
Currently, nothing in the system prompt or skills instructs the agent to identify itself as AI when posting to external services. This means messages posted to Slack, GitHub comments, Discord channels, Linear issues, Notion pages, etc. can appear as if they were written directly by a human — which is misleading to readers.
Why the SDK system prompt (not just individual skills)?
The agent can post human-visible messages through many channels beyond the handful of provider skills in the extensions repo:
curlPlacing the rule in the system prompt ensures universal coverage regardless of the tool or integration used. Individual provider skills in the extensions repo can optionally reinforce with platform-specific formatting guidance.
Changes
openhands-sdk/openhands/sdk/agent/prompts/system_prompt.j2— Added one bullet point to the<EXTERNAL_SERVICES>section:The instruction:
Impact
system_prompt_interactive.j2,system_prompt_long_horizon.j2,system_prompt_tech_philosophy.j2) inherit this via{% include "system_prompt.j2" %}EXTERNAL_SERVICEScontentAgent Server images for this PR
• GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server
Variants & Base Images
eclipse-temurin:17-jdknikolaik/python-nodejs:python3.13-nodejs22golang:1.21-bookwormPull (multi-arch manifest)
# Each variant is a multi-arch manifest supporting both amd64 and arm64 docker pull ghcr.io/openhands/agent-server:bd0530f-pythonRun
All tags pushed for this build
About Multi-Architecture Support
bd0530f-python) is a multi-arch manifest supporting both amd64 and arm64bd0530f-python-amd64) are also available if needed