-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Feature/avg integration #1264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
adamvangrover
wants to merge
8
commits into
google:main
Choose a base branch
from
adamvangrover:feature/avg-integration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feature/avg integration #1264
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
This commit establishes the directory and placeholder file structure for the Agent Versatility Gear (AVG) Financial Expert demo, as defined in `avg/avg.json`. Key changes: - All new directories and files for the AVG toolkit (`adk_avg_toolkit`), the financial expert agent (`financial_expert_agent`), the demo application (`demo`), and associated configurations (`requirements.txt`, `README.md`, `.env.example`) have been created within the existing `avg/` directory. This decision was made for repository cleanliness as per your feedback. - Placeholder files have been populated with comments derived from the `content_prompt` fields in `avg.json`, indicating their intended purpose and future content. - No functional code has been implemented; this commit focuses solely on scaffolding the project structure. - Existing files in `avg/` (`avg.json`, `AVG_Developer_Guide.md`, `index.html`) remain untouched. This lays the groundwork for future development of the AVG toolkit and the Financial Expert agent based on the specifications in `avg.json`.
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
… done so far and provide feedback for Jules to continue.
…ility Gear) toolkit and a Financial Expert agent demo, all located in the `avg/` directory. Here's a summary of what I did: 1. **Project Setup (within `avg/`):** * I established the complete directory structure based on `avg/avg.json`. * I initially populated it with placeholder files, which I have now implemented. 2. **Core AVG Toolkit (`avg/adk_avg_toolkit/`):** * I implemented `KnowledgeConfigLoader` to load and parse YAML/JSON configurations, including error handling and getter methods. * I defined `BaseExpertWrapper` (ABC) as the standard interface for expert modules. * I created `ADKLlmExpertWrapper` as a concrete example of an expert wrapper, simulating an ADK LLM agent. * I implemented `ExpertisePipelineManager` to manage the definition, loading, and execution of multi-step expertise pipelines. This includes handling data flow between steps (`current_data`, `shared_context`) and an expert factory/caching mechanism. * I made sure `__init__.py` exports the public API of the toolkit. 3. **Financial Expert Agent (`avg/financial_expert_agent/`):** * I created `FinancialAdvisorMasterAgent` as the main agent to orchestrate the AVG toolkit. It selects pipelines based on (simplified) analysis of your queries and processes requests via the `ExpertisePipelineManager`. * I implemented concrete Expert Wrappers (`CompanyDataRetriever`, `MarketNewsAnalyzer`, `ReportGenerator`, `ProfileRetriever`) with mock logic to simulate specific financial tasks. I refined their initialization to correctly use `init_params` from pipeline configurations. * I created mock financial tools (`tools.py`) like `financial_web_search_tool`, `sec_edgar_api_tool`, and `stock_price_api_tool`, including conceptual ADK schemas in their docstrings. * I ensured `__init__.py` exports relevant agent and wrapper classes. 4. **Configuration (`avg/financial_expert_agent/configs/`):** * I significantly expanded `financial_knowledge_config.yaml` with detailed example configurations for knowledge sources, (placeholder) ingestion/vector/decision components, and, importantly, multiple `expertise_pipelines` (e.g., `company_overview_pipeline`, `market_sentiment_pipeline`, `investment_suitability_report_pipeline`) that the demo uses. I also debugged and refined the YAML syntax and input mapping paths. 5. **Demo Application (`avg/demo/`):** * I created `sample_queries.txt` with queries designed to trigger different pipelines. * I developed `run_demo.py`, a fully functional script that: * Loads environment variables. * Initializes the `KnowledgeConfigLoader` and `FinancialAdvisorMasterAgent`. * Implements a `dummy_expert_wrapper_factory` to instantiate the correct expert types based on pipeline configurations. * Reads queries and processes them through the agent, printing mock results. * I performed significant debugging on this script and its interactions with the framework to ensure end-to-end functionality. 6. **Supporting Files (`avg/`):** * I created `requirements.txt` listing core dependencies (`google-adk`, `PyYAML`, `python-dotenv`). * I provided `.env.example` as a template for necessary environment variables. * I drafted an initial structure for `README.md` (further updates were planned for the next step). **Developer Notes & Future Expansion Ideas (as per your request, reflected in code comments and the mock nature of the implementation):** * The current implementation uses mock logic for actual ADK agent interactions, API calls, and complex data processing. These are key areas for future expansion. * Input mapping in `ExpertisePipelineManager` is simplified; I could add full JSONPath or similar advanced mapping in the future. * Error handling can be made more granular. * The `_select_pipeline_for_query` in `FinancialAdvisorMasterAgent` is basic; LLM-based intent recognition would be a major upgrade. * The tools in `tools.py` need to be implemented with actual API calls and ADK `FunctionTool` definitions. * I should develop a formal testing suite (e.g., using `unittest` or `pytest`). This represents a foundational version of the AVG project, ready for further development and integration of real ADK capabilities.
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.
No description provided.