You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Integration-MCP.md
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
1
!!! pied-piper ":bulb: TL;DR - MCP: Enable Bus Users to use NL to create multi-step execution flows"
2
2
3
-
MCP enables Business Users to use Natural Language to create declarative execution flows across multiple business-rule-enforced API services. For example: *find the overdue orders, and send an email offering a discount*.
3
+
MCP enables Business Users to use Natural Language to create multi-step execution flows across existing business-rule-enforced APIs. For example: *find the overdue orders, and send an email offering a discount*. This is a new request, composed from existing steps (find orders, send email).
4
4
5
5
MCP is an open protocol than enables:
6
6
7
7
1. **MCP Client Executors** to leverage LLMs to translate NL queries into multi-step execution flows called **Tool Context Blocks.**.
8
-
2. The MCP Client Executor executes the Tool Context block steps, making calls on the **MCP Server Executors.**
8
+
2. The MCP Client Executor executes the Tool Context Block steps, making calls on the **MCP Server Executors.**
9
9
10
10
* MCP Server Executors are commonly provided via **logic-enabled JSON:APIs.** (Note the logic is critical in maintaining integrity and security.)
11
11
@@ -63,6 +63,8 @@ Create the **basic_demo** under the [Manager](Manager.md) as described in the Ma
63
63
4. Run `python integration/mcp/mcp_client_executor.py`
64
64
65
65
66
+
The [basic_demo](Sample-Basic-Demo.md){:target="_blank" rel="noopener"} project illustrates basic GenAI-Logic operation: creating projects from new or existing databases, adding logic and security, and customizing your project using your IDE and Python.
67
+
66
68
You will need an environment variable: `APILOGICSERVER_CHATGPT_APIKEY` ChatGPT APIKey (obtain one [like this](WebGenAI-CLI.md/#configuration)).
Copy file name to clipboardExpand all lines: docs/Sample-Basic-Demo.md
+53-15Lines changed: 53 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -8,17 +8,12 @@ See how to build a complete database system -- in minutes instead of weeks or mo
8
8
9
9
1.**An API**, and, we'll add ui and logic to make it a microservice...
10
10
2.**Logic and Security:** multi-table constraints and derivations, role-based security, and application integration
11
-
3.**An Admin App:** and finally, a multi-page, multi-table web app
11
+
3.**An Admin App:** a multi-page, multi-table web app
12
+
4.**Customizable:** use your IDE to customize with declarative rules and standard Python
12
13
13
14
14
15
15
-
We'll use API Logic Server (open source), providing:
16
-
17
-
| Key Feature | What It Means | Why It Matters|
18
-
| :--- |:---|:---|
19
-
|**Automation**| Instant Project Creation:<br>An API and an Admin web app | Unblock UI App Dev<br>Instant Agile Collaboration |
20
-
|**Customization**| Declarative logic and security <br> 5 rules vs. 200 lines of Python | 40X less backend code |
21
-
|**Iteration**| Revise the data model, and <br>Add rules, plus Python | Iterative development <br> Extensiblity with Python |
16
+
We'll use API Logic Server (open source), providing [these key features](https://www.genai-logic.com/product/key-features){:target="_blank" rel="noopener"}.
22
17
23
18
The entire process takes 20 minutes, instead of several weeks using traditional development.
24
19
@@ -32,17 +27,49 @@ You can use this article in several ways:
32
27
33
28
34
29
35
-
## 1. Automation: Instant Project
30
+
## 1. Automation: Project Creation
31
+
32
+
API Logic Server can create projects from existing databases, or use GenAI to create projects with new databases. See the sub-sections below.
> Note: the `db_url` value is [an abbreviation](https://apilogicserver.github.io/Docs/Data-Model-Examples/). You would normally supply a SQLAlchemy URI.
43
+
> Note: the `db_url` value is [an abbreviation](https://apilogicserver.github.io/Docs/Data-Model-Examples/){:target="_blank" rel="noopener"} for a test database provided as part of the installation. You would normally supply a SQLAlchemy URI to your existing database.
44
+
45
+
This creates a project by reading your schema. The database is Customer, Orders, Items and Product, as shown in the Appendix.
46
+
47
+
48
+
49
+
### Create With New Database
50
+
51
+
You can create a project from a prompt using GenAI, either by [WebGenAI](WebGenAI.md), or the the [GenAI CLI](WebGenAI-CLI.md){:target="_blank" rel="noopener"} as shown here.
52
+
53
+
Use the GenAI CLI with or without signup:
54
+
55
+
1. If you have signed up (see *Obtain a OpenAI API Key*, below), this will create and open a project called `genai_demo` from `genai_demo.prompt` (available in left Explorer pane):
56
+
57
+
```bash
58
+
als genai --using=system/genai/examples/genai_demo/genai_demo.prompt --project-name=genai_demo
59
+
```
60
+
61
+
62
+
63
+
2.***Or,*** you can simulate the process (no signup) using:
64
+
65
+
```bash
66
+
67
+
als genai --repaired-response=system/genai/examples/genai_demo/genai_demo.response_example --project-name=genai_demo
68
+
69
+
```
44
70
45
-
This creates a project by reading your schema. The database is Customer, Orders, Items and Product, as shown in the Appendix.
71
+
72
+
### Open in your IDE and Run
46
73
47
74
You can open with VSCode, and run it as follows:
48
75
@@ -73,9 +100,9 @@ The sections below explore the system that has been created (which would be simi
73
100
74
101
75
102
76
-
## 2. Customize in your IDE
103
+
## 2. Declare Logic And Security
77
104
78
-
While API/UI automation is a great start, it's critical to enforce logic and security. Here's how.
105
+
While API/UI automation is a great start, it's critical to enforce logic and security. You do this in your IDE. Here's how.
79
106
80
107
The following `add_customizations` process simulates:
81
108
@@ -332,7 +359,7 @@ This is a "cheat sheet" for experienced ALS users, e.g., to show your colleagues
332
359
# Admin App, API, Project
333
360
als create --project-name=basic_demo --db-url=basic_demo
334
361
335
-
# Logicand Security
362
+
# Logic, Security and MCP example
336
363
# see logic (logic/declare_logic.py, logic/cocktail-napkin.jpg); add an Order and Item
337
364
# see security (security/declare_security.py); compare customers, s1 vs. admin
338
365
als add-cust
@@ -456,4 +483,15 @@ __3. Start the Server and open the App in the Browser__
456
483

457
484
458
485
459
-
We think you'll find Codespaces pretty amazing - check it out!
486
+
We think you'll find Codespaces pretty amazing - check it out!
487
+
488
+
489
+
490
+
## Appendix: Obtain an OpenAI ApiKey
491
+
492
+
To obtain a ChatGPT API Key
493
+
<br>GenAI-Logic uses OpenAI, which requires an Open API Key:
494
+
495
+
1. Obtain one from [here](https://platform.openai.com/account/api-keys) or [here](https://platform.openai.com/api-keys)
0 commit comments