aigenos-flow 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of aigenos-flow might be problematic. Click here for more details.
- aigenos_flow-0.3.0/.env.example +37 -0
- aigenos_flow-0.3.0/.gitignore +94 -0
- aigenos_flow-0.3.0/LICENSE +202 -0
- aigenos_flow-0.3.0/PKG-INFO +137 -0
- aigenos_flow-0.3.0/README.md +82 -0
- aigenos_flow-0.3.0/aigenos_flow/__init__.py +140 -0
- aigenos_flow-0.3.0/aigenos_flow/_slack_helper.py +96 -0
- aigenos_flow-0.3.0/aigenos_flow/agent.py +177 -0
- aigenos_flow-0.3.0/aigenos_flow/agui/__init__.py +0 -0
- aigenos_flow-0.3.0/aigenos_flow/agui/events.py +135 -0
- aigenos_flow-0.3.0/aigenos_flow/agui/protocols/__init__.py +30 -0
- aigenos_flow-0.3.0/aigenos_flow/agui/protocols/a2ui.py +89 -0
- aigenos_flow-0.3.0/aigenos_flow/agui/protocols/mcp_ui.py +111 -0
- aigenos_flow-0.3.0/aigenos_flow/agui/stream.py +17 -0
- aigenos_flow-0.3.0/aigenos_flow/ai/__init__.py +0 -0
- aigenos_flow-0.3.0/aigenos_flow/ai/generator.py +99 -0
- aigenos_flow-0.3.0/aigenos_flow/ai/prompts.py +133 -0
- aigenos_flow-0.3.0/aigenos_flow/ai/providers/__init__.py +0 -0
- aigenos_flow-0.3.0/aigenos_flow/ai/providers/anthropic_provider.py +50 -0
- aigenos_flow-0.3.0/aigenos_flow/ai/providers/ollama_provider.py +75 -0
- aigenos_flow-0.3.0/aigenos_flow/autowidget.py +232 -0
- aigenos_flow-0.3.0/aigenos_flow/connectors/__init__.py +30 -0
- aigenos_flow-0.3.0/aigenos_flow/connectors/api.py +322 -0
- aigenos_flow-0.3.0/aigenos_flow/connectors/manager.py +474 -0
- aigenos_flow-0.3.0/aigenos_flow/connectors/models.py +111 -0
- aigenos_flow-0.3.0/aigenos_flow/connectors/mongodb.py +296 -0
- aigenos_flow-0.3.0/aigenos_flow/connectors/postgresql.py +246 -0
- aigenos_flow-0.3.0/aigenos_flow/connectors/secrets.py +82 -0
- aigenos_flow-0.3.0/aigenos_flow/connectors/serialization.py +45 -0
- aigenos_flow-0.3.0/aigenos_flow/connectors/store.py +407 -0
- aigenos_flow-0.3.0/aigenos_flow/context.py +347 -0
- aigenos_flow-0.3.0/aigenos_flow/data/widgets/duration_picker.json +88 -0
- aigenos_flow-0.3.0/aigenos_flow/data/widgets/order_id_input.json +39 -0
- aigenos_flow-0.3.0/aigenos_flow/data/widgets/order_summary.json +41 -0
- aigenos_flow-0.3.0/aigenos_flow/data/widgets/refund_confirm.json +48 -0
- aigenos_flow-0.3.0/aigenos_flow/data/widgets/subscription_details.json +157 -0
- aigenos_flow-0.3.0/aigenos_flow/data/widgets/subscription_grid.json +68 -0
- aigenos_flow-0.3.0/aigenos_flow/data/workflows/refund_flow.yaml +63 -0
- aigenos_flow-0.3.0/aigenos_flow/data/workflows/workflow2.yaml +37 -0
- aigenos_flow-0.3.0/aigenos_flow/declarative.py +628 -0
- aigenos_flow-0.3.0/aigenos_flow/decorators.py +98 -0
- aigenos_flow-0.3.0/aigenos_flow/engine/__init__.py +0 -0
- aigenos_flow-0.3.0/aigenos_flow/engine/bindings.py +34 -0
- aigenos_flow-0.3.0/aigenos_flow/engine/loader.py +90 -0
- aigenos_flow-0.3.0/aigenos_flow/engine/runtime.py +190 -0
- aigenos_flow-0.3.0/aigenos_flow/engine/safe_eval.py +182 -0
- aigenos_flow-0.3.0/aigenos_flow/fields.py +155 -0
- aigenos_flow-0.3.0/aigenos_flow/guarantees.py +205 -0
- aigenos_flow-0.3.0/aigenos_flow/host.py +91 -0
- aigenos_flow-0.3.0/aigenos_flow/hosts/__init__.py +9 -0
- aigenos_flow-0.3.0/aigenos_flow/hosts/langgraph_host.py +459 -0
- aigenos_flow-0.3.0/aigenos_flow/hosts/test_host.py +233 -0
- aigenos_flow-0.3.0/aigenos_flow/integration.py +486 -0
- aigenos_flow-0.3.0/aigenos_flow/integrations/__init__.py +0 -0
- aigenos_flow-0.3.0/aigenos_flow/integrations/databases.py +332 -0
- aigenos_flow-0.3.0/aigenos_flow/integrations/flow.py +1379 -0
- aigenos_flow-0.3.0/aigenos_flow/integrations/langgraph.py +194 -0
- aigenos_flow-0.3.0/aigenos_flow/interpret.py +915 -0
- aigenos_flow-0.3.0/aigenos_flow/main.py +288 -0
- aigenos_flow-0.3.0/aigenos_flow/outline.py +187 -0
- aigenos_flow-0.3.0/aigenos_flow/runtime.py +791 -0
- aigenos_flow-0.3.0/aigenos_flow/scenarios.py +216 -0
- aigenos_flow-0.3.0/aigenos_flow/schemas/__init__.py +0 -0
- aigenos_flow-0.3.0/aigenos_flow/schemas/widget_spec.py +29 -0
- aigenos_flow-0.3.0/aigenos_flow/schemas/workflow.py +37 -0
- aigenos_flow-0.3.0/aigenos_flow/skill_generator.py +727 -0
- aigenos_flow-0.3.0/aigenos_flow/skills.py +1027 -0
- aigenos_flow-0.3.0/aigenos_flow/store.py +197 -0
- aigenos_flow-0.3.0/aigenos_flow/testing.py +143 -0
- aigenos_flow-0.3.0/aigenos_flow/trace.py +84 -0
- aigenos_flow-0.3.0/pyproject.toml +89 -0
- aigenos_flow-0.3.0/tests/__init__.py +0 -0
- aigenos_flow-0.3.0/tests/flow/__init__.py +0 -0
- aigenos_flow-0.3.0/tests/flow/conftest.py +41 -0
- aigenos_flow-0.3.0/tests/flow/test_correction.py +91 -0
- aigenos_flow-0.3.0/tests/flow/test_digression.py +253 -0
- aigenos_flow-0.3.0/tests/flow/test_executor.py +116 -0
- aigenos_flow-0.3.0/tests/flow/test_extract_json.py +73 -0
- aigenos_flow-0.3.0/tests/flow/test_fields.py +110 -0
- aigenos_flow-0.3.0/tests/flow/test_langgraph_compile.py +34 -0
- aigenos_flow-0.3.0/tests/flow/test_modes.py +128 -0
- aigenos_flow-0.3.0/tests/flow/test_must_elicit.py +180 -0
- aigenos_flow-0.3.0/tests/flow/test_new_features.py +122 -0
- aigenos_flow-0.3.0/tests/flow/test_skill_generator.py +87 -0
- aigenos_flow-0.3.0/tests/flow/test_skill_loader.py +89 -0
- aigenos_flow-0.3.0/tests/flow/test_startflow.py +181 -0
- aigenos_flow-0.3.0/tests/flow/test_widget_submission_bypass.py +85 -0
- aigenos_flow-0.3.0/tests/flow/test_widget_submission_graph.py +113 -0
- aigenos_flow-0.3.0/tests/flow/test_workflow_field.py +236 -0
- aigenos_flow-0.3.0/tests/test_bindings.py +35 -0
- aigenos_flow-0.3.0/tests/test_bundled_data.py +59 -0
- aigenos_flow-0.3.0/tests/test_connectors.py +240 -0
- aigenos_flow-0.3.0/tests/test_database_tools.py +247 -0
- aigenos_flow-0.3.0/tests/test_declarative_skill.py +325 -0
- aigenos_flow-0.3.0/tests/test_easy_steps.py +339 -0
- aigenos_flow-0.3.0/tests/test_guidelines.py +133 -0
- aigenos_flow-0.3.0/tests/test_outline.py +86 -0
- aigenos_flow-0.3.0/tests/test_protocols.py +84 -0
- aigenos_flow-0.3.0/tests/test_runtime.py +59 -0
- aigenos_flow-0.3.0/tests/test_safe_eval.py +92 -0
- aigenos_flow-0.3.0/tests/test_safe_eval_strict.py +81 -0
- aigenos_flow-0.3.0/tests/test_skill_generator_collision.py +55 -0
- aigenos_flow-0.3.0/tests/test_store.py +51 -0
- aigenos_flow-0.3.0/tests/test_trace_scenarios_guarantees.py +295 -0
- aigenos_flow-0.3.0/tests/test_widget_linkage.py +160 -0
- aigenos_flow-0.3.0/tests/test_widget_loader.py +63 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Copy to .env and adjust as needed. uvicorn does NOT auto-load this file;
|
|
2
|
+
# the values here are documentation for future config wiring.
|
|
3
|
+
|
|
4
|
+
# HTTP server
|
|
5
|
+
PORT=8000
|
|
6
|
+
|
|
7
|
+
# CORS: comma-separated list of allowed origins ("*" allows all — dev only)
|
|
8
|
+
CORS_ORIGINS=*
|
|
9
|
+
|
|
10
|
+
# Widget/workflow data directory. Defaults to the bundled catalog shipped
|
|
11
|
+
# inside the installed package (aigenos_flow/data). Set this to a writable,
|
|
12
|
+
# persistent path if you use the runtime widget/skill-creation APIs.
|
|
13
|
+
# FG_DATA_DIR=/var/lib/aigenos-flow/data
|
|
14
|
+
|
|
15
|
+
# --- AI generation ---
|
|
16
|
+
# Pick ONE of the two providers below (or set both — the explicit selector wins).
|
|
17
|
+
# Auto-detect order if STUDIO_AI_PROVIDER is unset:
|
|
18
|
+
# 1. Anthropic, if ANTHROPIC_API_KEY is present
|
|
19
|
+
# 2. Ollama, if reachable at OLLAMA_HOST
|
|
20
|
+
|
|
21
|
+
# STUDIO_AI_PROVIDER=anthropic # or "ollama" to force one
|
|
22
|
+
|
|
23
|
+
# Anthropic
|
|
24
|
+
ANTHROPIC_API_KEY=sk-ant-...
|
|
25
|
+
# STUDIO_ANTHROPIC_MODEL=claude-opus-4-7
|
|
26
|
+
|
|
27
|
+
# OpenAI or OpenAI Compatible (SambaNova, Together, Groq, etc)
|
|
28
|
+
# OPENAI_API_KEY=sk-...
|
|
29
|
+
# OPENAI_BASE_URL=https://api.openai.com/v1
|
|
30
|
+
|
|
31
|
+
# Gemini
|
|
32
|
+
# GEMINI_API_KEY=your_gemini_api_key_here
|
|
33
|
+
|
|
34
|
+
# Ollama (local LLM, no API key needed)
|
|
35
|
+
OLLAMA_HOST=http://localhost:11434
|
|
36
|
+
OLLAMA_MODEL=llama3.2
|
|
37
|
+
# Other good options if installed: llama3.1, codellama
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
dist/
|
|
6
|
+
build/
|
|
7
|
+
*.egg
|
|
8
|
+
.eggs/
|
|
9
|
+
.venv/
|
|
10
|
+
venv/
|
|
11
|
+
env/
|
|
12
|
+
.pytest_cache/
|
|
13
|
+
.mypy_cache/
|
|
14
|
+
.ruff_cache/
|
|
15
|
+
|
|
16
|
+
# Node
|
|
17
|
+
node_modules/
|
|
18
|
+
frontend/dist/
|
|
19
|
+
*.tsbuildinfo
|
|
20
|
+
|
|
21
|
+
# Demo recording intermediates — 100MB+ of regeneratable frames; never publish
|
|
22
|
+
demo/shots/
|
|
23
|
+
|
|
24
|
+
# Marketing-video production scripts (ffmpeg + Playwright, our machines only)
|
|
25
|
+
# and their 100MB+ intermediates. The runnable *proofs* live in examples/.
|
|
26
|
+
demo/
|
|
27
|
+
|
|
28
|
+
# IDE
|
|
29
|
+
.idea/
|
|
30
|
+
.vscode/
|
|
31
|
+
*.swp
|
|
32
|
+
*.swo
|
|
33
|
+
|
|
34
|
+
# OS
|
|
35
|
+
.DS_Store
|
|
36
|
+
Thumbs.db
|
|
37
|
+
|
|
38
|
+
# Environment
|
|
39
|
+
.env
|
|
40
|
+
.env.local
|
|
41
|
+
|
|
42
|
+
# Runs / benchmarks / logs
|
|
43
|
+
runs.json
|
|
44
|
+
*.log
|
|
45
|
+
examples/book_room/bench_runs.json
|
|
46
|
+
|
|
47
|
+
# Studio workspace database (SQLite — local revision history, never shared)
|
|
48
|
+
studio.db
|
|
49
|
+
studio.db-wal
|
|
50
|
+
studio.db-shm
|
|
51
|
+
|
|
52
|
+
# Managed-connector store (SQLite — created on server start, holds credential
|
|
53
|
+
# references; never shared)
|
|
54
|
+
data/connectors.sqlite3
|
|
55
|
+
data/connectors.sqlite3-wal
|
|
56
|
+
data/connectors.sqlite3-shm
|
|
57
|
+
|
|
58
|
+
# Local scratch / debug artifacts (not for publish)
|
|
59
|
+
examples/book_room/_debug_*.json
|
|
60
|
+
examples/book_room/_probe_*.py
|
|
61
|
+
examples/book_room/_skills_backup_demo/
|
|
62
|
+
|
|
63
|
+
# Claude
|
|
64
|
+
.claude/
|
|
65
|
+
|
|
66
|
+
# User-generated skills from the skill-creator meta-demo.
|
|
67
|
+
# The two shipped reference skills (book-meeting-room, list-rooms) live
|
|
68
|
+
# under examples/book_room/skills/; everything else generated at runtime
|
|
69
|
+
# is the user's local work and should not be committed.
|
|
70
|
+
examples/book_room/skills/*
|
|
71
|
+
!examples/book_room/skills/book-meeting-room/
|
|
72
|
+
!examples/book_room/skills/list-rooms/
|
|
73
|
+
!examples/book_room/skills/subscription-insights/
|
|
74
|
+
!examples/book_room/skills/.gitkeep
|
|
75
|
+
|
|
76
|
+
# Live local databases — written by the running backend, never source.
|
|
77
|
+
backend/data/connectors.sqlite3*
|
|
78
|
+
|
|
79
|
+
# The aigenos.io marketing site: page sources, brand originals, deploy tooling
|
|
80
|
+
# and ~14MB of media already carried in docs/media/. It is our website, not part
|
|
81
|
+
# of the project — keep it in its own (private) repo.
|
|
82
|
+
site/
|
|
83
|
+
aigenos-site.zip
|
|
84
|
+
aigenos-site/
|
|
85
|
+
|
|
86
|
+
# Scratch skills folder. The canonical demo skills live in
|
|
87
|
+
# examples/book_room/skills (what the server and docker-compose actually load);
|
|
88
|
+
# this one is local working space for Studio-generated skills.
|
|
89
|
+
/skills/
|
|
90
|
+
|
|
91
|
+
# Internal material — launch drafts and vision mockups live on disk, not in
|
|
92
|
+
# the public repo.
|
|
93
|
+
docs/launch/
|
|
94
|
+
docs/internal/
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: aigenos-flow
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Deterministic conversational flows for LangGraph agents — with an optional drop-in widget layer (AG-UI/A2UI/MCP-UI).
|
|
5
|
+
Project-URL: Homepage, https://aigenos.io
|
|
6
|
+
Project-URL: Repository, https://github.com/aigenos/flow
|
|
7
|
+
Project-URL: Issues, https://github.com/aigenos/flow/issues
|
|
8
|
+
Project-URL: Documentation, https://aigenos.io
|
|
9
|
+
Author: aigenos
|
|
10
|
+
License: Apache-2.0
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: a2ui,agui,ai-agents,chatbot,conversational-ai,deterministic,dialogue,langgraph,mcp-ui,react,skills,widgets
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
20
|
+
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
|
21
|
+
Requires-Python: >=3.11
|
|
22
|
+
Requires-Dist: langchain-core>=0.3
|
|
23
|
+
Requires-Dist: langgraph>=0.2.50
|
|
24
|
+
Requires-Dist: pydantic>=2.7
|
|
25
|
+
Requires-Dist: pyyaml>=6.0
|
|
26
|
+
Provides-Extra: anthropic
|
|
27
|
+
Requires-Dist: langchain-anthropic>=0.3; extra == 'anthropic'
|
|
28
|
+
Provides-Extra: connectors
|
|
29
|
+
Requires-Dist: cryptography>=43; extra == 'connectors'
|
|
30
|
+
Requires-Dist: psycopg[binary,pool]>=3.2; extra == 'connectors'
|
|
31
|
+
Requires-Dist: pymongo[srv]>=4.10; extra == 'connectors'
|
|
32
|
+
Requires-Dist: sqlparse>=0.5; extra == 'connectors'
|
|
33
|
+
Provides-Extra: dev
|
|
34
|
+
Requires-Dist: httpx>=0.27; extra == 'dev'
|
|
35
|
+
Requires-Dist: mypy>=1.10; extra == 'dev'
|
|
36
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
|
|
37
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
38
|
+
Requires-Dist: ruff>=0.7; extra == 'dev'
|
|
39
|
+
Provides-Extra: gemini
|
|
40
|
+
Requires-Dist: langchain-google-genai>=2.0; extra == 'gemini'
|
|
41
|
+
Provides-Extra: mongodb
|
|
42
|
+
Requires-Dist: pymongo>=4.6; extra == 'mongodb'
|
|
43
|
+
Provides-Extra: ollama
|
|
44
|
+
Requires-Dist: langchain-ollama>=0.2; extra == 'ollama'
|
|
45
|
+
Provides-Extra: openai
|
|
46
|
+
Requires-Dist: langchain-openai>=0.3; extra == 'openai'
|
|
47
|
+
Provides-Extra: redis
|
|
48
|
+
Requires-Dist: redis>=5.0; extra == 'redis'
|
|
49
|
+
Provides-Extra: server
|
|
50
|
+
Requires-Dist: anthropic>=0.92; extra == 'server'
|
|
51
|
+
Requires-Dist: fastapi>=0.115; extra == 'server'
|
|
52
|
+
Requires-Dist: sse-starlette>=2.1; extra == 'server'
|
|
53
|
+
Requires-Dist: uvicorn[standard]>=0.32; extra == 'server'
|
|
54
|
+
Description-Content-Type: text/markdown
|
|
55
|
+
|
|
56
|
+
# aigenos-flow
|
|
57
|
+
|
|
58
|
+
> **Drop-in widget layer for AI chatbots.**
|
|
59
|
+
>
|
|
60
|
+
> Your agent serves a form → user fills → agent serves another form → final
|
|
61
|
+
> answer renders as a card or chart. Drop into your existing FastAPI +
|
|
62
|
+
> React stack in ~30 lines.
|
|
63
|
+
|
|
64
|
+
## Install
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
pip install aigenos-flow
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Quick start — LangGraph integration
|
|
71
|
+
|
|
72
|
+
```python
|
|
73
|
+
from langgraph.prebuilt import create_react_agent
|
|
74
|
+
from langgraph.checkpoint.memory import MemorySaver
|
|
75
|
+
from aigenos_flow.integrations.langgraph import (
|
|
76
|
+
render_widget,
|
|
77
|
+
widget_catalog_prompt,
|
|
78
|
+
make_chatform_router,
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
agent = create_react_agent(
|
|
82
|
+
model="claude-opus-4-7",
|
|
83
|
+
tools=[render_widget, *your_existing_tools],
|
|
84
|
+
prompt=f"{your_system_prompt}\n\n{widget_catalog_prompt()}",
|
|
85
|
+
checkpointer=MemorySaver(),
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
app.include_router(make_chatform_router(agent), prefix="/chat")
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
You now have:
|
|
92
|
+
|
|
93
|
+
- `POST /chat` — start or continue a conversation
|
|
94
|
+
- `POST /chat/{thread_id}/resume` — submit a widget payload
|
|
95
|
+
- `GET /chat?protocol=ag-ui|a2ui|mcp-ui` — pick the wire format
|
|
96
|
+
|
|
97
|
+
## Quick start — Aigenos flow integration
|
|
98
|
+
|
|
99
|
+
Pair with the `aigenos-flow` package for deterministic multi-step flows
|
|
100
|
+
with auto-generated widget forms:
|
|
101
|
+
|
|
102
|
+
```python
|
|
103
|
+
from aigenos_flow.integrations.flow import make_flow_router
|
|
104
|
+
|
|
105
|
+
app.include_router(
|
|
106
|
+
make_flow_router(skills_dir="skills/"),
|
|
107
|
+
prefix="/chat",
|
|
108
|
+
)
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Each `FieldSpec` in your skills auto-generates a widget input:
|
|
112
|
+
|
|
113
|
+
| FieldSpec | Widget primitive |
|
|
114
|
+
|---|---|
|
|
115
|
+
| `type: enum, values: [a, b, c]` | `<select>` |
|
|
116
|
+
| `type: string` (name contains "date") | `<input type="date">` |
|
|
117
|
+
| `type: integer, min: 15, max: 480` | `<input type="number" min=15 max=480>` |
|
|
118
|
+
| `type: boolean` | `<select>` with Yes/No |
|
|
119
|
+
|
|
120
|
+
## Widget primitives
|
|
121
|
+
|
|
122
|
+
`card`, `text`, `row`, `column`, `divider`, `alert`, `badge`, `button`,
|
|
123
|
+
`input`, `select`, `form`, `image`, `loading`
|
|
124
|
+
|
|
125
|
+
## Multi-protocol
|
|
126
|
+
|
|
127
|
+
Same backend, three wire formats — select via `?protocol=`:
|
|
128
|
+
|
|
129
|
+
| Protocol | Spec source |
|
|
130
|
+
|---|---|
|
|
131
|
+
| AG-UI (default) | [CopilotKit AG-UI](https://docs.copilotkit.ai/) |
|
|
132
|
+
| A2UI | [google/a2ui](https://github.com/google/a2ui) |
|
|
133
|
+
| MCP-UI | [mcp-ui](https://github.com/idosal/mcp-ui) |
|
|
134
|
+
|
|
135
|
+
## License
|
|
136
|
+
|
|
137
|
+
MIT
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# aigenos-flow
|
|
2
|
+
|
|
3
|
+
> **Drop-in widget layer for AI chatbots.**
|
|
4
|
+
>
|
|
5
|
+
> Your agent serves a form → user fills → agent serves another form → final
|
|
6
|
+
> answer renders as a card or chart. Drop into your existing FastAPI +
|
|
7
|
+
> React stack in ~30 lines.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pip install aigenos-flow
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Quick start — LangGraph integration
|
|
16
|
+
|
|
17
|
+
```python
|
|
18
|
+
from langgraph.prebuilt import create_react_agent
|
|
19
|
+
from langgraph.checkpoint.memory import MemorySaver
|
|
20
|
+
from aigenos_flow.integrations.langgraph import (
|
|
21
|
+
render_widget,
|
|
22
|
+
widget_catalog_prompt,
|
|
23
|
+
make_chatform_router,
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
agent = create_react_agent(
|
|
27
|
+
model="claude-opus-4-7",
|
|
28
|
+
tools=[render_widget, *your_existing_tools],
|
|
29
|
+
prompt=f"{your_system_prompt}\n\n{widget_catalog_prompt()}",
|
|
30
|
+
checkpointer=MemorySaver(),
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
app.include_router(make_chatform_router(agent), prefix="/chat")
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
You now have:
|
|
37
|
+
|
|
38
|
+
- `POST /chat` — start or continue a conversation
|
|
39
|
+
- `POST /chat/{thread_id}/resume` — submit a widget payload
|
|
40
|
+
- `GET /chat?protocol=ag-ui|a2ui|mcp-ui` — pick the wire format
|
|
41
|
+
|
|
42
|
+
## Quick start — Aigenos flow integration
|
|
43
|
+
|
|
44
|
+
Pair with the `aigenos-flow` package for deterministic multi-step flows
|
|
45
|
+
with auto-generated widget forms:
|
|
46
|
+
|
|
47
|
+
```python
|
|
48
|
+
from aigenos_flow.integrations.flow import make_flow_router
|
|
49
|
+
|
|
50
|
+
app.include_router(
|
|
51
|
+
make_flow_router(skills_dir="skills/"),
|
|
52
|
+
prefix="/chat",
|
|
53
|
+
)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Each `FieldSpec` in your skills auto-generates a widget input:
|
|
57
|
+
|
|
58
|
+
| FieldSpec | Widget primitive |
|
|
59
|
+
|---|---|
|
|
60
|
+
| `type: enum, values: [a, b, c]` | `<select>` |
|
|
61
|
+
| `type: string` (name contains "date") | `<input type="date">` |
|
|
62
|
+
| `type: integer, min: 15, max: 480` | `<input type="number" min=15 max=480>` |
|
|
63
|
+
| `type: boolean` | `<select>` with Yes/No |
|
|
64
|
+
|
|
65
|
+
## Widget primitives
|
|
66
|
+
|
|
67
|
+
`card`, `text`, `row`, `column`, `divider`, `alert`, `badge`, `button`,
|
|
68
|
+
`input`, `select`, `form`, `image`, `loading`
|
|
69
|
+
|
|
70
|
+
## Multi-protocol
|
|
71
|
+
|
|
72
|
+
Same backend, three wire formats — select via `?protocol=`:
|
|
73
|
+
|
|
74
|
+
| Protocol | Spec source |
|
|
75
|
+
|---|---|
|
|
76
|
+
| AG-UI (default) | [CopilotKit AG-UI](https://docs.copilotkit.ai/) |
|
|
77
|
+
| A2UI | [google/a2ui](https://github.com/google/a2ui) |
|
|
78
|
+
| MCP-UI | [mcp-ui](https://github.com/idosal/mcp-ui) |
|
|
79
|
+
|
|
80
|
+
## License
|
|
81
|
+
|
|
82
|
+
MIT
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"""aigenos-flow — deterministic conversational flows + a drop-in widget layer.
|
|
2
|
+
|
|
3
|
+
One package. The deterministic flow engine lives right here at the package
|
|
4
|
+
root; the FastAPI widget server (``aigenos_flow.main`` / ``aigenos_flow.agui``
|
|
5
|
+
/ ``aigenos_flow.integrations``) ships under the ``[server]`` extra.
|
|
6
|
+
|
|
7
|
+
Quickstart:
|
|
8
|
+
|
|
9
|
+
from aigenos_flow import FlowAgent, flow, action
|
|
10
|
+
|
|
11
|
+
# skills/file_expense/SKILL.md + handlers.py defines the flow
|
|
12
|
+
agent = FlowAgent.from_dir("skills/", host=my_host)
|
|
13
|
+
graph = agent.as_langgraph()
|
|
14
|
+
|
|
15
|
+
Public API (stable for v0.x):
|
|
16
|
+
|
|
17
|
+
FlowAgent — load skills, compile to LangGraph
|
|
18
|
+
@flow — decorator: marks the entrypoint of a Skill's flow
|
|
19
|
+
@action — decorator: marks a memoized side-effectful step
|
|
20
|
+
Context — the ``ctx`` passed to flow functions (ask/run/say)
|
|
21
|
+
FieldSpec — typed field declaration (also valid in YAML)
|
|
22
|
+
Reply, SetField, Correct, — what the interpreter LLM emits per turn
|
|
23
|
+
Cancel, StartFlow,
|
|
24
|
+
OutOfScope, Chitchat
|
|
25
|
+
FlowState — the TypedDict that threads through every node
|
|
26
|
+
Host — Protocol every framework adapter implements
|
|
27
|
+
|
|
28
|
+
Host adapters live at ``aigenos_flow.hosts`` (``LangGraphHost``, ``TestHost``).
|
|
29
|
+
"""
|
|
30
|
+
from .agent import FlowAgent
|
|
31
|
+
from .context import Context, FlowDone, FlowLink, NeedField
|
|
32
|
+
from .declarative import ActionSpec, AuditSink, ToolRegistry, build_declarative_flow
|
|
33
|
+
from .context import Context, FlowDone, FlowLink, NeedField, NeedFields
|
|
34
|
+
from .decorators import action, flow
|
|
35
|
+
from .fields import FieldSpec, FieldValidationError
|
|
36
|
+
from .host import Host
|
|
37
|
+
from .integration import build_react_with_skills, message_text
|
|
38
|
+
from .interpret import (
|
|
39
|
+
Cancel,
|
|
40
|
+
Chitchat,
|
|
41
|
+
Correct,
|
|
42
|
+
OutOfScope,
|
|
43
|
+
Reply,
|
|
44
|
+
SetField,
|
|
45
|
+
StartFlow,
|
|
46
|
+
Turn,
|
|
47
|
+
TurnInterpretation,
|
|
48
|
+
)
|
|
49
|
+
from .runtime import (
|
|
50
|
+
FlowStackFrame,
|
|
51
|
+
FlowState,
|
|
52
|
+
Message,
|
|
53
|
+
initial_state,
|
|
54
|
+
)
|
|
55
|
+
from .skills import Skill, SkillFrontmatter, SkillRegistry
|
|
56
|
+
from ._slack_helper import post_to_slack
|
|
57
|
+
from .connectors import (
|
|
58
|
+
ConnectorAdapter,
|
|
59
|
+
ConnectorManager,
|
|
60
|
+
ConnectorResult,
|
|
61
|
+
ConnectorStore,
|
|
62
|
+
InvocationContext,
|
|
63
|
+
ManagedOperation,
|
|
64
|
+
ParameterSpec,
|
|
65
|
+
SecretResolver,
|
|
66
|
+
ToolDescriptor,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
# Back-compat aliases — old code that imports SlotSpec / SetSlot / NeedSlot /
|
|
70
|
+
# CommandList still works. Marked DEPRECATED in docs; will be removed in 0.3.
|
|
71
|
+
SlotSpec = FieldSpec
|
|
72
|
+
SlotValidationError = FieldValidationError
|
|
73
|
+
SetSlot = SetField
|
|
74
|
+
NeedSlot = NeedField
|
|
75
|
+
CommandList = TurnInterpretation
|
|
76
|
+
Command = Turn
|
|
77
|
+
|
|
78
|
+
__all__ = [
|
|
79
|
+
# high level
|
|
80
|
+
"FlowAgent",
|
|
81
|
+
"flow",
|
|
82
|
+
"action",
|
|
83
|
+
"build_react_with_skills",
|
|
84
|
+
"message_text",
|
|
85
|
+
# core types
|
|
86
|
+
"Context",
|
|
87
|
+
"Skill",
|
|
88
|
+
"SkillFrontmatter",
|
|
89
|
+
"SkillRegistry",
|
|
90
|
+
"FieldSpec",
|
|
91
|
+
"FieldValidationError",
|
|
92
|
+
# declarative skills
|
|
93
|
+
"ActionSpec",
|
|
94
|
+
"ToolRegistry",
|
|
95
|
+
"AuditSink",
|
|
96
|
+
"build_declarative_flow",
|
|
97
|
+
# managed connectors
|
|
98
|
+
"ConnectorAdapter",
|
|
99
|
+
"ConnectorManager",
|
|
100
|
+
"ConnectorResult",
|
|
101
|
+
"ConnectorStore",
|
|
102
|
+
"InvocationContext",
|
|
103
|
+
"ManagedOperation",
|
|
104
|
+
"ParameterSpec",
|
|
105
|
+
"SecretResolver",
|
|
106
|
+
"ToolDescriptor",
|
|
107
|
+
# interpretation vocabulary
|
|
108
|
+
"Turn",
|
|
109
|
+
"TurnInterpretation",
|
|
110
|
+
"SetField",
|
|
111
|
+
"Correct",
|
|
112
|
+
"StartFlow",
|
|
113
|
+
"Cancel",
|
|
114
|
+
"OutOfScope",
|
|
115
|
+
"Chitchat",
|
|
116
|
+
"Reply",
|
|
117
|
+
# state
|
|
118
|
+
"FlowState",
|
|
119
|
+
"FlowStackFrame",
|
|
120
|
+
"Message",
|
|
121
|
+
"initial_state",
|
|
122
|
+
# exception sentinels
|
|
123
|
+
"FlowDone",
|
|
124
|
+
"FlowLink",
|
|
125
|
+
"NeedField",
|
|
126
|
+
"NeedFields",
|
|
127
|
+
# host protocol
|
|
128
|
+
"Host",
|
|
129
|
+
# integrations
|
|
130
|
+
"post_to_slack",
|
|
131
|
+
# back-compat
|
|
132
|
+
"SlotSpec",
|
|
133
|
+
"SlotValidationError",
|
|
134
|
+
"SetSlot",
|
|
135
|
+
"NeedSlot",
|
|
136
|
+
"CommandList",
|
|
137
|
+
"Command",
|
|
138
|
+
]
|
|
139
|
+
|
|
140
|
+
__version__ = "0.3.0"
|