Skip to content

Commit cebfe1a

Browse files
committed
unified demo readme
1 parent 5642369 commit cebfe1a

File tree

4 files changed

+58
-19
lines changed

4 files changed

+58
-19
lines changed

docs/Integration-MCP.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
!!! pied-piper ":bulb: TL;DR - MCP: Enable Bus Users to use NL to create multi-step execution flows"
22

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).
44

55
MCP is an open protocol than enables:
66

77
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.**
99

1010
* MCP Server Executors are commonly provided via **logic-enabled JSON:APIs.** (Note the logic is critical in maintaining integrity and security.)
1111

@@ -63,6 +63,8 @@ Create the **basic_demo** under the [Manager](Manager.md) as described in the Ma
6363
4. Run `python integration/mcp/mcp_client_executor.py`
6464

6565

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+
6668
You will need an environment variable: `APILOGICSERVER_CHATGPT_APIKEY` ChatGPT APIKey (obtain one [like this](WebGenAI-CLI.md/#configuration)).
6769

6870
 

docs/Sample-Basic-Demo.md

Lines changed: 53 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,12 @@ See how to build a complete database system -- in minutes instead of weeks or mo
88

99
1. **An API**, and, we'll add ui and logic to make it a microservice...
1010
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
1213

1314
 
1415

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"}.
2217

2318
The entire process takes 20 minutes, instead of several weeks using traditional development.
2419

@@ -32,17 +27,49 @@ You can use this article in several ways:
3227

3328
&nbsp;
3429

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.
33+
34+
&nbsp;
35+
### Create From Existing Database
3636

3737
This project was created with a command like:
3838

3939
```bash
4040
$ ApiLogicServer create --project_name=basic_demo --db_url=basic_demo
4141
```
4242

43-
> 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+
&nbsp;
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+
```
4470

45-
This creates a project by reading your schema. The database is Customer, Orders, Items and Product, as shown in the Appendix.
71+
&nbsp;
72+
### Open in your IDE and Run
4673

4774
You can open with VSCode, and run it as follows:
4875

@@ -73,9 +100,9 @@ The sections below explore the system that has been created (which would be simi
73100

74101
&nbsp;
75102

76-
## 2. Customize in your IDE
103+
## 2. Declare Logic And Security
77104

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.
79106

80107
The following `add_customizations` process simulates:
81108

@@ -332,7 +359,7 @@ This is a "cheat sheet" for experienced ALS users, e.g., to show your colleagues
332359
# Admin App, API, Project
333360
als create --project-name=basic_demo --db-url=basic_demo
334361

335-
# Logic and Security
362+
# Logic, Security and MCP example
336363
# see logic (logic/declare_logic.py, logic/cocktail-napkin.jpg); add an Order and Item
337364
# see security (security/declare_security.py); compare customers, s1 vs. admin
338365
als add-cust
@@ -456,4 +483,15 @@ __3. Start the Server and open the App in the Browser__
456483
![API Logic Server Intro](images/git-codespaces/start-codespaces.png)
457484

458485

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+
&nbsp;
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)
496+
497+
2. Authorize payments [here](https://platform.openai.com/settings/organization/billing/overview)

docs/Sample-Basic_Demo.md

Whitespace-only changes.

mkdocs.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,14 @@ nav:
2525
- Execute From Terminal: Execute.md
2626
- Express Eval: Install-Eval.md
2727
- Demos, Tutorial, Samples:
28+
- "Basic Self-Demo": Sample-Basic-Demo.md
2829
- "GenAI Microservice Automation": Sample-Genai.md
2930
- "Tutorial": Tutorial.md
3031
- "AI - Copilot": Sample-AI.md
3132
- "Sample DB, Project": Sample-Database.md
3233
- "Sample Integration": Sample-Integration.md
33-
- "Sample DB, Project": Sample-Database.md
3434
- "Deployment Tutorial": Tutorial-Deployment.md
3535
- "Agile Tutorial": Tutorial-Agile.md
36-
- "Basic Self-Demo": Sample-Basic-Demo.md
3736
- "AI - ChatGPT, Agile": Tutorial-AI.md
3837
- "Sample Systems": Data-Model-Examples.md
3938
- GenAI:

0 commit comments

Comments
 (0)