Skip to content

Merge dev update to main: RAG agent/graph for XANES, memory/database, evaluation#112

Open
tdpham2 wants to merge 71 commits intomainfrom
dev
Open

Merge dev update to main: RAG agent/graph for XANES, memory/database, evaluation#112
tdpham2 wants to merge 71 commits intomainfrom
dev

Conversation

@tdpham2
Copy link
Copy Markdown
Collaborator

@tdpham2 tdpham2 commented Apr 17, 2026

Summary

Major improvements for ChemGraph:

  • Add memory storage via SQLite: 6506af2 and ability to see/resume previous session.
  • Add a RAG agent: cd3d63f
  • Add single agent for XANES spectra simulation: 48e78ca
  • Add new evaluation pipeline, dataset and CLI: 5a4076f
  • Fix MACE/Pytorch issue: 6371f7b

tdpham2 and others added 30 commits March 10, 2026 12:32
Add session memory persistence with CLI session management.
Add evaluation & benchmarking module with LLM-as-judge and documentation
Add OpenCode MCP configuration for using ChemGraph tools directly
Add missing evaluation documentations and update config.toml
vitorgrizzi and others added 27 commits March 26, 2026 13:54
…anes workflow

XANES tools refactoring (xanes_tools.py):
- Separate original monolithic workflow into core and ensemble functions
- Add run_xanes_core() for single-structure FDMNES calculations via subprocess
- Refactor fetch_materials_project_data() to accept Pydantic schema input
  with runtime MP_API_KEY validation (removed hardcoded API key)
- Replace inline Parsl config with clean subprocess-based FDMNES execution
- Extract create_fdmnes_inputs(), expand_database_results(), plot_xanes_results()
  as standalone reusable functions
- Add proper docstrings, structured logging, and error handling throughout

New schemas (xanes_schema.py):
- xanes_input_schema: single FDMNES calculation parameters
- xanes_input_schema_ensemble: batch Parsl-based calculation parameters
- mp_query_schema: Materials Project queries with optional API key and
  energy_above_hull filter

New MCP server (xanes_mcp_parsl.py):
- Expose run_xanes_single, run_xanes_ensemble, fetch_mp_structures, and
  plot_xanes tools via FastMCP
- Parsl integration for HPC ensemble FDMNES execution (Polaris/Aurora)
- Async gather for parallel result collection with JSONL summary logging

New single_agent_xanes workflow:
- Dedicated LangGraph graph with XANES-specific tools (run_xanes,
  fetch_xanes_data, molecule_name_to_smiles, smiles_to_coordinate_file)
- XANES-focused system and formatter prompts (xanes_prompt.py)
- MP_API_KEY and FDMNES_EXE env var warnings at graph construction time
- Repeated tool-call cycle detection to prevent infinite loops
- Register single_agent_xanes in ChemGraph agent dispatcher and write_state

Cleanup:
- Remove all XANES tools from single_agent and multi_agent default tool lists
- Update test_graph_constructors.py with single_agent_xanes parametrization
 Add structured output evaluation with checkpointing and FormatterAgent retry
@tdpham2
Copy link
Copy Markdown
Collaborator Author

tdpham2 commented Apr 17, 2026

@keceli I will keep this PR open for now so I can track the major changes before asking you to review it.

@tdpham2 tdpham2 changed the title Merge recent update to main: RAG agent/graph for XANES, memory/database, evaluation Merge dev update to main: RAG agent/graph for XANES, memory/database, evaluation Apr 17, 2026
@tdpham2 tdpham2 self-assigned this Apr 17, 2026
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