8000 Create agent: support wildcards in tables / KB names by ea-rus · Pull Request #11067 · mindsdb/mindsdb · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Create agent: support wildcards in tables / KB names #11067

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
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

ea-rus
Copy link
Collaborator
@ea-rus ea-rus commented Jun 11, 2025

Description

Example:

CREATE AGENT my_agent_1
USING
    ...
     include_knowledge_bases= ['kb_*'],
     ignore_knowledge_bases= ['kb_ollama*'],

     include_tables=['my_pg.a*','files.ml*'],
     ignore_tables=['my_pg.aaa*'],

Fixes https://linear.app/mindsdb/issue/RES-60/add-entire-database-to-agents

Type of change

  • ⚡ New feature (non-breaking change which adds functionality)

Verification Process

To ensure the changes are working as expected:

  • Test Location: Specify the URL or path for testing.
  • Verification Steps: Outline the steps or queries needed to validate the change. Include any data, configurations, or actions required to reproduce or see the new functionality.

Additional Media:

  • I have attached a brief loom video or screenshots showcasing the new functionality or change.

Checklist:

  • My code follows the style guidelines(PEP 8) of MindsDB.
  • I have appropriately commented on my code, especially in complex areas.
  • Necessary documentation updates are either made or tracked in issues.
  • Relevant unit and integration tests are updated or added.

Copy link

Unable to Process PR Review

The author of this PR does not exist on Entelligence Dashboard. Please add the user to Entelligence AI here to enable reviews for this user.

Copy link
Contributor
@torrmal torrmal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work

# Conflicts:
#	mindsdb/interfaces/skills/sql_agent.py
Comment on lines 121 to 131
if len(table.parts) == 1:
tbl = table.parts[0]
elif len(table.parts) == 2:
db, tbl = table.parts
db = db.lower()
elif len(table.parts) == 3:
db, schema, tbl = table.parts
schema = schema.lower()
db = db.lower()
else:
raise NotImplementedError
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

much more readable :p

match [x.lower() for x in parts]:
    case [tbl]:
        pass
    case [db, tb
10000
l]:
        pass
    case [db, schema, tbl]:
        pass
    case _:
        raise NotImplementedError

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0