Skip to content

Add MeTTa DAS Bus Client #944

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 9 commits into
base: main
Choose a base branch
from
Open

Add MeTTa DAS Bus Client #944

wants to merge 9 commits into from

Conversation

arturgontijo
Copy link
Contributor

@arturgontijo arturgontijo commented Jun 3, 2025

DO NOT MERGE IT!!! As we plan to have a tag/version of the DAS repo to use it here (currently using master)

This PR adds a new built-in module called das that uses the metta-bus-client rust package to send pattern matching queries to a DAS Service Bus.

In order to test it, one could follow the steps from Setup DAS locally and then:

cargo build --release --features=das

Then run the MeTTa REPL binary:

./target/release/metta-repl 
Visit https://metta-lang.dev/ for tutorials.
Execute !(help!) to get list of the standard library functions.
> !(import! &self das)
[()]
> !(bind! &das (new-das! (localhost:8080) (localhost:35700)))
[()]
> !(match &das (Similarity "human" $S) ($S))
[(a408f6dd446cdd4fa56f82e77fe6c870), (3225ea795289574ceee32e091ad54ef4), (181a19436acef495c8039a610be59603)]
> 

@vsbogd let me know if I'm in the right direction about adding new modules here.

@arturgontijo arturgontijo requested a review from vsbogd June 3, 2025 18:25
Copy link
Collaborator

@vsbogd vsbogd left a comment

Choose a reason for hiding this comment

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

Last couple of things I missed on the previous review.

@arturgontijo
Copy link
Contributor Author

Hey @vsbogd sorry for the huge delay on this one...We finally got a version tag that exposes the necessary code for this module.
When you get a chance, please do another review round here.

@arturgontijo arturgontijo changed the title [WIP] Add MeTTa DAS Bus Client Add MeTTa DAS Bus Client Jul 16, 2025
@vsbogd
Copy link
Collaborator

vsbogd commented Jul 17, 2025

Thanks @arturgontijo , looks good to me and I am ready to merge it.

There are two alternatives:

  1. make it available by default, then it should be added into default feature list in Cargo.toml
  2. keep it optional, then I would add it as a default into Release builds as users would expect it is present

I don't see why we cannot make it default choice (i.e. option (1)), but I would like to know your opinion on this. Option (2) can be implemented as a separate PR.

For the option (2) there are two places to edit:

@vsbogd
Copy link
Collaborator

vsbogd commented Jul 17, 2025

In any case after the change it is worth to check that DAS integration is a part of the Release build i.e. try building docker (see https://github.com/trueagi-io/hyperon-experimental#docker) and try releasing Python binaries locally (https://github.com/trueagi-io/hyperon-experimental/blob/main/docs/DEVELOPMENT.md#how-to-release-python-distribution-packages-locally).

@vsbogd
Copy link
Collaborator

vsbogd commented Jul 17, 2025

@vsbogd vsbogd requested a review from CICS-Oleg July 17, 2025 13:26
@CICS-Oleg
Copy link
Contributor

@arturgontijo
Copy link
Contributor Author

make it available by default, then it should be added into default feature list in Cargo.toml

@vsbogd I vote for making it default (as this option seems more simple then 2, and we can change that in future if needed).

check that DAS integration is a part of the Release build

Will do and let you know

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.

3 participants