Skip to content

Commit a7a1d04

Browse files
committed
Merge remote-tracking branch 'oss/main' into feature/italian-prompt-language
2 parents 08fcb5b + 48935b5 commit a7a1d04

File tree

207 files changed

+10139
-5442
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

207 files changed

+10139
-5442
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ wren-ai-service/tools/dev/etc/**
3030
.deepeval_telemtry.txt
3131
docker/config.yaml
3232
docker/docker-compose-local.yaml
33+
docker/data
3334

3435
# python
3536
.python-version

README.md

Lines changed: 48 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<source media="(prefers-color-scheme: light)" srcset="./misc/wrenai_logo.png">
66
<img src="./misc/wrenai_logo_white.png" width="300px">
77
</picture>
8-
<h1 align="center">Wren AI</h1>
8+
<h1 align="center">Wren AI - Open-Source GenBI Agent</h1>
99
</a>
1010
</p>
1111

@@ -19,6 +19,9 @@
1919
<a aria-label="License" href="https://github.com/Canner/WrenAI/blob/main/LICENSE">
2020
<img alt="" src="https://img.shields.io/github/license/canner/WrenAI?color=blue&style=for-the-badge">
2121
</a>
22+
<a href="https://docs.getwren.ai">
23+
<img src="https://img.shields.io/badge/docs-online-brightgreen?style=for-the-badge" alt="Docs">
24+
</a>
2225
<a aria-label="Join the community on GitHub" href="https://discord.gg/5DvshJqG8Z">
2326
<img alt="" src="https://img.shields.io/badge/-JOIN%20THE%20COMMUNITY-blue?style=for-the-badge&logo=discord&logoColor=white&labelColor=grey&logoWidth=20">
2427
</a>
@@ -31,68 +34,62 @@
3134
<a href="https://trendshift.io/repositories/9263" target="_blank"><img src="https://trendshift.io/api/badge/repositories/9263" alt="Canner%2FWrenAI | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
3235
</p>
3336

34-
> Open-source GenBI AI Agent that empowers data-driven teams to chat with their data to generate Text-to-SQL, charts, spreadsheets, reports, BI and embedded AI.
37+
> Wren AI is your GenBI Agent, that you can query any database with natural language → get accurate SQL(Text-to-SQL), charts(Text-to-Charts) & AI-generated insights in seconds. ⚡️
3538
3639
<p align="center">
37-
<img src="./misc/wren_workflow.png">
40+
<img src="./misc/workflow.png">
3841
</p>
3942

40-
## 🎯 Our Vision & Mission
43+
## 😍 Demos
4144

42-
At Wren AI, our mission is to revolutionize business intelligence by empowering organizations with seamless access to data through Generative Business Intelligence (GenBI). We aim to break down barriers to data insights with advanced AI-driven solutions, composable data frameworks, and semantic intelligence, enabling every team member to make faster, smarter, and data-driven decisions with confidence.
45+
https://github.com/user-attachments/assets/f9c1cb34-5a95-4580-8890-ec9644da4160
4346

44-
🤩 [Learn more about GenBI](https://getwren.ai/genbi?utm_source=github&utm_medium=content&utm_campaign=readme)
47+
[Watch GenBI Demo](https://github.com/user-attachments/assets/90ad1d35-bb1e-490b-9676-b29863ff090b)
4548

4649
## 🤖 Features
4750

48-
### 1. Talk to Your Data in Any Language
49-
50-
> Wren AI speaks [your language](https://docs.getwren.ai/oss/guide/settings/pj_settings#change-project-language?utm_source=github&utm_medium=content&utm_campaign=readme). Unlock valuable insights by asking your business questions to Wren AI. It goes beyond surface-level data analysis to reveal meaningful information and simplifies obtaining answers by just asking.
51-
52-
### 2. GenBI Insights
53-
54-
> The GenBI feature empowers users with AI-generated summaries that provide key insights alongside SQL queries, simplifying complex data. Instantly convert query results into AI-generated reports, charts, transforming raw data into clear, actionable visuals. With GenBI, you can make faster, smarter decisions with ease.
55-
56-
### 3. Semantic Layer with a Well-Crafted UI/UX
57-
58-
> Wren AI has implemented a [semantic engine architecture](https://www.getwren.ai/post/how-we-design-our-semantic-engine-for-llms-the-backbone-of-the-semantic-layer-for-llm-architecture/?utm_source=github&utm_medium=content&utm_campaign=readme) to provide the LLM context of your business; you can easily establish a semantic layer on top of your data schema that helps LLM learn more about your business context.
51+
| | What you get | Why it matters |
52+
|--------------------|--------------|----------------|
53+
| **Talk to Your Data** | Ask in any language → precise SQL & answers | Slash the SQL learning curve |
54+
| **GenBI Insights** | AI-written summaries, charts & reports | Decision-ready context in one click |
55+
| **Semantic Layer** | MDL models encode schema, metrics, joins | Keeps LLM outputs accurate & governed |
56+
| **Embed via API** | Generate queries & charts inside your apps ([API Docs](https://wrenai.readme.io/reference/cloud-getting-started)) | Build custom agents, SaaS features, chatbots ([Streamlit Live Demo](https://huggingface.co/spaces/getWrenAI/wrenai-cloud-api-demo)) |
5957

60-
### 4. Embedded AI-Powered SQL and Charts with the Wren AI API
61-
62-
> Unlock the full power of Wren AI in your custom AI Agents and applications. Our API lets you generate SQL queries and rich charts from natural language, effortlessly embedding Wren AI’s intelligence into your workflows. Plus, monitor and manage every interaction with our built-in API History for complete transparency and control.
63-
64-
Check out the [full API documentation here](https://wrenai.readme.io/reference/welcome)
65-
66-
## 🤔 Why Wren AI?
67-
68-
We focus on providing an open, secure, and accurate SQL AI Agent for everyone.
69-
70-
### 1. Turnkey Solution
71-
72-
> Wren AI makes it easy to onboard your data. Discover and analyze your data with our user interface. Effortlessly generate results without needing to code.
73-
74-
### 2. End-to-end Solution
75-
76-
> Wren AI helps you go from natural language to insights—automatically generating SQL queries, visual charts, and API responses based on your database schema and context.
58+
🤩 [Learn more about GenBI](https://getwren.ai/genbi?utm_source=github&utm_medium=content&utm_campaign=readme)
7759

78-
### 3. Open-sourced & Free
60+
## 🚀 Getting Started
7961

80-
> Deploy Wren AI anywhere you like on your own data, LLM APIs, and environment.
62+
Using Wren AI is super simple, you can set it up within 3 minutes, and start to interact with your data!
8163

82-
## 🕶 Try it yourself!
64+
- Visit our [Install in your local environment](http://docs.getwren.ai/oss/installation?utm_source=github&utm_medium=content&utm_campaign=readme).
65+
- Visit the [Usage Guides](https://docs.getwren.ai/oss/guide/connect/overview?utm_source=github&utm_medium=content&utm_campaign=readme) to learn more about how to use Wren AI.
66+
- Or just start with [Wren AI Cloud](https://getwren.ai/?utm_source=github&utm_medium=content&utm_campaign=readme) our Managed Cloud Service. ([OSS vs. Commercial Plans](https://docs.getwren.ai/oss/overview/cloud_vs_self_host)).
8367

84-
### GenBI (Generative Business Intelligence)
68+
## 🏗️ Architecture
8569

86-
[Watch GenBI Demo](https://github.com/user-attachments/assets/90ad1d35-bb1e-490b-9676-b29863ff090b)
70+
<p align="center">
71+
<img src="./misc/how_wrenai_works.png">
72+
</p>
8773

88-
### Ask any questions
74+
👉 [Learn more about our Design](https://getwren.ai/post/how-we-design-our-semantic-engine-for-llms-the-backbone-of-the-semantic-layer-for-llm-architecture?utm_source=github&utm_medium=content&utm_campaign=readme)
8975

9076

91-
https://github.com/user-attachments/assets/f9c1cb34-5a95-4580-8890-ec9644da4160
77+
## 🔌 Data Sources
9278

93-
👉 Try with your data on [Wren AI Cloud](https://getwren.ai/?utm_source=github&utm_medium=content&utm_campaign=readme) or [Install in your local environment](https://docs.getwren.ai/oss/installation/?utm_source=github&utm_medium=content&utm_campaign=readme)
79+
If your data source is not listed here, vote for it in our [GitHub discussion thread](https://github.com/Canner/WrenAI/discussions/327). It will be a valuable input for us to decide on the next supported data sources.
80+
- Athena (Trino)
81+
- Redshift
82+
- BigQuery
83+
- DuckDB
84+
- PostgreSQL
85+
- MySQL
86+
- Microsoft SQL Server
87+
- ClickHouse
88+
- Oracle
89+
- Trino
90+
- Snowflake
9491

95-
## Supported LLM Models
92+
## 🤖 LLM Models
9693

9794
Wren AI supports integration with various Large Language Models (LLMs), including but not limited to:
9895
- OpenAI Models
@@ -111,28 +108,23 @@ Check [configuration examples here](https://github.com/Canner/WrenAI/tree/main/w
111108
> [!CAUTION]
112109
> The performance of Wren AI depends significantly on the capabilities of the LLM you choose. We strongly recommend using the most powerful model available for optimal results. Using less capable models may lead to reduced performance, slower response times, or inaccurate outputs.
113110
114-
## ❤️ Knowledge Sharing From Wren AI
115-
116-
Want to get our latest sharing? [Follow our blog!](https://www.getwren.ai/blog/?utm_source=github&utm_medium=content&utm_campaign=readme)
117-
118-
## 🚀 Getting Started
119-
120-
Using Wren AI is super simple, you can set it up within 3 minutes, and start to interact with your data!
121-
122-
- Visit our [Installation Guide of Wren AI](http://docs.getwren.ai/oss/installation?utm_source=github&utm_medium=content&utm_campaign=readme).
123-
- Visit the [Usage Guides](https://docs.getwren.ai/oss/guide/connect/overview?utm_source=github&utm_medium=content&utm_campaign=readme) to learn more about how to use Wren AI.
124-
125111
## 📚 Documentation
126112

127113
Visit [Wren AI documentation](https://docs.getwren.ai/oss/overview/introduction?utm_source=github&utm_medium=content&utm_campaign=readme) to view the full documentation.
128114

115+
## 📪 Keep Posted?
116+
117+
[Subscribe our blog](https://www.getwren.ai/blog/?utm_source=github&utm_medium=content&utm_campaign=readme) and [Follow our LinkedIn](https://www.linkedin.com/company/wrenai)
118+
129119
## 🛠️ Contribution
130120

131-
Want to contribute to Wren AI? Check out our [Contribution Guidelines](https://github.com/Canner/WrenAI/blob/main/CONTRIBUTING.md).
121+
1. Star ⭐ the repo to show support (it really helps).
122+
2. Open an issue for bugs, ideas, or discussions.
123+
3. Read [Contribution Guidelines](https://github.com/Canner/WrenAI/blob/main/CONTRIBUTING.md) for setup & PR guidelines.
132124

133125
## ⭐️ Community
134126

135-
- Welcome to our [Discord server](https://discord.gg/5DvshJqG8Z) to give us feedback!
127+
- Join 1.3k+ developers in our [Discord](https://discord.gg/5DvshJqG8Z) for real-time help and roadmap previews.
136128
- If there are any issues, please visit [GitHub Issues](https://github.com/Canner/WrenAI/issues).
137129
- Explore our [public roadmap](https://wrenai.notion.site/) to stay updated on upcoming features and improvements!
138130

deployment/kustomizations/base/cm.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,21 @@ data:
5555
models:
5656
- alias: default
5757
model: gpt-4.1-nano-2025-04-14
58+
context_window_size: 1000000
5859
kwargs:
5960
max_tokens: 4096
6061
n: 1
6162
seed: 0
6263
temperature: 0
6364
- model: gpt-4.1-mini-2025-04-14
65+
context_window_size: 1000000
6466
kwargs:
6567
max_tokens: 4096
6668
n: 1
6769
seed: 0
6870
temperature: 0
6971
- model: gpt-4.1-2025-04-14
72+
context_window_size: 1000000
7073
kwargs:
7174
max_tokens: 4096
7275
n: 1
@@ -120,12 +123,15 @@ data:
120123
- name: sql_generation
121124
llm: litellm_llm.default
122125
engine: wren_ui
126+
document_store: qdrant
123127
- name: sql_correction
124128
llm: litellm_llm.default
125129
engine: wren_ui
130+
document_store: qdrant
126131
- name: followup_sql_generation
127132
llm: litellm_llm.default
128133
engine: wren_ui
134+
document_store: qdrant
129135
- name: sql_answer
130136
llm: litellm_llm.default
131137
- name: semantics_description
@@ -142,6 +148,7 @@ data:
142148
- name: question_recommendation_sql_generation
143149
llm: litellm_llm.default
144150
engine: wren_ui
151+
document_store: qdrant
145152
- name: intent_classification
146153
llm: litellm_llm.default
147154
embedder: litellm_embedder.default

docker/.env.example

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ OPENAI_API_KEY=
2020

2121
# version
2222
# CHANGE THIS TO THE LATEST VERSION
23-
WREN_PRODUCT_VERSION=0.22.2
24-
WREN_ENGINE_VERSION=0.15.13
25-
WREN_AI_SERVICE_VERSION=0.22.4
26-
IBIS_SERVER_VERSION=0.15.13
27-
WREN_UI_VERSION=0.27.4
23+
WREN_PRODUCT_VERSION=0.26.0
24+
WREN_ENGINE_VERSION=0.18.2
25+
WREN_AI_SERVICE_VERSION=0.25.17
26+
IBIS_SERVER_VERSION=0.18.2
27+
WREN_UI_VERSION=0.30.1
2828
WREN_BOOTSTRAP_VERSION=0.1.5
2929

3030
# user id (uuid v4)
@@ -46,3 +46,7 @@ AI_SERVICE_FORWARD_PORT=5555
4646

4747
# Wren UI
4848
EXPERIMENTAL_ENGINE_RUST_VERSION=false
49+
50+
# Wren Engine
51+
# OPTIONAL: set if you want to use local storage for the Wren Engine
52+
LOCAL_STORAGE=.

docker/config.example.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,21 @@ timeout: 120
44
models:
55
- alias: default
66
model: gpt-4.1-nano-2025-04-14
7+
context_window_size: 1000000
78
kwargs:
89
max_tokens: 4096
910
n: 1
1011
seed: 0
1112
temperature: 0
1213
- model: gpt-4.1-mini-2025-04-14
14+
context_window_size: 1000000
1315
kwargs:
1416
max_tokens: 4096
1517
n: 1
1618
seed: 0
1719
temperature: 0
1820
- model: gpt-4.1-2025-04-14
21+
context_window_size: 1000000
1922
kwargs:
2023
max_tokens: 4096
2124
n: 1
@@ -38,7 +41,7 @@ endpoint: http://wren-ui:3000
3841
---
3942
type: engine
4043
provider: wren_ibis
41-
endpoint: http://wren-ibis:8000
44+
endpoint: http://ibis-server:8000
4245

4346
---
4447
type: document_store
@@ -70,12 +73,15 @@ pipes:
7073
- name: sql_generation
7174
llm: litellm_llm.default
7275
engine: wren_ui
76+
document_store: qdrant
7377
- name: sql_correction
7478
llm: litellm_llm.default
7579
engine: wren_ui
80+
document_store: qdrant
7681
- name: followup_sql_generation
7782
llm: litellm_llm.default
7883
engine: wren_ui
84+
document_store: qdrant
7985
- name: sql_answer
8086
llm: litellm_llm.default
8187
- name: semantics_description
@@ -92,6 +98,7 @@ pipes:
9298
- name: question_recommendation_sql_generation
9399
llm: litellm_llm.default
94100
engine: wren_ui
101+
document_store: qdrant
95102
- name: intent_classification
96103
llm: litellm_llm.default
97104
embedder: litellm_embedder.default

docker/docker-compose-dev.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,12 @@ services:
4444
# sometimes the console won't show print messages,
4545
# using PYTHONUNBUFFERED: 1 can fix this
4646
PYTHONUNBUFFERED: 1
47-
CONFIG_PATH: /app/data/config.yaml
47+
CONFIG_PATH: /app/config.yaml
4848
env_file:
4949
- ${PROJECT_DIR}/.env
5050
volumes:
51-
- ${PROJECT_DIR}/config.yaml:/app/data/config.yaml
51+
- ${PROJECT_DIR}/config.yaml:/app/config.yaml:ro
52+
- ${PROJECT_DIR}/data:/app/data:ro
5253
networks:
5354
- wren
5455
depends_on:

docker/docker-compose.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ services:
4141
- ${IBIS_SERVER_PORT}
4242
environment:
4343
WREN_ENGINE_ENDPOINT: http://wren-engine:${WREN_ENGINE_PORT}
44+
volumes:
45+
- ${LOCAL_STORAGE:-.}:/usr/src/app/data
4446
networks:
4547
- wren
4648

@@ -56,11 +58,12 @@ services:
5658
# sometimes the console won't show print messages,
5759
# using PYTHONUNBUFFERED: 1 can fix this
5860
PYTHONUNBUFFERED: 1
59-
CONFIG_PATH: /app/data/config.yaml
61+
CONFIG_PATH: /app/config.yaml
6062
env_file:
6163
- ${PROJECT_DIR}/.env
6264
volumes:
63-
- ${PROJECT_DIR}/config.yaml:/app/data/config.yaml
65+
- ${PROJECT_DIR}/config.yaml:/app/config.yaml:ro
66+
- ${PROJECT_DIR}/data:/app/data:ro
6467
networks:
6568
- wren
6669
depends_on:

misc/workflow.png

471 KB
Loading

misc/wren_workflow.png

-390 KB
Binary file not shown.

wren-ai-service/Justfile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,5 @@ force_update_config:
6565
run-sql mdl_path="" data_source="" sample_dataset="":
6666
poetry run python tools/run_sql.py --mdl-path "{{mdl_path}}" --data-source "{{data_source}}" --sample-dataset "{{sample_dataset}}"
6767

68-
report-gen:
69-
poetry run python -m eval.llm_trace_analysis.report_gen
70-
71-
chart-eval:
72-
poetry run streamlit run eval/llm_trace_analysis/chart_eval_app.py
73-
7468
mdl-to-str mdl_path="":
7569
poetry run python tools/mdl_to_str.py -p {{mdl_path}}

0 commit comments

Comments
 (0)