Skip to content

Conversation

@djriffle
Copy link
Member

This pull request introduces enhancements to the agent system for better functionality, including support for global policies, code sample integration, and improved configuration workflows. The changes span multiple files, focusing on extending the AgentSystem class, updating JSON blueprints, and enhancing the interactive agent creation process.

Agent System Enhancements:

  • benchmarking/agents/AgentSystem.py: Added support for loading a global policy and associating agents with code samples. The Agent class now includes a code_samples attribute, and the get_full_prompt method was updated to include code sample details. The AgentSystem class was modified to load code samples from disk and include the global policy in its representation. [1] [2] [3]

Interactive Agent Creation Improvements:

  • benchmarking/agents/create_agent_system.py: Introduced a global policy definition step and the ability to assign code samples to agents interactively. Added new methods like assign_code_samples and updated the save_configuration function to include the global policy. [1] [2] [3] [4] [5]

JSON Configuration Updates:

  • benchmarking/agents/integration_system.json and benchmarking/agents/system_blueprint.json: Added a global_policy field and updated agents to include a code_samples field where applicable. [1] [2] [3]

Code Sample Integration:

Minor Cleanup:

@djriffle djriffle requested a review from Copilot July 16, 2025 16:03

This comment was marked as outdated.

djriffle and others added 4 commits July 16, 2025 18:07
@djriffle djriffle requested a review from Copilot July 16, 2025 16:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for a global policy and code sample integration across the agent system, enhances the interactive agent setup workflow, updates JSON blueprints, and introduces a new code‐sample loader.

  • Extended AgentSystem and Agent to load and include a global policy and per-agent code samples
  • Enhanced create_agent_system.py for global policy definition and interactive code sample assignment
  • Added load_adata.py code sample and updated JSON blueprints with global_policy and code_samples
  • Injected code samples into prompts in both interactive and automated testers
  • Minor cleanup in tester scripts (removed unused imports, fixed typos)

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
benchmarking/prompt_testing/MultiAgentTester.py Updated prompt building to include global policy and inject code samples on delegation
benchmarking/prompt_testing/MultiAgentAutoTester.py Removed unused imports, fixed prompt typo, and injected global policy and code samples
benchmarking/code_samples/load_adata.py New script for loading AnnData objects as code samples
benchmarking/agents/system_blueprint.json Added global_policy and code_samples fields
benchmarking/agents/integration_system.json Added global_policy
benchmarking/agents/create_agent_system.py Added global policy step, code sample assignment, and updated save to include global policy
benchmarking/agents/AgentSystem.py Extended to read and include global policy and code samples, updated prompts/instructions
Comments suppressed due to low confidence (2)

benchmarking/prompt_testing/MultiAgentAutoTester.py:81

  • The code references datetime.utcnow() but the datetime class is no longer imported in this file. Add from datetime import datetime to the imports to avoid a NameError.
timestamp = datetime.utcnow().strftime("%Y%m%d-%H%M%S")

benchmarking/prompt_testing/MultiAgentAutoTester.py:109

  • This line calls json.dumps but json is no longer imported. Please reintroduce import json at the top of the file.
        fh.write(json.dumps(record) + "\n")

console.print(f"[yellow]🔄 Routing to '{tgt}' via {cmd}")
history.append({"role": "assistant", "content": f"🔄 Routing to **{tgt}** (command `{cmd}`)"})

# INJECT LOADED CODE SAMPLES ON DELEGATION ---
Copy link

Copilot AI Jul 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The code-sample injection logic is duplicated in both MultiAgentTester.py and MultiAgentAutoTester.py. Consider extracting this into a shared helper to reduce duplication and ease future updates.

Copilot uses AI. Check for mistakes.
@djriffle djriffle merged commit 15fe8d0 into main Jul 16, 2025
1 check passed
@djriffle djriffle deleted the AddingGlobalAgentPolicy branch July 30, 2025 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants