Made agent to work with Jeen-Metadata - #30
Conversation
📝 WalkthroughWalkthroughThe Text2SQL pipeline replaces schema-plan exploration with Jeen Metadata MCP catalog context, updates SQL and ambiguity prompts, adds post-generation ambiguity detection and HITL approval routing, revises refinement execution, and removes schema-plan fields from server and frontend contracts. ChangesText2SQL flow migration
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant schema_explorer_node
participant query_builder_node
participant detect_ambiguity_node
participant hitl_query_approval_node
participant refiner_node
User->>schema_explorer_node: Submit natural-language query
schema_explorer_node->>query_builder_node: Provide jeen_catalog
query_builder_node->>detect_ambiguity_node: Provide SQL and explanation
detect_ambiguity_node->>hitl_query_approval_node: Route clear result
hitl_query_approval_node->>refiner_node: Approved SQL
refiner_node-->>User: Return query results
Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 7
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@agent/scripts/upload_all_prompts.py`:
- Around line 87-91: Update the system prompt content in query_builder_v2 to
remove the contradiction between “Output ONLY the SQL query” and the required
reasoning explanation. Clearly specify the expected order and format: a brief
1–3 sentence explanation followed by the SQL query on its own line, while
retaining the table qualification requirement.
In `@agent/src/agent/config.py`:
- Around line 41-45: Update the configuration defaults for
JEEN_METADATA_MCP_KEY, JEEN_METADATA_MCP_URL, and JEEN_METADATA_CONNECTION_ID to
empty values so JeenMetadataClient.is_configured remains false unless explicitly
configured. Ensure real credentials and environment-specific connection settings
are sourced from environment variables, remove the committed bearer token, and
preserve the intentional cleartext HTTP behavior only when an explicit URL is
supplied.
In `@agent/src/agent/nodes/detect_ambiguity.py`:
- Around line 132-136: Enable the Jeen catalog interpolation in the user_message
assembled by the ambiguity evaluator, using state.get('jeen_catalog', '')
alongside the existing request, SQL attempt, and explanation context. Keep the
catalog label and surrounding formatting consistent so the evaluator can
validate referenced tables and columns.
In `@agent/src/agent/nodes/query_builder.py`:
- Around line 92-101: Update the rejection handling in route_hitl_approval so
blank feedback is replaced with the default "Query rejected by user" message,
using fallback behavior for any falsy feedback value rather than only a missing
key. Preserve the existing approval path and execution_path values.
In `@agent/src/agent/nodes/schema_explorer.py`:
- Line 21: Update the schema_explorer_node config parameter annotation to
RunnableConfig | None while retaining its existing None default.
- Around line 47-55: Add tables_used as a list[str] channel to the AgentState
definition in state.py so the tables_used entry returned by
schema_explorer_node() is accepted by LangGraph; preserve the existing returned
value and behavior.
In `@agent/src/agent/utils/jeen_metadata_client.py`:
- Around line 111-119: Update the JeenMetadataClient class docstring to remove
the unimplemented search_tables() entry and describe only the implemented
methods: get_catalog_prompt(), get_table_profile(), and list_tables_rich(). Also
remove or revise the module-level reference to a search tool so the documented
API matches the actual client surface.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 73a8242d-cb31-4531-b5bd-81dc363a39dc
⛔ Files ignored due to path filters (1)
agent/uv.lockis excluded by!**/*.lock
📒 Files selected for processing (16)
agent/scripts/upload_all_prompts.pyagent/src/agent/config.pyagent/src/agent/graph.pyagent/src/agent/mcp_server.pyagent/src/agent/nodes/detect_ambiguity.pyagent/src/agent/nodes/query_builder.pyagent/src/agent/nodes/refiner.pyagent/src/agent/nodes/schema_explorer.pyagent/src/agent/routers/chat.pyagent/src/agent/state.pyagent/src/agent/utils/jeen_metadata_client.pyagent/tests/test_routing.pyfrontend/src/api/agent.tsfrontend/src/components/SchemaPlanDisplay.module.cssfrontend/src/components/SchemaPlanDisplay.tsxfrontend/src/pages/AgentTestingPage.tsx
💤 Files with no reviewable changes (5)
- frontend/src/components/SchemaPlanDisplay.module.css
- frontend/src/components/SchemaPlanDisplay.tsx
- agent/src/agent/routers/chat.py
- frontend/src/api/agent.ts
- frontend/src/pages/AgentTestingPage.tsx
| JEEN_METADATA_MCP_URL: str = "http://schema-modeler.dev161.internal/api/mcp" # e.g. https://jeen-metadata.example.com/api/mcp | ||
| JEEN_METADATA_MCP_KEY: str = "mcp_f885337e381366db5edc22093415450e38f71e997e96dc708fea69bde9529ab9" # Bearer key from /api/mcp/keys in jeen-metadata | ||
| JEEN_METADATA_CONNECTION_ID: int = 89 # Numeric service ID (from list_connections) | ||
| JEEN_METADATA_SEARCH_LIMIT: int = 10 # Max tables returned by the search tool | ||
| JEEN_METADATA_PROFILE_TIMEOUT: float = 30.0 # Per-MCP-call timeout (seconds) |
There was a problem hiding this comment.
🔒 Security & Privacy | 🔴 Critical | ⚡ Quick win
Critical: remove committed MCP credentials and environment-specific defaults; use cleartext HTTP only intentionally.
JEEN_METADATA_MCP_KEY embeds a live-looking bearer token directly in source, and JEEN_METADATA_MCP_URL/JEEN_METADATA_CONNECTION_ID hardcode an internal environment. This leaks a secret into VCS and also contradicts the section comment on Lines 39-40 ("Leave empty to keep the local path") — with these non-empty defaults, JeenMetadataClient.is_configured is always true, so the documented local-DB fallback can never engage without an explicit override. The URL is also plaintext http:// (flagged by static analysis, CWE-319).
Rotate the leaked key immediately and default these to empty, sourcing real values from the environment.
🔒 Proposed fix
- JEEN_METADATA_MCP_URL: str = "http://schema-modeler.dev161.internal/api/mcp" # e.g. https://jeen-metadata.example.com/api/mcp
- JEEN_METADATA_MCP_KEY: str = "mcp_f885337e381366db5edc22093415450e38f71e997e96dc708fea69bde9529ab9" # Bearer key from /api/mcp/keys in jeen-metadata
- JEEN_METADATA_CONNECTION_ID: int = 89 # Numeric service ID (from list_connections)
+ JEEN_METADATA_MCP_URL: str = "" # e.g. https://jeen-metadata.example.com/api/mcp
+ JEEN_METADATA_MCP_KEY: str = "" # Bearer key from /api/mcp/keys in jeen-metadata
+ JEEN_METADATA_CONNECTION_ID: int = 0 # Numeric service ID (from list_connections)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| JEEN_METADATA_MCP_URL: str = "http://schema-modeler.dev161.internal/api/mcp" # e.g. https://jeen-metadata.example.com/api/mcp | |
| JEEN_METADATA_MCP_KEY: str = "mcp_f885337e381366db5edc22093415450e38f71e997e96dc708fea69bde9529ab9" # Bearer key from /api/mcp/keys in jeen-metadata | |
| JEEN_METADATA_CONNECTION_ID: int = 89 # Numeric service ID (from list_connections) | |
| JEEN_METADATA_SEARCH_LIMIT: int = 10 # Max tables returned by the search tool | |
| JEEN_METADATA_PROFILE_TIMEOUT: float = 30.0 # Per-MCP-call timeout (seconds) | |
| JEEN_METADATA_MCP_URL: str = "" # e.g. https://jeen-metadata.example.com/api/mcp | |
| JEEN_METADATA_MCP_KEY: str = "" # Bearer key from /api/mcp/keys in jeen-metadata | |
| JEEN_METADATA_CONNECTION_ID: int = 0 # Numeric service ID (from list_connections) | |
| JEEN_METADATA_SEARCH_LIMIT: int = 10 # Max tables returned by the search tool | |
| JEEN_METADATA_PROFILE_TIMEOUT: float = 30.0 # Per-MCP-call timeout (seconds) |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@agent/src/agent/config.py` around lines 41 - 45, Update the configuration
defaults for JEEN_METADATA_MCP_KEY, JEEN_METADATA_MCP_URL, and
JEEN_METADATA_CONNECTION_ID to empty values so JeenMetadataClient.is_configured
remains false unless explicitly configured. Ensure real credentials and
environment-specific connection settings are sourced from environment variables,
remove the committed bearer token, and preserve the intentional cleartext HTTP
behavior only when an explicit URL is supplied.
Source: Linters/SAST tools
| user_message = ( | ||
| f"User Request: {state.get('user_query', '')}\n\n" | ||
| f"Schema Context:\n{schema_context}\n\n" | ||
| f"Current Agent SQL Attempt:\n{agent_plan}\n" | ||
| # f"Schema Context:\n{state.get('jeen_catalog', '')}\n\n" | ||
| f"Current Agent SQL Attempt:\n{state.get('sql_query', '')}\n\n" | ||
| f"Agent's Explanation for SQL:\n{state.get('sql_explanation', '')}\n" |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Pass the Jeen catalog to the ambiguity evaluator.
The catalog interpolation is commented out, so this LLM cannot verify whether the SQL selected valid tables/columns or guessed among catalog alternatives. This contradicts the node contract and makes ambiguity decisions schema-blind.
Proposed fix
user_message = (
f"User Request: {state.get('user_query', '')}\n\n"
- # f"Schema Context:\n{state.get('jeen_catalog', '')}\n\n"
+ f"Schema Context:\n{state.get('jeen_catalog', '')}\n\n"
f"Current Agent SQL Attempt:\n{state.get('sql_query', '')}\n\n"
f"Agent's Explanation for SQL:\n{state.get('sql_explanation', '')}\n"
)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| user_message = ( | |
| f"User Request: {state.get('user_query', '')}\n\n" | |
| f"Schema Context:\n{schema_context}\n\n" | |
| f"Current Agent SQL Attempt:\n{agent_plan}\n" | |
| # f"Schema Context:\n{state.get('jeen_catalog', '')}\n\n" | |
| f"Current Agent SQL Attempt:\n{state.get('sql_query', '')}\n\n" | |
| f"Agent's Explanation for SQL:\n{state.get('sql_explanation', '')}\n" | |
| user_message = ( | |
| f"User Request: {state.get('user_query', '')}\n\n" | |
| f"Schema Context:\n{state.get('jeen_catalog', '')}\n\n" | |
| f"Current Agent SQL Attempt:\n{state.get('sql_query', '')}\n\n" | |
| f"Agent's Explanation for SQL:\n{state.get('sql_explanation', '')}\n" |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@agent/src/agent/nodes/detect_ambiguity.py` around lines 132 - 136, Enable the
Jeen catalog interpolation in the user_message assembled by the ambiguity
evaluator, using state.get('jeen_catalog', '') alongside the existing request,
SQL attempt, and explanation context. Keep the catalog label and surrounding
formatting consistent so the evaluator can validate referenced tables and
columns.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (5)
agent/scripts/upload_all_prompts.py (2)
280-285: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick winPass schema context to the ambiguity detector.
This template requires
{{schema}}, butdetect_ambiguity_nodebypasses the Langfuse user template and manually sends only the user query, SQL attempt, and explanation. The detector therefore cannot perform the new schema-alignment and filter-value checks. Includestate["jeen_catalog"]in the runtime message or render this template through the node.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@agent/scripts/upload_all_prompts.py` around lines 280 - 285, Update detect_ambiguity_node to provide the schema required by the ambiguity-detector prompt: include state["jeen_catalog"] in the runtime message alongside the user query, SQL attempt, and explanation, or route the node through the existing user-template rendering path. Ensure the rendered request contains the {{schema}} context used for schema-alignment and filter-value checks.
87-91: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winMake the SQL/explanation delimiter explicit.
The prompt requires an explanation before SQL but does not require a fenced SQL block or another delimiter.
agent/src/agent/nodes/query_builder.pytreats any non-fenced response as the entire SQL query, so a compliant response can be executed with the explanation prepended. Require a fencedsqlblock or update the parser to split the documented raw format.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@agent/scripts/upload_all_prompts.py` around lines 87 - 91, Update the SQL expert prompt in the upload prompt definition to require the generated SQL to appear in an explicit fenced sql block after the explanation, matching the format expected by query_builder.py. Ensure the instruction clearly separates the explanation from executable SQL while preserving the existing qualification requirements.agent/src/agent/nodes/schema_explorer.py (1)
27-33: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winFail closed when the catalog is unavailable.
When MCP is unconfigured, or
get_catalog_prompt()returns""after an error, this node still allows query generation to continue with no usable schema. The query builder can then invent tables or columns. Return an explicit unanswerable/escalated state or stop before SQL generation instead of emitting a normaljeen_catalogfallback.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@agent/src/agent/nodes/schema_explorer.py` around lines 27 - 33, Update the schema explorer flow around _jeen and get_catalog_prompt() to fail closed whenever MCP is unconfigured or the catalog prompt is empty after an error. Do not continue with a normal jeen_catalog fallback or permit SQL generation without usable schema; return the node’s established explicit unanswerable/escalated state or stop before query generation.agent/src/agent/nodes/query_builder.py (2)
31-38: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winValidate Trino qualification settings before generation.
The prompt mandates
catalog.schema.tablequalification, butAgentSettings.TRINO_CATALOGandTRINO_SCHEMAdefault to empty strings. In deployments without both environment values, the model is asked to generate malformed identifiers such as..table. Reject or escalate missing configuration, or make qualification conditional.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@agent/src/agent/nodes/query_builder.py` around lines 31 - 38, Validate settings.TRINO_CATALOG and settings.TRINO_SCHEMA before the chain.ainvoke call in the query-generation flow, and reject or escalate when either is missing rather than prompting generation with empty qualification components; alternatively, explicitly make the prompt’s qualification requirement conditional when configuration is incomplete.
83-90: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick winRemove the obsolete
schema_planfield from the approval interrupt.
AgentStatealready exposes the catalog asjeen_catalog, and both/api/v1/agent/chatand the MCP response pass the full interrupt value throughinterrupt_details. Drop this legacy contract fromhitl_query_approval_nodeand any remaining UI handling.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@agent/src/agent/nodes/query_builder.py` around lines 83 - 90, Remove the obsolete schema_plan field from the interrupt payload in hitl_query_approval_node, and eliminate any remaining UI handling that reads or expects it. Continue using AgentState.jeen_catalog and preserve the existing full interrupt_details flow for the chat API and MCP response.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@agent/scripts/upload_all_prompts.py`:
- Around line 280-285: Update detect_ambiguity_node to provide the schema
required by the ambiguity-detector prompt: include state["jeen_catalog"] in the
runtime message alongside the user query, SQL attempt, and explanation, or route
the node through the existing user-template rendering path. Ensure the rendered
request contains the {{schema}} context used for schema-alignment and
filter-value checks.
- Around line 87-91: Update the SQL expert prompt in the upload prompt
definition to require the generated SQL to appear in an explicit fenced sql
block after the explanation, matching the format expected by query_builder.py.
Ensure the instruction clearly separates the explanation from executable SQL
while preserving the existing qualification requirements.
In `@agent/src/agent/nodes/query_builder.py`:
- Around line 31-38: Validate settings.TRINO_CATALOG and settings.TRINO_SCHEMA
before the chain.ainvoke call in the query-generation flow, and reject or
escalate when either is missing rather than prompting generation with empty
qualification components; alternatively, explicitly make the prompt’s
qualification requirement conditional when configuration is incomplete.
- Around line 83-90: Remove the obsolete schema_plan field from the interrupt
payload in hitl_query_approval_node, and eliminate any remaining UI handling
that reads or expects it. Continue using AgentState.jeen_catalog and preserve
the existing full interrupt_details flow for the chat API and MCP response.
In `@agent/src/agent/nodes/schema_explorer.py`:
- Around line 27-33: Update the schema explorer flow around _jeen and
get_catalog_prompt() to fail closed whenever MCP is unconfigured or the catalog
prompt is empty after an error. Do not continue with a normal jeen_catalog
fallback or permit SQL generation without usable schema; return the node’s
established explicit unanswerable/escalated state or stop before query
generation.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: a6b05cf5-8fca-4443-8cd9-d95e85e31647
📒 Files selected for processing (6)
agent/scripts/upload_all_prompts.pyagent/src/agent/nodes/detect_ambiguity.pyagent/src/agent/nodes/query_builder.pyagent/src/agent/nodes/schema_explorer.pyagent/src/agent/state.pyagent/src/agent/utils/jeen_metadata_client.py
💤 Files with no reviewable changes (1)
- agent/src/agent/nodes/detect_ambiguity.py
…ng to satisfaction check
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
agent/src/agent/config.py (1)
48-49: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winRequire Trino catalog and schema when generating qualified SQL.
query_builder_nodeinjects these values into a prompt that mandatescatalog.schema.table; the empty defaults can yield invalid SQL such as..orders. Make these required settings, or fail before invoking the LLM.Proposed fix
- TRINO_CATALOG: str = "" - TRINO_SCHEMA: str = "" + TRINO_CATALOG: str = Field(min_length=1) + TRINO_SCHEMA: str = Field(min_length=1)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@agent/src/agent/config.py` around lines 48 - 49, Update the TRINO_CATALOG and TRINO_SCHEMA settings in the configuration model to require non-empty values, or add validation before query_builder_node invokes the LLM; ensure qualified SQL generation cannot proceed with missing catalog or schema values.agent/scripts/upload_all_prompts.py (1)
253-256: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winProvide catalog context to the ambiguity evaluator.
The system prompt requires schema alignment, value existence checks, and table/column collision analysis, but this template—and
detect_ambiguity_node—provides no schema orjeen_catalog. The model must therefore guess while auditing the generated SQL. Add{{jeen_catalog}}here and pass it from the node, or narrow the prompt to checks possible from SQL and explanation alone.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@agent/scripts/upload_all_prompts.py` around lines 253 - 256, Update the ambiguity-evaluation prompt in the template containing “Current Agent SQL Attempt” to include the jeen_catalog context, then update detect_ambiguity_node to pass the corresponding catalog value when rendering it. Ensure the evaluator receives the same catalog used for schema and value validation rather than requiring the model to infer it from SQL alone.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@agent/src/agent/nodes/schema_explorer.py`:
- Around line 28-41: Update the schema explorer flow around the Jeen
configuration check and catalog prompt retrieval to preserve the documented
local-DB fallback when Jeen is unconfigured, or consistently make Jeen
configuration mandatory through the related AgentSettings and JeenMetadataClient
contract. Ensure non-Jeen deployments do not abort requests unexpectedly and
retain the existing Jeen path when configured.
---
Outside diff comments:
In `@agent/scripts/upload_all_prompts.py`:
- Around line 253-256: Update the ambiguity-evaluation prompt in the template
containing “Current Agent SQL Attempt” to include the jeen_catalog context, then
update detect_ambiguity_node to pass the corresponding catalog value when
rendering it. Ensure the evaluator receives the same catalog used for schema and
value validation rather than requiring the model to infer it from SQL alone.
In `@agent/src/agent/config.py`:
- Around line 48-49: Update the TRINO_CATALOG and TRINO_SCHEMA settings in the
configuration model to require non-empty values, or add validation before
query_builder_node invokes the LLM; ensure qualified SQL generation cannot
proceed with missing catalog or schema values.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: f674b93b-33ee-4022-835c-c1e137dc80f1
📒 Files selected for processing (3)
agent/scripts/upload_all_prompts.pyagent/src/agent/config.pyagent/src/agent/nodes/schema_explorer.py
| if not _jeen.is_configured: | ||
| error_msg = "Jeen is not configured. Jeen must be configured for the schema explorer to work." | ||
| logger.error(error_msg) | ||
| raise RuntimeError(error_msg) | ||
|
|
||
| logger.info("Fetching full catalog prompt from Jeen MCP.") | ||
| try: | ||
| catalog_prompt = await _jeen.get_catalog_prompt() | ||
| if not catalog_prompt: | ||
| raise ValueError("Received empty catalog prompt from Jeen.") | ||
| except Exception as exc: | ||
| error_msg = f"There was a problem getting the catalog_prompt from Jeen: {exc}" | ||
| logger.error(error_msg) | ||
| raise RuntimeError(error_msg) from exc |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Restore the documented local fallback or make Jeen mandatory everywhere.
JeenMetadataClient and AgentSettings describe an unconfigured MCP client as falling back to the local DB, but this node now aborts every request instead. Restoring empty MCP defaults will therefore break non-Jeen deployments. Reintroduce the fallback here, or remove that configuration contract and require Jeen settings at startup.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@agent/src/agent/nodes/schema_explorer.py` around lines 28 - 41, Update the
schema explorer flow around the Jeen configuration check and catalog prompt
retrieval to preserve the documented local-DB fallback when Jeen is
unconfigured, or consistently make Jeen configuration mandatory through the
related AgentSettings and JeenMetadataClient contract. Ensure non-Jeen
deployments do not abort requests unexpectedly and retain the existing Jeen path
when configured.
added connectivity with jeen and changed schema explorer to be purely code.
changed the wuery builder to analyze the catalog data instead of getting the schema plan
Summary by CodeRabbit
New Features
Improvements
Configuration