{"id":27837979,"url":"https://github.com/project-ryoma/ryoma","last_synced_at":"2025-05-02T23:01:10.967Z","repository":{"id":225098143,"uuid":"663374912","full_name":"project-ryoma/ryoma","owner":"project-ryoma","description":"Common AI agent framework solving your data problems","archived":false,"fork":false,"pushed_at":"2025-04-29T07:07:02.000Z","size":5395,"stargazers_count":276,"open_issues_count":7,"forks_count":46,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-04-29T07:27:40.480Z","etag":null,"topics":["ai","data-science","llm"],"latest_commit_sha":null,"homepage":"https://project-ryoma.github.io/ryoma/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/project-ryoma.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-07-07T06:45:07.000Z","updated_at":"2025-04-29T07:25:23.000Z","dependencies_parsed_at":"2024-06-27T02:58:09.051Z","dependency_job_id":"488378ea-f4dc-40e3-846c-2dc0adb3f7a3","html_url":"https://github.com/project-ryoma/ryoma","commit_stats":null,"previous_names":["project-aita/aita","project-ryoma/ryoma"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/project-ryoma%2Fryoma","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/project-ryoma%2Fryoma/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/project-ryoma%2Fryoma/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/project-ryoma%2Fryoma/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/project-ryoma","download_url":"https://codeload.github.com/project-ryoma/ryoma/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252118316,"owners_count":21697583,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","data-science","llm"],"created_at":"2025-05-02T23:01:09.815Z","updated_at":"2025-05-02T23:01:10.944Z","avatar_url":"https://github.com/project-ryoma.png","language":"Python","funding_links":[],"categories":["📊 Data Platforms"],"sub_categories":["🟩 Development Tools 🛠️"],"readme":"# Ryoma\nAI Powered Data Agent framework, a comprehensive solution for data analysis, engineering, and visualization. \n\n\n[![Build status](https://github.com/project-ryoma/ryoma/workflows/build/badge.svg)](https://github.com/project-ryoma/ryoma/actions/workflows/build.yml?query=workflow%3Abuild)\n[![Python Version](https://img.shields.io/pypi/pyversions/ryoma.svg)](https://pypi.org/project/ryoma/)\n[![Dependencies Status](https://img.shields.io/badge/dependencies-up%20to%20date-brightgreen.svg)](https://github.com/project-ryoma/ryoma/pulls?utf8=%E2%9C%93\u0026q=is%3Apr%20author%3Aapp%2Fdependabot)\n\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Security: bandit](https://img.shields.io/badge/security-bandit-green.svg)](https://github.com/PyCQA/bandit)\n[![Pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\u0026logoColor=white)](https://github.com/project-ryoma/ryoma/blob/main/.pre-commit-config.yaml)\n[![License](https://img.shields.io/github/license/project-ryoma/ryoma)](https://github.com/project-ryoma/ryoma/blob/main/LICENSE)\n[![Coverage Report](assets/images/coverage.svg)](https://github.com/project-ryoma/ryoma/blob/main/assets/images/coverage.svg)\n\n\n## Tech Stack\n\nOur platform leverages a combination of cutting-edge technologies and frameworks:\n\n- **[Langchain](https://www.langchain.com/)**: Facilitates the seamless integration of language models into application workflows, significantly enhancing AI interaction capabilities.\n- **[Reflex](https://reflex.dev/)**: An open-source framework for quickly building beautiful, interactive web applications in pure Python\n- **[Apache Arrow](https://arrow.apache.org/)**: A cross-language development platform for in-memory data that specifies a standardized language-independent columnar memory format for flat and hierarchical data, organized for efficient analytic operations on modern hardware like CPUs and GPUs.\n- **[Jupyter Ai Magics](https://github.com/jupyterlab/jupyter-ai)**: A JupyterLab extension that provides a set of magics for working with AI models.\n- **[Amundsen](https://www.amundsen.io/)**: A data discovery and metadata platform that helps users discover, understand, and trust the data they use.\n- **[Ibis](https://ibis-project.org/)**: A Python data analysis framework that provides a pandas-like API for analytics on large datasets.\n- **[Feast](https://feast.dev/)**: An operational feature store for managing and serving machine learning features to models in production.\n\n## Installation\nSimply install the package using pip:\n\n```shell\npip install ryoma_ai\n```\nOr with extra dependencies:\n\n```shell\npip install ryoma_ai[snowflake]\n```\n\n## Basic Example\nBelow is an example of using SqlAgent to connect to a postgres database and ask a question.\nYou can read more details in the [documentation](https://ryoma-1.gitbook.io/ryoma/).\n\n```python\nfrom ryoma_ai.agent.sql import SqlAgent\nfrom ryoma_ai.datasource.postgres import PostgresDataSource\n\n# Connect to a postgres catalog\ndatasource = PostgresDataSource(\"postgresql://user:password@localhost:5432/dbname\")\n\n# Create a SQL agent\nsql_agent = SqlAgent(\"gpt-3.5-turbo\").add_datasource(datasource)\n\n# ask question to the agent\nsql_agent.stream(\"I want to get the top 5 customers which making the most purchases\", display=True)\n```\n\nThe Sql agent will try to run the tool as shown below:\n```text\n================================ Human Message =================================\n\nI want to get the top 5 customers which making the most purchases\n================================== Ai Message ==================================\nTool Calls:\n  sql_database_query (call_mWCPB3GQGOTLYsvp21DGlpOb)\n Call ID: call_mWCPB3GQGOTLYsvp21DGlpOb\n  Args:\n    query: SELECT C.C_NAME, SUM(L.L_EXTENDEDPRICE) AS TOTAL_PURCHASES FROM CUSTOMER C JOIN ORDERS O ON C.C_CUSTKEY = O.O_CUSTKEY JOIN LINEITEM L ON O.O_ORDERKEY = L.L_ORDERKEY GROUP BY C.C_NAME ORDER BY TOTAL_PURCHASES DESC LIMIT 5\n    result_format: pandas\n```\nContinue to run the tool with the following code:\n```python\nsql_agent.stream(tool_mode=ToolMode.ONCE)\n```\nOutput will look like after running the tool:\n```text\n================================== Ai Message ==================================\n\nThe top 5 customers who have made the most purchases are as follows:\n\n1. Customer#000143500 - Total Purchases: $7,154,828.98\n2. Customer#000095257 - Total Purchases: $6,645,071.02\n3. Customer#000087115 - Total Purchases: $6,528,332.52\n4. Customer#000134380 - Total Purchases: $6,405,556.97\n5. Customer#000103834 - Total Purchases: $6,397,480.12\n```\n\n## Use Ryoma Lab\nRyoma lab is an application that allows you to interact with your data and AI models in UI.\nThe ryoma lab is built with [Reflex](https://reflex.dev/).\n\n1. Create Ryoma lab configuration file `rxconfig.py` in your project:\n```python\nimport logging\n\nimport reflex as rx\nfrom reflex.constants import LogLevel\n\nconfig = rx.Config(\n    app_name=\"ryoma_lab\",\n    loglevel=LogLevel.INFO,\n)\n\n# Setup basic configuration for logging\nlogging.basicConfig(level=logging.INFO, format=\"%(asctime)s - %(levelname)s - %(message)s\")\n```\n\n2. You can start the ryoma lab by running the following command:\n```shell\nryoma_lab run\n```\nthe ryoma lab will be available at `http://localhost:3000`.\n![ui.png](assets%2Fui.png)\n\n## Supported Models\nModel provider are supported by jupyter ai magics. Ensure the corresponding environment variables are set before using the Ryoma agent.\n\n| Provider            | Provider ID          | Environment variable(s)    | Python package(s)               |\n|---------------------|----------------------|----------------------------|---------------------------------|\n| AI21                | `ai21`               | `AI21_API_KEY`             | `ai21`                          |\n| Anthropic           | `anthropic`          | `ANTHROPIC_API_KEY`        | `langchain-anthropic`           |\n| Anthropic (playground)    | `anthropic-playground`     | `ANTHROPIC_API_KEY`        | `langchain-anthropic`           |\n| Bedrock             | `bedrock`            | N/A                        | `boto3`                         |\n| Bedrock (playground)      | `bedrock-playground`       | N/A                        | `boto3`                         |\n| Cohere              | `cohere`             | `COHERE_API_KEY`           | `cohere`                        |\n| ERNIE-Bot           | `qianfan`            | `QIANFAN_AK`, `QIANFAN_SK` | `qianfan`                       |\n| Gemini              | `gemini`             | `GOOGLE_API_KEY`           | `langchain-google-genai`        |\n| GPT4All             | `gpt4all`            | N/A                        | `gpt4all`                       |\n| Hugging Face Hub    | `huggingface_hub`    | `HUGGINGFACEHUB_API_TOKEN` | `huggingface_hub`, `ipywidgets`, `pillow` |\n| NVIDIA              | `nvidia-playground`        | `NVIDIA_API_KEY`           | `langchain_nvidia_ai_endpoints` |\n| OpenAI              | `openai`             | `OPENAI_API_KEY`           | `langchain-openai`              |\n| OpenAI (playground)       | `openai-playground`        | `OPENAI_API_KEY`           | `langchain-openai`              |\n| SageMaker           | `sagemaker-endpoint` | N/A                        | `boto3`                         |\n\n## Supported Data Sources\n- [x] Snowflake\n- [x] Sqlite\n- [x] BigQuery\n- [x] Postgres\n- [x] MySQL\n- [x] File (CSV, Excel, Parquet, etc.)\n- [ ] Redshift\n- [ ] DynamoDB\n\n## Supported Engines\n- [x] Apache Spark\n- [x] Apache Flink\n- [ ] Presto\n\n## 🛡 License\n\n[![License](https://img.shields.io/github/license/project-ryoma/ryoma)](https://github.com/project-ryoma/ryoma/blob/main/LICENSE)\n\nThis project is licensed under the terms of the `Apache Software License 2.0` license. See [LICENSE](https://github.com/ryoma/ryoma/blob/master/LICENSE) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproject-ryoma%2Fryoma","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fproject-ryoma%2Fryoma","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproject-ryoma%2Fryoma/lists"}