Skip to content

fix(qqbot): add AI Agent identity framing to platform hint (#66959) - #66976

Open
dsitmilis wants to merge 1 commit into
NousResearch:mainfrom
dsitmilis:fix/qqbot-agent-identity-hint
Open

dsitmilis wants to merge 1 commit into
NousResearch:mainfrom
dsitmilis:fix/qqbot-agent-identity-hint

Conversation

@dsitmilis

Copy link
Copy Markdown

Summary

Fixes #66959 — the QQ bot adapter works, but PLATFORM_HINTS["qqbot"] lacked explicit agent-identity framing. Weaker/free models routed via OmniRoute-style aggregators then skip skill_view() and rely only on the short <available_skills> description, e.g. failing to know the default transaction account.

Mirror the CLI hint (You are a CLI AI Agent) by leading the QQ hint with You are a QQ AI Agent and reminding the model to load skill bodies via skill_view.

Changes

  • agent/prompt_builder.py: qqbot hint now frames the model as an agent and references skills.
  • tests/agent/test_prompt_builder.py: added test_qqbot_hint_frames_agent_identity.

Validation

  • python3 -m pytest tests/agent/test_prompt_builder.py → 165 passed (the 2 unrelated failures — test_excludes_disabled_skills, test_walks_parents_inside_git_repo — also fail on clean upstream main and are pre-existing/ordering-related, not introduced by this change).

Closes #66959.

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/plugins Plugin system and bundled plugins platform/qqbot QQ Bot adapter needs-decision Awaiting maintainer decision before any implementation labels Jul 18, 2026
@alt-glitch

alt-glitch commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

This was generated by AI during triage.

Re-triage correction: the SimpleX repair was split into #66969. The live diff here is QQBot-only, related to #66959 and the distinct volatile-prompt approach in #63633; the claimed weaker-model effect still needs reproduction.

@dsitmilis
dsitmilis force-pushed the fix/qqbot-agent-identity-hint branch from ba7dc21 to d8ee6dd Compare July 19, 2026 00:11
@teknium1

Copy link
Copy Markdown
Collaborator

Thanks for the focused fixes. Both target behaviors are still present on current main, but the combined change needs separation and the SimpleX repair is incomplete.

Problems

  • SimplexAdapter.send() still uses the bare DM command at plugins/platforms/simplex/adapter.py:841, but the same defect remains in the standalone cron/proactive fallback: _standalone_send() is used when no live adapter exists (plugins/platforms/simplex/adapter.py:1170-1173) and still emits the bare command at plugins/platforms/simplex/adapter.py:1202. Its current test preserves that form at tests/gateway/test_simplex_plugin.py:352.
  • This combines the QQ hint with an unrelated SimpleX delivery repair. The existing member comment identifies fix(agent): reinforce WeChat, WeCom, and QQ platform identity #63633 as a separate QQ prompt-tier approach and requests split scope.
  • The added QQ test checks substrings in PLATFORM_HINTS; it does not exercise the platform-hint insertion path in agent/system_prompt.py:417-450.

Suggested changes

  • Split the QQ and SimpleX changes.
  • For the SimpleX fix, update the standalone fallback and its test to the same structured DM command.
  • Add an assembled-system-prompt test for qqbot rather than only constant substring assertions.

Automated hermes-sweeper review.

@dsitmilis
dsitmilis force-pushed the fix/qqbot-agent-identity-hint branch from d8ee6dd to 51cd273 Compare July 19, 2026 00:18
@dsitmilis

Copy link
Copy Markdown
Author

Thanks for the review. Scope is now split:

Verified: tests/agent/test_prompt_builder.py + tests/agent/test_system_prompt.py → 175 passed (the 2 unrelated failures in test_prompt_builder.py also fail on clean upstream main).

@alt-glitch alt-glitch added tool/skills Skills system (list, view, manage) and removed comp/plugins Plugin system and bundled plugins needs-decision Awaiting maintainer decision before any implementation labels Jul 19, 2026
@alt-glitch

Copy link
Copy Markdown
Contributor

This was generated by AI during triage.

Re-triage update: the SimpleX change has been split into #66969. This branch is now QQBot-only and remains related to #66959 and the distinct volatile-prompt approach in #63633.

@teknium1 teknium1 added sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 19, 2026
@alt-glitch alt-glitch added needs-decision Awaiting maintainer decision before any implementation needs-repro Bug needs reproduction steps and removed sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages needs-decision Awaiting maintainer decision before any implementation labels Jul 19, 2026
…rch#66959)

Weaker models routed via aggregators skip skill_view() when the QQ hint
lacks explicit agent-identity framing, relying only on the short skill
description. Mirror the CLI hint's 'AI Agent' framing and remind the
model to load skill bodies via skill_view.

- agent/prompt_builder.py: qqbot hint frames the model as an agent and
  references skills.
- tests/agent/test_prompt_builder.py: substring assertion on PLATFORM_HINTS.
- tests/agent/test_system_prompt.py: exercises the real hint-insertion path
  (build_system_prompt_parts) for platform='qqbot'.

Closes NousResearch#66959
@dsitmilis
dsitmilis force-pushed the fix/qqbot-agent-identity-hint branch from 51cd273 to e64b326 Compare July 19, 2026 13:14
@alt-glitch

Copy link
Copy Markdown
Contributor

This was generated by AI during triage.

Related to report #66959 and the competing volatile-prompt approach in #63633. This patch changes QQ's platform hint; the reported weaker-model causal effect still needs reproduction.

@GottZ

GottZ commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

This was generated by AI during triage.

Summary

One PR, #66976, directly addresses issue #66959 by adding QQ-specific AI-agent and skill-loading guidance to the platform hint, with tests for both the hint content and its insertion into the assembled system prompt. The diff implements the reported prompt-surface change, while the contributor discussion states that the claimed weaker-model behavioral effect still needs reproduction.

Related pull requests

Duplicates

No listed PR duplicates #66976; #63633 is a related but distinct volatile-system-prompt approach, and the unrelated SimpleX work was split into #66969.

Suggested consolidation

Keep #66976 open with a salvage path focused on its QQ platform-hint change and assembled-system-prompt regression test. Ask the author to provide a reproducible comparison demonstrating the claimed weaker-model skill_view() behavior; there are no listed duplicate PRs to close.

Complex graph

flowchart LR
    classDef open fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a
    classDef merged fill:#dcfce7,stroke:#15803d,color:#14532d
    classDef closed fill:#e5e7eb,stroke:#6b7280,color:#1f2937
    classDef unverified fill:#f3f4f6,stroke:#9ca3af,color:#374151
    classDef best stroke-width:3px,stroke:#b45309
    classDef target stroke-width:3px,stroke:#4338ca
    I66959(["issue #66959 (open)"])
    P66976["PR #66976 (open)"]
    P66976 -->|best fix| I66959
    class I66959 open
    class P66976 open
    class P66976 best
    class P66976 target
    click I66959 "https://github.com/NousResearch/hermes-agent/issues/66959"
    click P66976 "https://github.com/NousResearch/hermes-agent/pull/66976"
Loading

Graph: solid arrow = fixes / best fix, dashed arrow = partial or unverified (see edge label); boxed group = PRs duplicating each other; amber border = best fix; indigo border = target; gray node = closed (state tag in the node label).

Cross-PR triage: Reviewed 1 pull request and 1 issue in this complex. Each diff was read against this issue; Assessment working set: 3 kB of PR diffs, 3 kB of issue/PR text, 2 kB of discussion (5 comments), 2 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint needs-repro Bug needs reproduction steps P3 Low — cosmetic, nice to have platform/qqbot QQ Bot adapter sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform tool/skills Skills system (list, view, manage) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: qqbot platform hint lacks agent-identity framing, causing weaker models to skip skill_view()

4 participants