Created
December 16, 2025 04:27
-
-
Save pranjalAI/2c71f6d39f796834044dc3837951387b to your computer and use it in GitHub Desktop.
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
| # agents/fundamentals_agent.py | |
| from state import ResearchState | |
| from mcp_client import call_mcp_tool | |
| class FundamentalsAgent: | |
| def run(self, state: ResearchState) -> ResearchState: | |
| symbol = state.symbol | |
| if not symbol: | |
| raise ValueError("Symbol missing in state.") | |
| income = call_mcp_tool("getIncomeStatement", {"symbol": symbol, "period": "annual"}) | |
| balance = call_mcp_tool("getBalanceSheetStatement", {"symbol": symbol, "period": "annual"}) | |
| cashflow = call_mcp_tool("getCashFlowStatement", {"symbol": symbol, "period": "annual"}) | |
| state.fundamentals = { | |
| "income_statement": income or [], | |
| "balance_sheet": balance or [], | |
| "cash_flow": cashflow or [], | |
| } | |
| return state |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment