Partner plugin application: schemagate schema selection (nemo-agent-toolkit-schemagate)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 85/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- documentation
Research direction
Locate the README and the third-party plugins doc (docs/source/extend/third-party-plugins.md). Add nemo-agent-toolkit-schemagate to the list of externally managed plugins in the README, matching the existing format. Done when the entry appears and docs build cleanly.
Written by the indexing model from the issue text.
Description
Is this a new feature, an improvement, or a change to existing functionality?
New Feature
How would you describe the priority of this feature request
Medium
Please provide a clear description of problem this feature solves
I maintain schemagate, an open-source (Apache-2.0) library for text-to-SQL agents. I'd like to apply for the provider-owned plugin path described in the third-party plugin guide, starting at the Listed tier.
A text-to-SQL agent usually puts the whole schema, or a similarity-ranked slice of it, in the prompt, and it decides that before anything checks what the caller may read. schemagate reflects the database once (structure only, never rows), and for each question selects the few tables and views it needs from the ones the caller's roles may read, adding the join tables the question never names. A restricted table is never a candidate, so it is absent from the prompt rather than ranked low. Selection runs locally and calls no model.
The package adds a function group, _type: schemagate, exposing schemagate__select (question in, compact DDL out) and schemagate__list_objects, and a native retriever, _type: schemagate, usable with nat_retriever and builder.get_retriever. The caller's principal and roles are configuration, not tool arguments, so an agent cannot grant itself a role.
Results and adoption so far:
- Saves prompt tokens: on Spider 2.0-lite's BigQuery and Snowflake warehouses with 50+ tables, the median prompt is 91% smaller than sending the full schema (about 1,700 tokens against about 56,000), and selection itself makes no model call. Method and per-question results.
- Accuracy: #1 on BIRD's official Mini-Dev leaderboard in all three dialects (SQLite 81.0, PostgreSQL 72.6, MySQL 72.4): https://bird-bench.github.io/
- LangChain:
langchain-schemagateis listed in LangChain's official integrations docs: https://docs.langchain.com/oss/python/integrations/retrievers - Listed in the Official MCP Registry (
io.github.ashishsinha1602/schemagate) and the DuckDB community list; about 7,000 PyPI downloads a month forschemagate(excluding mirrors).
Describe your ideal solution
List nemo-agent-toolkit-schemagate in the NeMo Agent Toolkit third-party plugin documentation. I'm happy to open the documentation PR myself, adding schemagate to the README's list of externally managed plugins.
Submission details
| Item | Value |
|---|---|
| Provider | schemagate (Ashish Sinha) |
| Package scope | Function group (FunctionGroupBaseConfig, register_function_group) and retriever (RetrieverBaseConfig, register_retriever_provider, register_retriever_client, native Retriever) |
| License | Apache-2.0 |
| Repository | https://github.com/ashishsinha1602/NeMo-Agent-Toolkit-schemagate |
| PyPI package | nemo-agent-toolkit-schemagate 0.1.0 |
| Import package | nemo_agent_toolkit_schemagate (top-level, not under nat., following the feedback on #2333 that nat.plugins is reserved for the toolkit's own plugins) |
| Entry point | [project.entry-points."nat.plugins"] nat_schemagate = "nemo_agent_toolkit_schemagate.register" |
Registered _type |
schemagate (function group), schemagate (retriever provider and client) |
| Tool names | <instance>__select, <instance>__list_objects |
nvidia-nat-core range |
>=1.8,<2 |
| Python | 3.11, 3.12, 3.13 |
| Support contacts | issues at https://github.com/ashishsinha1602/NeMo-Agent-Toolkit-schemagate/issues; security reports per https://github.com/ashishsinha1602/schemagate/blob/main/SECURITY.md |
Submission checklist
- Repository and package names follow the naming convention (
NeMo-Agent-Toolkit-schemagate,nemo-agent-toolkit-schemagate,nat_schemagate,_type: schemagate). The import package isnemo_agent_toolkit_schemagaterather thannat.plugins.schemagate, per the #2333 feedback. -
nat.pluginsentry point. - Public imports come only from
nat.plugin_api(Builder,FunctionGroup,FunctionGroupBaseConfig,SerializableSecretStr,register_function_group,Retriever,RetrieverBaseConfig,RetrieverOutput,Document,RetrieverProviderInfo,register_retriever_provider,register_retriever_client). Tests additionally useWorkflowBuilder, the loader andnat.test.tool_test_runner. -
nvidia-nat-coreis a required dependency, bounded>=1.8,<2. - Apache-2.0 license.
- README covers installation (
uvandpip), configuration fields and defaults, credential handling (the database URL is a secret field), a workflow example, the registered_typevalues and tool names, supported versions, local test commands, and bug routing between the plugin andnvidia-nat-core. - Tests, with no network, database or API key (they use schemagate's bundled SQLite demo schema):
- Unit tests for the selection logic, including that a table restricted to a role the caller lacks never reaches the prompt.
- A loader smoke test: the entry point loads,
discover_and_register_pluginsregisters the function group and the retriever, YAML config selects them, andWorkflowBuilderbuilds both. - Function-group tool tests through
nvidia-nat-test(ToolTestRunner). examples/config_ollama.ymlwires the function group into areact_agenton a local OpenAI-compatible server; the tool calls work there, though a 3B local model does not always finish the answer, so the README example uses NIM.- Verified from the published wheel: a fresh
pip install nemo-agent-toolkit-schemagate(0.1.0, withnvidia-nat-core1.9.0) registers the function group and the retriever.
- Compatibility CI against the last two toolkit minor releases:
ci.ymlruns Python 3.11 withnvidia-nat-core1.8.0 and Python 3.13 with 1.9.0: a registry-based discovery check and the unit and loader tests, on every push and PR.
Minimal workflow
function_groups:
schemagate:
_type: schemagate
database_url: demo # schemagate's bundled SQLite schema; or any SQLAlchemy URL
top_k: 6
llms:
nim_llm:
_type: nim
model_name: meta/llama-3.3-70b-instruct
workflow:
_type: react_agent
llm_name: nim_llm
tool_names: [schemagate]
pip install nemo-agent-toolkit-schemagate nvidia-nat-langchain
export NVIDIA_API_KEY=...
nat run --config_file config.yml --input "Which tables do I need for late shipments by carrier?"
Additional context
- Bug routing: bugs in the integration or in table selection go to https://github.com/ashishsinha1602/NeMo-Agent-Toolkit-schemagate/issues (or https://github.com/ashishsinha1602/schemagate/issues). Bugs in
nvidia-nat-core, such as plugin discovery, function groups ornat_retriever, are filed in this repository. - Numbers: on Spider 2.0-lite's public BigQuery and Snowflake schemas, the median saving per database with 50+ tables was 91.1% of the full schema's prompt tokens; on BIRD's seven-table databases it was 8.8%. Method and recall trade-off: https://github.com/ashishsinha1602/schemagate/blob/main/BENCHMARKS.md#prompt-tokens-on-public-schemas-the-saving-grows-with-the-schema
- Next tier: I would like to move to Verified once Listed. The compatibility CI for the last two minor releases is in place and will be kept current with new toolkit releases.
Code of Conduct
- I agree to follow this project's Code of Conduct
- I have searched the open feature requests and have found no duplicates for this feature request
- Dominant language
- Python
- Stars
- 2.7k
- Forks
- 814
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 128
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NVIDIA/NeMo-Agent-Toolkit
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NVIDIA/NeMo-Agent-Toolkit#2536 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
NVIDIA/NeMo-Agent-Toolkit#2534 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 Half a day Newbie friendliness 35/100
NVIDIA/NeMo-Agent-Toolkit#2537 · 1 comment ·
Maintainers usually reply within 1 day
-
Phoenix ATIF exporter misses tool spans from IntermediateStepToATIFConverter and ends the workflow span before a trailing tool callPossibly taken @anishmehta24 claimed this 1 day ago. Openbug
Difficulty 3/5 1-2 days Newbie friendliness 30/100
NVIDIA/NeMo-Agent-Toolkit#2532 ·
Maintainers usually reply within 1 day
-
[FEA] Add a Future AGI OTLP telemetry exporter (futureagi)Possibly taken @nik13 claimed this 3 days ago. Open
NVIDIA/NeMo-Agent-Toolkit#2489 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
All issues in NVIDIA/NeMo-Agent-Toolkit
Similar issues
-
breaking change
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
check-skill-pages: show fixture build errors when a build failsPossibly taken @ShahadatTest claimed this today. Opengood first issue P2
Difficulty 1/5 Under an hour Newbie friendliness 85/100
coco-research/coco#439 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
esphome/home-assistant-addon#274 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
endurain-project/endurain#882 ·
Maintainers usually reply within 1 day
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 72/100