feat: add structured agent audit prompt pack#1354
Closed
huangrichao2020 wants to merge 3 commits intoFoundationAgents:mainfrom
Closed
feat: add structured agent audit prompt pack#1354huangrichao2020 wants to merge 3 commits intoFoundationAgents:mainfrom
huangrichao2020 wants to merge 3 commits intoFoundationAgents:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
app/prompt/agent_audit.py, a reusable prompt pack for structured agent-runtime auditsWhat this adds
This PR adds a reusable prompt pack for diagnosing agent runtime failures in OpenManus.
The prompt pack is designed for cases such as:
It asks the agent to build structured audit artifacts before writing a final diagnosis:
agent_check_scope.jsonevidence_pack.jsonfailure_map.jsonagent_check_report.jsonThe module also includes:
build_agent_audit_prompt()for composing the prompt with a selected playbookHow to use it
This PR does not add a new CLI command. Instead, it adds a reusable prompt pack that developers can attach to an agent, flow, evaluation script, or debugging workflow.
Example usage in code:
The returned prompt can be used as a system prompt or supplemental instruction for an OpenManus agent:
Supported playbooks include:
wrapper-regressionmemory-contaminationtool-disciplinerendering-transporthidden-agent-layersA user-facing prompt could look like:
Expected final output includes:
Why this fits OpenManus
OpenManus is a general agent framework, and runtime reliability issues often come from the orchestration around the model rather than the model itself. This prompt pack gives users and developers a reusable, evidence-first way to inspect those layers without changing the core agent loop.
I kept this as a prompt module and tests instead of adding a new runtime dependency or tool surface.
Verification
I ran the following locally:
Results:
4 passedpy_compilepassed