Skip to content

[Bug]: Wrong Doc API #4231

Closed
Closed

Description

@DalongZhenZ

AgentScope-Java is an open-source project. To involve a broader community, we recommend asking your questions in English.

Describe the bug
in the doc : https://java.agentscope.io/dev/zh/docs/harness/context
no api such as

builder.instruction("test-policy", "修改代码后运行相关测试;无法运行时说明原因。");

in the version 2.0.3 please drop it or replace other function

image

Activity

  1. added
    bug
    on Nov 17, 2026
  2. CryoThrust commented on Nov 17, 2026

    @CryoThrust
    Contributor

    The linked page is under /dev/, which describes current development APIs. I checked the published agentscope-harness 2.0.3 and 2.0.4 JARs with javap: neither builder has instruction(String, String). Current main does have that method, so removing it from the dev guide would make that guide inaccurate in the other direction.

    For a static policy on 2.0.3, HarnessAgent.Builder.sysPrompt(String) is available:

    HarnessAgent.builder()
        // Keep your existing name, model and other configuration.
        .sysPrompt("After modifying code, run the relevant tests and report any checks you could not run.");

    This sets the system prompt; include your existing system instructions in the same value. It is not an equivalent implementation of dev's named context-source/instruction API.

    For released APIs, select 2.0 in the documentation selector, for example the stable Harness guide. That documentation snapshot targets 2.0.4, so a 2.0.3 application should still check any newer methods against its exact dependency version.

    An explicit development-version note beside the named-instruction example would help readers arriving through a direct /dev/ link. I can add that clarification in both languages if maintainers want it. This check establishes API availability, not a runtime test of the reporter's application.

  3. added 2 commits that reference this issue on Nov 17, 2026
    e3e368b
    3a89a14
  4. added a commit that references this issue on Nov 19, 2026
    10c94c7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions