fibonacci-sdk 0.1.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.
- fibonacci_sdk-0.1.0/LICENSE +270 -0
- fibonacci_sdk-0.1.0/PKG-INFO +415 -0
- fibonacci_sdk-0.1.0/README.md +385 -0
- fibonacci_sdk-0.1.0/fibonacci/__init__.py +174 -0
- fibonacci_sdk-0.1.0/fibonacci/audit_logging.py +412 -0
- fibonacci_sdk-0.1.0/fibonacci/cli.py +472 -0
- fibonacci_sdk-0.1.0/fibonacci/cli_utils.py +152 -0
- fibonacci_sdk-0.1.0/fibonacci/client.py +410 -0
- fibonacci_sdk-0.1.0/fibonacci/config.py +290 -0
- fibonacci_sdk-0.1.0/fibonacci/constants.py +360 -0
- fibonacci_sdk-0.1.0/fibonacci/exceptions.py +84 -0
- fibonacci_sdk-0.1.0/fibonacci/keychain_storage.py +347 -0
- fibonacci_sdk-0.1.0/fibonacci/memory.py +361 -0
- fibonacci_sdk-0.1.0/fibonacci/nodes.py +492 -0
- fibonacci_sdk-0.1.0/fibonacci/secure_client.py +203 -0
- fibonacci_sdk-0.1.0/fibonacci/secure_config.py +315 -0
- fibonacci_sdk-0.1.0/fibonacci/tools_discovery.py +290 -0
- fibonacci_sdk-0.1.0/fibonacci/validators.py +209 -0
- fibonacci_sdk-0.1.0/fibonacci/workflow.py +676 -0
- fibonacci_sdk-0.1.0/fibonacci/yaml_exporter.py +203 -0
- fibonacci_sdk-0.1.0/fibonacci/yaml_loader.py +263 -0
- fibonacci_sdk-0.1.0/pyproject.toml +63 -0
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
Fibonacci SDK License Agreement
|
|
2
|
+
Version 1.0, January 2026
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2026-2027 Fibonacci, Inc. All rights reserved.
|
|
5
|
+
|
|
6
|
+
================================================================================
|
|
7
|
+
IMPORTANT: READ THIS LICENSE AGREEMENT CAREFULLY BEFORE USING THIS SOFTWARE.
|
|
8
|
+
================================================================================
|
|
9
|
+
|
|
10
|
+
This License Agreement ("Agreement") is a legal agreement between you (either an
|
|
11
|
+
individual or a single entity, referred to herein as "You" or "Licensee") and
|
|
12
|
+
Fibonacci, Inc. ("Fibonacci", "Company", "We", or "Us") for the Fibonacci SDK
|
|
13
|
+
software, including any associated documentation, source code, and related
|
|
14
|
+
materials (collectively, the "Software").
|
|
15
|
+
|
|
16
|
+
By downloading, installing, copying, or otherwise using the Software, you agree
|
|
17
|
+
to be bound by the terms of this Agreement. If you do not agree to the terms of
|
|
18
|
+
this Agreement, do not download, install, copy, or use the Software.
|
|
19
|
+
|
|
20
|
+
--------------------------------------------------------------------------------
|
|
21
|
+
1. GRANT OF LICENSE
|
|
22
|
+
--------------------------------------------------------------------------------
|
|
23
|
+
|
|
24
|
+
Subject to the terms and conditions of this Agreement, Fibonacci grants you a
|
|
25
|
+
limited, non-exclusive, non-transferable, revocable license to:
|
|
26
|
+
|
|
27
|
+
a) USE the Software solely for the purpose of developing applications that
|
|
28
|
+
integrate with the Fibonacci Platform using a valid Fibonacci API key;
|
|
29
|
+
|
|
30
|
+
b) VIEW and READ the source code for educational and reference purposes;
|
|
31
|
+
|
|
32
|
+
c) MAKE copies of the Software solely for backup or archival purposes;
|
|
33
|
+
|
|
34
|
+
d) CREATE applications ("Applications") that use the Software to communicate
|
|
35
|
+
with the Fibonacci Platform, provided such Applications do not expose,
|
|
36
|
+
redistribute, or resell the Software itself.
|
|
37
|
+
|
|
38
|
+
--------------------------------------------------------------------------------
|
|
39
|
+
2. RESTRICTIONS
|
|
40
|
+
--------------------------------------------------------------------------------
|
|
41
|
+
|
|
42
|
+
You may NOT, under any circumstances:
|
|
43
|
+
|
|
44
|
+
a) MODIFY, alter, adapt, translate, or create derivative works based on the
|
|
45
|
+
Software, except as expressly permitted in Section 1;
|
|
46
|
+
|
|
47
|
+
b) REDISTRIBUTE, sublicense, rent, lease, loan, sell, or otherwise transfer
|
|
48
|
+
the Software or any rights therein to any third party;
|
|
49
|
+
|
|
50
|
+
c) REMOVE, alter, or obscure any copyright notices, trademarks, or other
|
|
51
|
+
proprietary rights notices contained in or on the Software;
|
|
52
|
+
|
|
53
|
+
d) USE the Software to develop a product or service that competes with
|
|
54
|
+
Fibonacci or the Fibonacci Platform;
|
|
55
|
+
|
|
56
|
+
e) REVERSE ENGINEER, disassemble, decompile, or attempt to derive the source
|
|
57
|
+
code of any proprietary components of the Fibonacci Platform (the SDK
|
|
58
|
+
source code itself is viewable under this license);
|
|
59
|
+
|
|
60
|
+
f) USE the Software for any unlawful purpose or in violation of any
|
|
61
|
+
applicable laws or regulations;
|
|
62
|
+
|
|
63
|
+
g) USE the Software without a valid Fibonacci API key, except for viewing
|
|
64
|
+
the source code as permitted in Section 1(b);
|
|
65
|
+
|
|
66
|
+
h) PUBLISH, distribute, or make available the Software (in whole or in part)
|
|
67
|
+
as part of any other software package, library, or framework;
|
|
68
|
+
|
|
69
|
+
i) CLAIM ownership of the Software or represent that you have any rights to
|
|
70
|
+
the Software beyond those expressly granted in this Agreement;
|
|
71
|
+
|
|
72
|
+
j) USE the Fibonacci name, logo, or trademarks without prior written consent
|
|
73
|
+
from Fibonacci, Inc.
|
|
74
|
+
|
|
75
|
+
--------------------------------------------------------------------------------
|
|
76
|
+
3. API KEY REQUIREMENT
|
|
77
|
+
--------------------------------------------------------------------------------
|
|
78
|
+
|
|
79
|
+
a) A valid Fibonacci API key is required to use the Software for its intended
|
|
80
|
+
purpose of communicating with the Fibonacci Platform.
|
|
81
|
+
|
|
82
|
+
b) API keys are subject to separate terms of service and usage policies as
|
|
83
|
+
published on the Fibonacci website.
|
|
84
|
+
|
|
85
|
+
c) Fibonacci reserves the right to revoke, suspend, or terminate API keys at
|
|
86
|
+
any time, with or without cause.
|
|
87
|
+
|
|
88
|
+
d) You are responsible for maintaining the confidentiality of your API key
|
|
89
|
+
and for all activities that occur under your API key.
|
|
90
|
+
|
|
91
|
+
--------------------------------------------------------------------------------
|
|
92
|
+
4. INTELLECTUAL PROPERTY
|
|
93
|
+
--------------------------------------------------------------------------------
|
|
94
|
+
|
|
95
|
+
a) The Software is protected by copyright laws and international copyright
|
|
96
|
+
treaties, as well as other intellectual property laws and treaties.
|
|
97
|
+
|
|
98
|
+
b) Fibonacci retains all right, title, and interest in and to the Software,
|
|
99
|
+
including all copyrights, patents, trade secrets, trademarks, and other
|
|
100
|
+
intellectual property rights.
|
|
101
|
+
|
|
102
|
+
c) This Agreement does not grant you any rights to use Fibonacci's
|
|
103
|
+
trademarks, service marks, trade names, or logos.
|
|
104
|
+
|
|
105
|
+
d) Any feedback, suggestions, or improvements you provide regarding the
|
|
106
|
+
Software may be used by Fibonacci without any obligation to you.
|
|
107
|
+
|
|
108
|
+
--------------------------------------------------------------------------------
|
|
109
|
+
5. CONTRIBUTIONS
|
|
110
|
+
--------------------------------------------------------------------------------
|
|
111
|
+
|
|
112
|
+
a) Fibonacci may, at its sole discretion, accept contributions to the
|
|
113
|
+
Software from third parties.
|
|
114
|
+
|
|
115
|
+
b) By submitting any contribution (including but not limited to code,
|
|
116
|
+
documentation, or suggestions), you:
|
|
117
|
+
|
|
118
|
+
i. Grant Fibonacci a perpetual, irrevocable, worldwide, royalty-free,
|
|
119
|
+
non-exclusive license to use, reproduce, modify, distribute, and
|
|
120
|
+
sublicense your contribution;
|
|
121
|
+
|
|
122
|
+
ii. Represent that you have the legal right to grant such license;
|
|
123
|
+
|
|
124
|
+
iii. Understand that your contribution may or may not be included in the
|
|
125
|
+
Software at Fibonacci's sole discretion.
|
|
126
|
+
|
|
127
|
+
--------------------------------------------------------------------------------
|
|
128
|
+
6. DISCLAIMER OF WARRANTIES
|
|
129
|
+
--------------------------------------------------------------------------------
|
|
130
|
+
|
|
131
|
+
THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
132
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
133
|
+
FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT.
|
|
134
|
+
|
|
135
|
+
FIBONACCI DOES NOT WARRANT THAT:
|
|
136
|
+
|
|
137
|
+
a) THE SOFTWARE WILL MEET YOUR REQUIREMENTS;
|
|
138
|
+
|
|
139
|
+
b) THE SOFTWARE WILL BE UNINTERRUPTED, TIMELY, SECURE, OR ERROR-FREE;
|
|
140
|
+
|
|
141
|
+
c) THE RESULTS OBTAINED FROM THE USE OF THE SOFTWARE WILL BE ACCURATE OR
|
|
142
|
+
RELIABLE;
|
|
143
|
+
|
|
144
|
+
d) ANY ERRORS IN THE SOFTWARE WILL BE CORRECTED.
|
|
145
|
+
|
|
146
|
+
--------------------------------------------------------------------------------
|
|
147
|
+
7. LIMITATION OF LIABILITY
|
|
148
|
+
--------------------------------------------------------------------------------
|
|
149
|
+
|
|
150
|
+
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW:
|
|
151
|
+
|
|
152
|
+
a) IN NO EVENT SHALL FIBONACCI BE LIABLE FOR ANY INDIRECT, INCIDENTAL,
|
|
153
|
+
SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, INCLUDING BUT NOT LIMITED TO
|
|
154
|
+
LOSS OF PROFITS, DATA, USE, GOODWILL, OR OTHER INTANGIBLE LOSSES;
|
|
155
|
+
|
|
156
|
+
b) IN NO EVENT SHALL FIBONACCI'S TOTAL LIABILITY TO YOU FOR ALL DAMAGES
|
|
157
|
+
EXCEED THE AMOUNT YOU HAVE PAID TO FIBONACCI IN THE TWELVE (12) MONTHS
|
|
158
|
+
PRECEDING THE CLAIM, OR ONE HUNDRED DOLLARS ($100), WHICHEVER IS GREATER;
|
|
159
|
+
|
|
160
|
+
c) THESE LIMITATIONS SHALL APPLY REGARDLESS OF THE LEGAL THEORY UPON WHICH
|
|
161
|
+
DAMAGES MAY BE CLAIMED AND EVEN IF FIBONACCI HAS BEEN ADVISED OF THE
|
|
162
|
+
POSSIBILITY OF SUCH DAMAGES.
|
|
163
|
+
|
|
164
|
+
--------------------------------------------------------------------------------
|
|
165
|
+
8. INDEMNIFICATION
|
|
166
|
+
--------------------------------------------------------------------------------
|
|
167
|
+
|
|
168
|
+
You agree to indemnify, defend, and hold harmless Fibonacci, its officers,
|
|
169
|
+
directors, employees, agents, and affiliates from and against any and all
|
|
170
|
+
claims, damages, losses, liabilities, costs, and expenses (including reasonable
|
|
171
|
+
attorneys' fees) arising out of or related to:
|
|
172
|
+
|
|
173
|
+
a) Your use of the Software;
|
|
174
|
+
|
|
175
|
+
b) Your violation of this Agreement;
|
|
176
|
+
|
|
177
|
+
c) Your violation of any rights of any third party;
|
|
178
|
+
|
|
179
|
+
d) Any Applications you develop using the Software.
|
|
180
|
+
|
|
181
|
+
--------------------------------------------------------------------------------
|
|
182
|
+
9. TERMINATION
|
|
183
|
+
--------------------------------------------------------------------------------
|
|
184
|
+
|
|
185
|
+
a) This Agreement is effective until terminated.
|
|
186
|
+
|
|
187
|
+
b) Fibonacci may terminate this Agreement at any time, with or without cause,
|
|
188
|
+
upon notice to you.
|
|
189
|
+
|
|
190
|
+
c) Your rights under this Agreement will terminate automatically without
|
|
191
|
+
notice if you fail to comply with any term of this Agreement.
|
|
192
|
+
|
|
193
|
+
d) Upon termination, you must:
|
|
194
|
+
|
|
195
|
+
i. Cease all use of the Software;
|
|
196
|
+
|
|
197
|
+
ii. Destroy all copies of the Software in your possession or control;
|
|
198
|
+
|
|
199
|
+
iii. Certify in writing, upon request, that you have complied with these
|
|
200
|
+
termination requirements.
|
|
201
|
+
|
|
202
|
+
e) Sections 2, 4, 5, 6, 7, 8, 10, and 11 shall survive termination.
|
|
203
|
+
|
|
204
|
+
--------------------------------------------------------------------------------
|
|
205
|
+
10. GOVERNING LAW AND DISPUTE RESOLUTION
|
|
206
|
+
--------------------------------------------------------------------------------
|
|
207
|
+
|
|
208
|
+
a) This Agreement shall be governed by and construed in accordance with the
|
|
209
|
+
laws of the State of Delaware, United States, without regard to its
|
|
210
|
+
conflict of laws provisions.
|
|
211
|
+
|
|
212
|
+
b) Any dispute arising out of or relating to this Agreement shall be resolved
|
|
213
|
+
through binding arbitration in accordance with the rules of the American
|
|
214
|
+
Arbitration Association.
|
|
215
|
+
|
|
216
|
+
c) The arbitration shall be conducted in English and shall take place in
|
|
217
|
+
Wilmington, Delaware, or remotely at the discretion of the arbitrator.
|
|
218
|
+
|
|
219
|
+
d) The decision of the arbitrator shall be final and binding on both parties.
|
|
220
|
+
|
|
221
|
+
e) Notwithstanding the foregoing, Fibonacci may seek injunctive or other
|
|
222
|
+
equitable relief in any court of competent jurisdiction to protect its
|
|
223
|
+
intellectual property rights.
|
|
224
|
+
|
|
225
|
+
--------------------------------------------------------------------------------
|
|
226
|
+
11. GENERAL PROVISIONS
|
|
227
|
+
--------------------------------------------------------------------------------
|
|
228
|
+
|
|
229
|
+
a) ENTIRE AGREEMENT: This Agreement constitutes the entire agreement between
|
|
230
|
+
you and Fibonacci concerning the Software and supersedes all prior
|
|
231
|
+
agreements, understandings, and communications.
|
|
232
|
+
|
|
233
|
+
b) AMENDMENT: Fibonacci may modify this Agreement at any time by posting a
|
|
234
|
+
revised version. Your continued use of the Software after such posting
|
|
235
|
+
constitutes acceptance of the modified Agreement.
|
|
236
|
+
|
|
237
|
+
c) SEVERABILITY: If any provision of this Agreement is held to be
|
|
238
|
+
unenforceable, such provision shall be reformed only to the extent
|
|
239
|
+
necessary to make it enforceable, and the remaining provisions shall
|
|
240
|
+
continue in full force and effect.
|
|
241
|
+
|
|
242
|
+
d) WAIVER: The failure of Fibonacci to enforce any right or provision of this
|
|
243
|
+
Agreement shall not constitute a waiver of such right or provision.
|
|
244
|
+
|
|
245
|
+
e) ASSIGNMENT: You may not assign or transfer this Agreement or any rights
|
|
246
|
+
hereunder without Fibonacci's prior written consent. Fibonacci may assign
|
|
247
|
+
this Agreement without restriction.
|
|
248
|
+
|
|
249
|
+
f) NOTICES: All notices under this Agreement shall be in writing and shall be
|
|
250
|
+
deemed given when delivered personally, sent by confirmed email, or sent
|
|
251
|
+
by certified mail to the addresses specified by the parties.
|
|
252
|
+
|
|
253
|
+
g) EXPORT COMPLIANCE: You agree to comply with all applicable export and
|
|
254
|
+
import laws and regulations in your use of the Software.
|
|
255
|
+
|
|
256
|
+
--------------------------------------------------------------------------------
|
|
257
|
+
12. CONTACT INFORMATION
|
|
258
|
+
--------------------------------------------------------------------------------
|
|
259
|
+
|
|
260
|
+
For questions about this License Agreement, please contact:
|
|
261
|
+
|
|
262
|
+
Fibonacci, Inc.
|
|
263
|
+
Website: https://fibonacci.today
|
|
264
|
+
|
|
265
|
+
================================================================================
|
|
266
|
+
|
|
267
|
+
BY USING THE FIBONACCI SDK, YOU ACKNOWLEDGE THAT YOU HAVE READ THIS AGREEMENT,
|
|
268
|
+
UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS TERMS AND CONDITIONS.
|
|
269
|
+
|
|
270
|
+
================================================================================
|
|
@@ -0,0 +1,415 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: fibonacci-sdk
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Python SDK for Fibonacci Workflow Automation Platform
|
|
5
|
+
License: Proprietary
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Keywords: workflow,automation,ai,llm,orchestration
|
|
8
|
+
Author: Fibonacci Team
|
|
9
|
+
Author-email: team@fibonacci.today
|
|
10
|
+
Requires-Python: >=3.11,<4.0
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: Other/Proprietary License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
20
|
+
Requires-Dist: httpx (>=0.27.0,<0.28.0)
|
|
21
|
+
Requires-Dist: pydantic (>=2.5.0,<3.0.0)
|
|
22
|
+
Requires-Dist: python-dotenv (>=1.0.0,<2.0.0)
|
|
23
|
+
Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
|
|
24
|
+
Requires-Dist: rich (>=13.7.0,<14.0.0)
|
|
25
|
+
Requires-Dist: typer (>=0.12.0,<0.13.0)
|
|
26
|
+
Project-URL: Documentation, https://docs.fibonacci.today
|
|
27
|
+
Project-URL: Homepage, https://fibonacci.today
|
|
28
|
+
Project-URL: Repository, https://github.com/RohanBanerjee88/fibonacci-sdk
|
|
29
|
+
Description-Content-Type: text/markdown
|
|
30
|
+
|
|
31
|
+
# Fibonacci SDK
|
|
32
|
+
|
|
33
|
+
<p align="center">
|
|
34
|
+
<strong>Build and deploy AI-powered workflows programmatically</strong>
|
|
35
|
+
</p>
|
|
36
|
+
|
|
37
|
+
<p align="center">
|
|
38
|
+
<a href="https://pypi.org/project/fibonacci-sdk/"><img src="https://img.shields.io/pypi/v/fibonacci-sdk.svg" alt="PyPI version"></a>
|
|
39
|
+
<a href="https://pypi.org/project/fibonacci-sdk/"><img src="https://img.shields.io/pypi/pyversions/fibonacci-sdk.svg" alt="Python versions"></a>
|
|
40
|
+
<a href="https://github.com/RohanBanerjee88/fibonacci-sdk/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Proprietary-blue.svg" alt="License"></a>
|
|
41
|
+
</p>
|
|
42
|
+
|
|
43
|
+
<p align="center">
|
|
44
|
+
<a href="https://docs.fibonacci.today">Documentation</a> •
|
|
45
|
+
<a href="#installation">Installation</a> •
|
|
46
|
+
<a href="#quick-start">Quick Start</a> •
|
|
47
|
+
<a href="#features">Features</a> •
|
|
48
|
+
<a href="https://github.com/fibonacci-ai/fibonacci-sdk/issues">Issues</a>
|
|
49
|
+
</p>
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## What is Fibonacci?
|
|
54
|
+
|
|
55
|
+
Fibonacci is a platform for building autonomous AI agents and workflows. The SDK allows developers to:
|
|
56
|
+
|
|
57
|
+
- 🤖 **Build AI Workflows** - Chain LLM calls, tools, and logic programmatically
|
|
58
|
+
- 🚀 **Deploy Instantly** - One command to deploy to production
|
|
59
|
+
- 🔧 **40+ Integrations** - Connect to Slack, Google Sheets, GitHub, and more
|
|
60
|
+
- 📊 **Monitor & Optimize** - Track costs, performance, and optimize automatically
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Installation
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
pip install fibonacci-sdk
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### With Security Features (Recommended)
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
pip install fibonacci-sdk[security]
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
This includes secure keychain storage for API keys.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Quick Start
|
|
81
|
+
|
|
82
|
+
### 1. Get Your API Key
|
|
83
|
+
|
|
84
|
+
Sign up at [fibonacci.today](https://fibonacci.today) to get your API key.
|
|
85
|
+
|
|
86
|
+
### 2. Set Up Authentication
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# Option 1: Environment variable
|
|
90
|
+
export FIBONACCI_API_KEY="fib_live_your_api_key"
|
|
91
|
+
|
|
92
|
+
# Option 2: Secure keychain storage (recommended)
|
|
93
|
+
fibonacci security save
|
|
94
|
+
# Then enter your API key when prompted
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### 3. Create Your First Workflow
|
|
98
|
+
|
|
99
|
+
```python
|
|
100
|
+
from fibonacci import Workflow, LLMNode, ToolNode
|
|
101
|
+
|
|
102
|
+
# Create a workflow
|
|
103
|
+
wf = Workflow(
|
|
104
|
+
name="Customer Support Bot",
|
|
105
|
+
description="AI-powered customer support assistant"
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
# Add an LLM node
|
|
109
|
+
respond = LLMNode(
|
|
110
|
+
id="respond",
|
|
111
|
+
name="Generate Response",
|
|
112
|
+
instruction="""
|
|
113
|
+
You are a helpful customer support assistant.
|
|
114
|
+
|
|
115
|
+
Customer message: {{input.message}}
|
|
116
|
+
|
|
117
|
+
Provide a friendly, helpful response.
|
|
118
|
+
"""
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
wf.add_node(respond)
|
|
122
|
+
|
|
123
|
+
# Deploy to Fibonacci platform
|
|
124
|
+
workflow_id = wf.deploy()
|
|
125
|
+
print(f"Deployed! Workflow ID: {workflow_id}")
|
|
126
|
+
|
|
127
|
+
# Execute the workflow
|
|
128
|
+
result = wf.run(input_data={"message": "How do I reset my password?"})
|
|
129
|
+
print(result.output_data)
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Features
|
|
135
|
+
|
|
136
|
+
### 🔗 Node Types
|
|
137
|
+
|
|
138
|
+
| Node | Description | Example Use Case |
|
|
139
|
+
|------|-------------|------------------|
|
|
140
|
+
| **LLMNode** | Call Claude AI models | Text generation, analysis, summarization |
|
|
141
|
+
| **ToolNode** | Execute platform tools | Read Google Sheets, send Slack messages |
|
|
142
|
+
| **CriticNode** | Evaluate outputs | Quality scoring, validation |
|
|
143
|
+
| **ConditionalNode** | Branch logic | Route based on sentiment, conditions |
|
|
144
|
+
|
|
145
|
+
### 📦 Example: Multi-Step Workflow
|
|
146
|
+
|
|
147
|
+
```python
|
|
148
|
+
from fibonacci import Workflow, LLMNode, ToolNode, ConditionalNode
|
|
149
|
+
|
|
150
|
+
wf = Workflow(name="Sales Report Pipeline")
|
|
151
|
+
|
|
152
|
+
# Step 1: Read data from Google Sheets
|
|
153
|
+
read_data = ToolNode(
|
|
154
|
+
id="read_data",
|
|
155
|
+
name="Read Sales Data",
|
|
156
|
+
tool="google_sheets_read",
|
|
157
|
+
params={"spreadsheet_id": "{{input.sheet_id}}"}
|
|
158
|
+
)
|
|
159
|
+
|
|
160
|
+
# Step 2: Analyze with AI
|
|
161
|
+
analyze = LLMNode(
|
|
162
|
+
id="analyze",
|
|
163
|
+
name="Analyze Sales",
|
|
164
|
+
instruction="Analyze this sales data and identify trends: {{read_data}}",
|
|
165
|
+
dependencies=["read_data"]
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
# Step 3: Check if urgent
|
|
169
|
+
check_urgent = ConditionalNode(
|
|
170
|
+
id="check_urgent",
|
|
171
|
+
name="Check Urgency",
|
|
172
|
+
left_value="{{analyze}}",
|
|
173
|
+
operator="contains",
|
|
174
|
+
right_value="urgent",
|
|
175
|
+
true_branch=["send_alert"],
|
|
176
|
+
false_branch=["send_report"],
|
|
177
|
+
dependencies=["analyze"]
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
# Step 4a: Send alert if urgent
|
|
181
|
+
send_alert = ToolNode(
|
|
182
|
+
id="send_alert",
|
|
183
|
+
name="Send Urgent Alert",
|
|
184
|
+
tool="slack_send_message",
|
|
185
|
+
params={
|
|
186
|
+
"channel": "#sales-alerts",
|
|
187
|
+
"message": "🚨 URGENT: {{analyze}}"
|
|
188
|
+
},
|
|
189
|
+
dependencies=["check_urgent"]
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
# Step 4b: Send regular report
|
|
193
|
+
send_report = ToolNode(
|
|
194
|
+
id="send_report",
|
|
195
|
+
name="Send Report",
|
|
196
|
+
tool="slack_send_message",
|
|
197
|
+
params={
|
|
198
|
+
"channel": "#sales-reports",
|
|
199
|
+
"message": "📊 Daily Report: {{analyze}}"
|
|
200
|
+
},
|
|
201
|
+
dependencies=["check_urgent"]
|
|
202
|
+
)
|
|
203
|
+
|
|
204
|
+
wf.add_nodes([read_data, analyze, check_urgent, send_alert, send_report])
|
|
205
|
+
|
|
206
|
+
# Deploy and run
|
|
207
|
+
wf.deploy()
|
|
208
|
+
result = wf.run(input_data={"sheet_id": "abc123"})
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### 💾 Memory & State
|
|
212
|
+
|
|
213
|
+
Persist data across workflow runs:
|
|
214
|
+
|
|
215
|
+
```python
|
|
216
|
+
from fibonacci import Memory
|
|
217
|
+
|
|
218
|
+
# Store data
|
|
219
|
+
memory = Memory(scope="workflow", workflow_id="your-workflow-id")
|
|
220
|
+
memory.set("user_preferences", {"theme": "dark", "language": "en"})
|
|
221
|
+
|
|
222
|
+
# Retrieve later
|
|
223
|
+
prefs = memory.get("user_preferences")
|
|
224
|
+
print(prefs) # {"theme": "dark", "language": "en"}
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### 📄 YAML Support
|
|
228
|
+
|
|
229
|
+
Define workflows in YAML:
|
|
230
|
+
|
|
231
|
+
```yaml
|
|
232
|
+
# workflow.yaml
|
|
233
|
+
name: Email Summarizer
|
|
234
|
+
description: Summarize incoming emails
|
|
235
|
+
|
|
236
|
+
nodes:
|
|
237
|
+
- id: summarize
|
|
238
|
+
type: llm
|
|
239
|
+
name: Summarize Email
|
|
240
|
+
instruction: "Summarize this email: {{input.email_body}}"
|
|
241
|
+
config:
|
|
242
|
+
model: claude-haiku-4-5
|
|
243
|
+
max_tokens: 500
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
```python
|
|
247
|
+
from fibonacci import Workflow
|
|
248
|
+
|
|
249
|
+
# Load from YAML
|
|
250
|
+
wf = Workflow.from_yaml("workflow.yaml")
|
|
251
|
+
wf.deploy()
|
|
252
|
+
|
|
253
|
+
# Export to YAML
|
|
254
|
+
wf.to_yaml("exported.yaml")
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## CLI Commands
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
# Initialize a new workflow project
|
|
263
|
+
fibonacci init "My Workflow"
|
|
264
|
+
|
|
265
|
+
# List your workflows
|
|
266
|
+
fibonacci list
|
|
267
|
+
|
|
268
|
+
# Execute a workflow
|
|
269
|
+
fibonacci run <workflow-id> '{"message": "hello"}'
|
|
270
|
+
|
|
271
|
+
# Check run status
|
|
272
|
+
fibonacci status <run-id>
|
|
273
|
+
|
|
274
|
+
# Security commands
|
|
275
|
+
fibonacci security status # Check API key security
|
|
276
|
+
fibonacci security save # Save API key to secure keychain
|
|
277
|
+
fibonacci security migrate # Migrate from .env to keychain
|
|
278
|
+
|
|
279
|
+
# Audit logs
|
|
280
|
+
fibonacci audit view # View recent audit events
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
---
|
|
284
|
+
|
|
285
|
+
## Configuration
|
|
286
|
+
|
|
287
|
+
### Environment Variables
|
|
288
|
+
|
|
289
|
+
| Variable | Description | Default |
|
|
290
|
+
|----------|-------------|---------|
|
|
291
|
+
| `FIBONACCI_API_KEY` | Your API key | Required |
|
|
292
|
+
| `FIBONACCI_BASE_URL` | API base URL | `http://api.fibonacci.today` |
|
|
293
|
+
| `FIBONACCI_TIMEOUT` | Request timeout (seconds) | `300` |
|
|
294
|
+
| `FIBONACCI_DEBUG` | Enable debug logging | `false` |
|
|
295
|
+
|
|
296
|
+
### Configuration File
|
|
297
|
+
|
|
298
|
+
Create `~/.fibonacci/config.yaml`:
|
|
299
|
+
|
|
300
|
+
```yaml
|
|
301
|
+
api_key: fib_live_your_key
|
|
302
|
+
base_url: http://api.fibonacci.today
|
|
303
|
+
timeout: 300
|
|
304
|
+
debug: false
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
### Secure Storage (Recommended)
|
|
308
|
+
|
|
309
|
+
Store your API key in the system keychain:
|
|
310
|
+
|
|
311
|
+
```bash
|
|
312
|
+
fibonacci security save
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
This uses:
|
|
316
|
+
- **macOS**: Keychain
|
|
317
|
+
- **Windows**: Credential Manager
|
|
318
|
+
- **Linux**: Secret Service
|
|
319
|
+
|
|
320
|
+
---
|
|
321
|
+
|
|
322
|
+
## Tool Discovery
|
|
323
|
+
|
|
324
|
+
Find available tools programmatically:
|
|
325
|
+
|
|
326
|
+
```python
|
|
327
|
+
from fibonacci import list_tools, get_tool_schema, search_tools
|
|
328
|
+
|
|
329
|
+
# List all tools
|
|
330
|
+
tools = list_tools()
|
|
331
|
+
for tool in tools:
|
|
332
|
+
print(f"{tool['name']}: {tool['description']}")
|
|
333
|
+
|
|
334
|
+
# Get detailed schema
|
|
335
|
+
schema = get_tool_schema("google_sheets_read")
|
|
336
|
+
print(schema)
|
|
337
|
+
|
|
338
|
+
# Search for tools
|
|
339
|
+
results = search_tools("slack")
|
|
340
|
+
print(results)
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
---
|
|
344
|
+
|
|
345
|
+
## Error Handling
|
|
346
|
+
|
|
347
|
+
```python
|
|
348
|
+
from fibonacci import (
|
|
349
|
+
Workflow,
|
|
350
|
+
FibonacciError,
|
|
351
|
+
AuthenticationError,
|
|
352
|
+
ValidationError,
|
|
353
|
+
ExecutionError
|
|
354
|
+
)
|
|
355
|
+
|
|
356
|
+
try:
|
|
357
|
+
wf = Workflow(name="My Workflow")
|
|
358
|
+
wf.deploy()
|
|
359
|
+
except AuthenticationError:
|
|
360
|
+
print("Invalid API key")
|
|
361
|
+
except ValidationError as e:
|
|
362
|
+
print(f"Workflow validation failed: {e.errors}")
|
|
363
|
+
except ExecutionError as e:
|
|
364
|
+
print(f"Execution failed: {e.message}")
|
|
365
|
+
except FibonacciError as e:
|
|
366
|
+
print(f"General error: {e.message}")
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
---
|
|
370
|
+
|
|
371
|
+
## Requirements
|
|
372
|
+
|
|
373
|
+
- Python 3.11 or higher
|
|
374
|
+
- Valid Fibonacci API key
|
|
375
|
+
|
|
376
|
+
### Dependencies
|
|
377
|
+
|
|
378
|
+
- `httpx` - HTTP client
|
|
379
|
+
- `pydantic` - Data validation
|
|
380
|
+
- `typer` - CLI framework
|
|
381
|
+
- `rich` - Terminal formatting
|
|
382
|
+
- `pyyaml` - YAML support
|
|
383
|
+
- `keyring` (optional) - Secure credential storage
|
|
384
|
+
|
|
385
|
+
---
|
|
386
|
+
|
|
387
|
+
## Documentation
|
|
388
|
+
|
|
389
|
+
- 📖 **Full Documentation**: [docs.fibonacci.today](https://docs.fibonacci.today)
|
|
390
|
+
- 🔧 **API Reference**: [docs.fibonacci.today/api](https://docs.fibonacci.today/api)
|
|
391
|
+
|
|
392
|
+
---
|
|
393
|
+
|
|
394
|
+
## License
|
|
395
|
+
|
|
396
|
+
This SDK is proprietary software. See [LICENSE](LICENSE) for terms.
|
|
397
|
+
|
|
398
|
+
**TL;DR**: You can use this SDK with a valid Fibonacci API key. You cannot modify, redistribute, or create competing products.
|
|
399
|
+
|
|
400
|
+
---
|
|
401
|
+
|
|
402
|
+
## Contributing
|
|
403
|
+
|
|
404
|
+
We welcome bug reports and feature suggestions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
405
|
+
|
|
406
|
+
---
|
|
407
|
+
|
|
408
|
+
<p align="center">
|
|
409
|
+
<strong>Built with ❤️ by Fibonacci, Inc.</strong>
|
|
410
|
+
</p>
|
|
411
|
+
|
|
412
|
+
<p align="center">
|
|
413
|
+
<a href="https://fibonacci.today">Website</a> •
|
|
414
|
+
<a href="https://docs.fibonacci.today">Docs</a> •
|
|
415
|
+
</p>
|