shyftlabs-continuum 0.2.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.
- shyftlabs_continuum-0.2.0/LICENSE +201 -0
- shyftlabs_continuum-0.2.0/NOTICE +10 -0
- shyftlabs_continuum-0.2.0/PKG-INFO +232 -0
- shyftlabs_continuum-0.2.0/README.md +174 -0
- shyftlabs_continuum-0.2.0/pyproject.toml +171 -0
- shyftlabs_continuum-0.2.0/setup.cfg +4 -0
- shyftlabs_continuum-0.2.0/src/continuum/__init__.py +437 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/__init__.py +280 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/base.py +612 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/config.py +559 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/exceptions.py +446 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/execution/__init__.py +19 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/execution/executor.py +968 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/execution/handoff_executor.py +311 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/execution/message_builder.py +417 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/execution/run_finalizer.py +244 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/execution/run_lifecycle.py +202 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/execution/stream_executor.py +243 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/execution/tool_handler.py +69 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/handoff/__init__.py +25 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/handoff/history.py +423 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/handoff/manager.py +481 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/interfaces/__init__.py +38 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/interfaces/executor_interface.py +51 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/interfaces/handler_interface.py +76 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/interfaces/service_interface.py +163 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/persistence/__init__.py +17 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/persistence/state.py +487 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/runner.py +1046 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/services/__init__.py +17 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/services/context_service.py +109 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/services/memory_service.py +209 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/services/session_service.py +261 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/services/tool_service.py +481 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/smart_layer/__init__.py +85 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/smart_layer/classifier.py +198 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/smart_layer/completion.py +45 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/smart_layer/defaults.py +34 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/smart_layer/errors.py +5 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/smart_layer/heuristics.py +74 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/smart_layer/json_parse.py +88 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/smart_layer/resolve.py +47 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/smart_layer/runner_facade.py +249 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/smart_layer/types.py +75 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/types.py +1001 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/utils/__init__.py +19 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/utils/circuit_breaker.py +87 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/utils/context_utils.py +85 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/utils/message_utils.py +26 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/utils/validation_utils.py +99 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/workflow/__init__.py +53 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/workflow/dag.py +446 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/workflow/debate.py +505 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/workflow/loop.py +390 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/workflow/parallel.py +354 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/workflow/planner.py +678 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/workflow/reflection.py +335 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/workflow/router.py +429 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/workflow/scatter.py +484 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/workflow/sequential.py +310 -0
- shyftlabs_continuum-0.2.0/src/continuum/agent/workflow/supervised.py +474 -0
- shyftlabs_continuum-0.2.0/src/continuum/config.py +267 -0
- shyftlabs_continuum-0.2.0/src/continuum/core/__init__.py +54 -0
- shyftlabs_continuum-0.2.0/src/continuum/core/background_tasks.py +137 -0
- shyftlabs_continuum-0.2.0/src/continuum/core/container.py +677 -0
- shyftlabs_continuum-0.2.0/src/continuum/core/context.py +389 -0
- shyftlabs_continuum-0.2.0/src/continuum/core/health.py +666 -0
- shyftlabs_continuum-0.2.0/src/continuum/core/lifecycle.py +811 -0
- shyftlabs_continuum-0.2.0/src/continuum/evaluation/__init__.py +68 -0
- shyftlabs_continuum-0.2.0/src/continuum/evaluation/build_golden_dataset.py +640 -0
- shyftlabs_continuum-0.2.0/src/continuum/evaluation/deepeval_eval.py +182 -0
- shyftlabs_continuum-0.2.0/src/continuum/evaluation/evaluator_agent.py +403 -0
- shyftlabs_continuum-0.2.0/src/continuum/evaluation/generate_eval_dataset.py +658 -0
- shyftlabs_continuum-0.2.0/src/continuum/evaluation/langfuse_datasets.py +362 -0
- shyftlabs_continuum-0.2.0/src/continuum/evaluation/ragas_eval.py +253 -0
- shyftlabs_continuum-0.2.0/src/continuum/evaluation/types.py +192 -0
- shyftlabs_continuum-0.2.0/src/continuum/exceptions.py +476 -0
- shyftlabs_continuum-0.2.0/src/continuum/llm/__init__.py +125 -0
- shyftlabs_continuum-0.2.0/src/continuum/llm/callbacks.py +464 -0
- shyftlabs_continuum-0.2.0/src/continuum/llm/client.py +517 -0
- shyftlabs_continuum-0.2.0/src/continuum/llm/config.py +179 -0
- shyftlabs_continuum-0.2.0/src/continuum/llm/context_management.py +799 -0
- shyftlabs_continuum-0.2.0/src/continuum/llm/context_window.py +595 -0
- shyftlabs_continuum-0.2.0/src/continuum/llm/dispatcher.py +229 -0
- shyftlabs_continuum-0.2.0/src/continuum/llm/exceptions.py +230 -0
- shyftlabs_continuum-0.2.0/src/continuum/llm/providers/__init__.py +74 -0
- shyftlabs_continuum-0.2.0/src/continuum/llm/providers/anthropic_provider.py +305 -0
- shyftlabs_continuum-0.2.0/src/continuum/llm/providers/base.py +52 -0
- shyftlabs_continuum-0.2.0/src/continuum/llm/providers/gateway_provider.py +40 -0
- shyftlabs_continuum-0.2.0/src/continuum/llm/providers/gemini_provider.py +248 -0
- shyftlabs_continuum-0.2.0/src/continuum/llm/providers/openai_provider.py +274 -0
- shyftlabs_continuum-0.2.0/src/continuum/llm/types.py +305 -0
- shyftlabs_continuum-0.2.0/src/continuum/llm/utils.py +115 -0
- shyftlabs_continuum-0.2.0/src/continuum/logging.py +521 -0
- shyftlabs_continuum-0.2.0/src/continuum/memory/__init__.py +175 -0
- shyftlabs_continuum-0.2.0/src/continuum/memory/base.py +339 -0
- shyftlabs_continuum-0.2.0/src/continuum/memory/client.py +677 -0
- shyftlabs_continuum-0.2.0/src/continuum/memory/config.py +455 -0
- shyftlabs_continuum-0.2.0/src/continuum/memory/exceptions.py +206 -0
- shyftlabs_continuum-0.2.0/src/continuum/memory/intelligence.py +793 -0
- shyftlabs_continuum-0.2.0/src/continuum/memory/providers/__init__.py +111 -0
- shyftlabs_continuum-0.2.0/src/continuum/memory/providers/mem0.py +750 -0
- shyftlabs_continuum-0.2.0/src/continuum/memory/scopes.py +586 -0
- shyftlabs_continuum-0.2.0/src/continuum/memory/types.py +202 -0
- shyftlabs_continuum-0.2.0/src/continuum/observability/__init__.py +151 -0
- shyftlabs_continuum-0.2.0/src/continuum/observability/config.py +163 -0
- shyftlabs_continuum-0.2.0/src/continuum/observability/decorators.py +588 -0
- shyftlabs_continuum-0.2.0/src/continuum/observability/error_reporter.py +515 -0
- shyftlabs_continuum-0.2.0/src/continuum/observability/initialization.py +180 -0
- shyftlabs_continuum-0.2.0/src/continuum/observability/metrics.py +1188 -0
- shyftlabs_continuum-0.2.0/src/continuum/observability/provider_manager.py +482 -0
- shyftlabs_continuum-0.2.0/src/continuum/observability/providers/__init__.py +27 -0
- shyftlabs_continuum-0.2.0/src/continuum/observability/providers/base.py +365 -0
- shyftlabs_continuum-0.2.0/src/continuum/observability/providers/langfuse.py +320 -0
- shyftlabs_continuum-0.2.0/src/continuum/observability/providers/langfuse_client.py +413 -0
- shyftlabs_continuum-0.2.0/src/continuum/observability/providers/registry.py +181 -0
- shyftlabs_continuum-0.2.0/src/continuum/observability/trace_context.py +645 -0
- shyftlabs_continuum-0.2.0/src/continuum/observability/tracing.py +1004 -0
- shyftlabs_continuum-0.2.0/src/continuum/protocols.py +39 -0
- shyftlabs_continuum-0.2.0/src/continuum/py.typed +0 -0
- shyftlabs_continuum-0.2.0/src/continuum/security/__init__.py +9 -0
- shyftlabs_continuum-0.2.0/src/continuum/security/policy.py +114 -0
- shyftlabs_continuum-0.2.0/src/continuum/session/__init__.py +73 -0
- shyftlabs_continuum-0.2.0/src/continuum/session/base.py +189 -0
- shyftlabs_continuum-0.2.0/src/continuum/session/client.py +880 -0
- shyftlabs_continuum-0.2.0/src/continuum/session/config.py +159 -0
- shyftlabs_continuum-0.2.0/src/continuum/session/exceptions.py +59 -0
- shyftlabs_continuum-0.2.0/src/continuum/session/providers/__init__.py +111 -0
- shyftlabs_continuum-0.2.0/src/continuum/session/providers/redis.py +760 -0
- shyftlabs_continuum-0.2.0/src/continuum/session/types.py +128 -0
- shyftlabs_continuum-0.2.0/src/continuum/temporal/__init__.py +111 -0
- shyftlabs_continuum-0.2.0/src/continuum/temporal/activities.py +85 -0
- shyftlabs_continuum-0.2.0/src/continuum/temporal/client.py +181 -0
- shyftlabs_continuum-0.2.0/src/continuum/temporal/config.py +46 -0
- shyftlabs_continuum-0.2.0/src/continuum/temporal/exceptions.py +164 -0
- shyftlabs_continuum-0.2.0/src/continuum/temporal/human_in_loop.py +129 -0
- shyftlabs_continuum-0.2.0/src/continuum/temporal/registry.py +122 -0
- shyftlabs_continuum-0.2.0/src/continuum/temporal/types.py +181 -0
- shyftlabs_continuum-0.2.0/src/continuum/temporal/worker.py +149 -0
- shyftlabs_continuum-0.2.0/src/continuum/temporal/workflows/__init__.py +15 -0
- shyftlabs_continuum-0.2.0/src/continuum/temporal/workflows/agent_workflow.py +412 -0
- shyftlabs_continuum-0.2.0/src/continuum/temporal/workflows/loop_workflow.py +209 -0
- shyftlabs_continuum-0.2.0/src/continuum/temporal/workflows/parallel_workflow.py +111 -0
- shyftlabs_continuum-0.2.0/src/continuum/temporal/workflows/sequential_workflow.py +193 -0
- shyftlabs_continuum-0.2.0/src/continuum/tools/__init__.py +74 -0
- shyftlabs_continuum-0.2.0/src/continuum/tools/exceptions.py +50 -0
- shyftlabs_continuum-0.2.0/src/continuum/tools/executor.py +828 -0
- shyftlabs_continuum-0.2.0/src/continuum/tools/mcp.py +1200 -0
- shyftlabs_continuum-0.2.0/src/continuum/tools/schema.py +334 -0
- shyftlabs_continuum-0.2.0/src/continuum/tools/tool_attention/__init__.py +6 -0
- shyftlabs_continuum-0.2.0/src/continuum/tools/tool_attention/config.py +25 -0
- shyftlabs_continuum-0.2.0/src/continuum/tools/tool_attention/registry.py +132 -0
- shyftlabs_continuum-0.2.0/src/continuum/tools/tool_attention/router.py +214 -0
- shyftlabs_continuum-0.2.0/src/continuum/tools/types.py +611 -0
- shyftlabs_continuum-0.2.0/src/continuum/tools/util.py +550 -0
- shyftlabs_continuum-0.2.0/src/continuum/utils/__init__.py +23 -0
- shyftlabs_continuum-0.2.0/src/continuum/utils/sanitization.py +60 -0
- shyftlabs_continuum-0.2.0/src/continuum/utils/secrets.py +85 -0
- shyftlabs_continuum-0.2.0/src/shyftlabs_continuum.egg-info/PKG-INFO +232 -0
- shyftlabs_continuum-0.2.0/src/shyftlabs_continuum.egg-info/SOURCES.txt +161 -0
- shyftlabs_continuum-0.2.0/src/shyftlabs_continuum.egg-info/dependency_links.txt +1 -0
- shyftlabs_continuum-0.2.0/src/shyftlabs_continuum.egg-info/requires.txt +40 -0
- shyftlabs_continuum-0.2.0/src/shyftlabs_continuum.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for describing the origin of the Work and
|
|
141
|
+
reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may accept and charge a
|
|
167
|
+
fee for the acceptance of support, warranty, indemnity, or other
|
|
168
|
+
liability obligations and/or rights consistent with this License.
|
|
169
|
+
However, in accepting such obligations, You may act only on Your
|
|
170
|
+
own behalf and on Your sole responsibility, not on behalf of any other
|
|
171
|
+
Contributor, and only if You agree to indemnify, defend, and hold
|
|
172
|
+
each Contributor harmless for any liability incurred by, or claims
|
|
173
|
+
asserted against, such Contributor by reason of your accepting any
|
|
174
|
+
such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2025-2026 ShyftLabs Inc.
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Continuum
|
|
2
|
+
Copyright 2025-2026 ShyftLabs Inc.
|
|
3
|
+
|
|
4
|
+
This product is licensed under the Apache License, Version 2.0.
|
|
5
|
+
See the LICENSE file in this repository for the full license text,
|
|
6
|
+
or visit http://www.apache.org/licenses/LICENSE-2.0.
|
|
7
|
+
|
|
8
|
+
This product includes software developed by ShyftLabs Inc. and the
|
|
9
|
+
Continuum contributors. For enterprise inquiries, contact
|
|
10
|
+
continuum@shyftlabs.io.
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: shyftlabs-continuum
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Agentic Framework for Enterprise-Wide Execution with multi-LLM provider support, observability, and error tracking
|
|
5
|
+
Author-email: Bhavik Ardeshna <continuum@shyftlabs.io>
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/shyftlabs/continuum
|
|
8
|
+
Project-URL: Documentation, https://github.com/shyftlabs/continuum/tree/main/docs
|
|
9
|
+
Project-URL: Repository, https://github.com/shyftlabs/continuum
|
|
10
|
+
Project-URL: Issues, https://github.com/shyftlabs/continuum/issues
|
|
11
|
+
Keywords: ai,llm,orchestration,agents,langfuse,memory,session,mcp
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
18
|
+
Requires-Python: >=3.13
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
License-File: NOTICE
|
|
22
|
+
Requires-Dist: aiohttp>=3.13.2
|
|
23
|
+
Requires-Dist: openai>=1.50.0
|
|
24
|
+
Requires-Dist: anthropic>=0.40.0
|
|
25
|
+
Requires-Dist: google-genai>=1.0.0
|
|
26
|
+
Requires-Dist: tiktoken>=0.7.0
|
|
27
|
+
Requires-Dist: langfuse<3.0.0,>=2.57.0
|
|
28
|
+
Requires-Dist: pydantic>=2.10.0
|
|
29
|
+
Requires-Dist: pydantic-settings>=2.6.0
|
|
30
|
+
Requires-Dist: python-dotenv>=1.0.1
|
|
31
|
+
Requires-Dist: mem0ai<2.0.0,>=1.0.0
|
|
32
|
+
Requires-Dist: qdrant-client>=1.16.0
|
|
33
|
+
Requires-Dist: pymilvus>=2.4.0
|
|
34
|
+
Requires-Dist: redis>=5.0.0
|
|
35
|
+
Requires-Dist: mcp>=1.23.0
|
|
36
|
+
Provides-Extra: dev
|
|
37
|
+
Requires-Dist: pytest>=8.3.0; extra == "dev"
|
|
38
|
+
Requires-Dist: pytest-asyncio>=0.24.0; extra == "dev"
|
|
39
|
+
Requires-Dist: pytest-cov>=5.0.0; extra == "dev"
|
|
40
|
+
Requires-Dist: pytest-mock>=3.14.0; extra == "dev"
|
|
41
|
+
Requires-Dist: pytest-timeout>=2.3.0; extra == "dev"
|
|
42
|
+
Requires-Dist: pytest-xdist>=3.5.0; extra == "dev"
|
|
43
|
+
Requires-Dist: fakeredis>=2.21.0; extra == "dev"
|
|
44
|
+
Requires-Dist: respx>=0.21.0; extra == "dev"
|
|
45
|
+
Requires-Dist: ruff==0.14.10; extra == "dev"
|
|
46
|
+
Requires-Dist: mypy>=1.13.0; extra == "dev"
|
|
47
|
+
Requires-Dist: pre-commit>=4.0.0; extra == "dev"
|
|
48
|
+
Provides-Extra: embeddings
|
|
49
|
+
Requires-Dist: sentence-transformers>=2.2.0; extra == "embeddings"
|
|
50
|
+
Provides-Extra: cohere
|
|
51
|
+
Requires-Dist: cohere>=5.0.0; extra == "cohere"
|
|
52
|
+
Provides-Extra: temporal
|
|
53
|
+
Requires-Dist: temporalio>=1.23.0; extra == "temporal"
|
|
54
|
+
Provides-Extra: eval
|
|
55
|
+
Requires-Dist: deepeval>=1.0.0; extra == "eval"
|
|
56
|
+
Requires-Dist: ragas>=0.2.0; extra == "eval"
|
|
57
|
+
Dynamic: license-file
|
|
58
|
+
|
|
59
|
+
<div align="center">
|
|
60
|
+
|
|
61
|
+
<picture>
|
|
62
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/continuum-logo-dark.png" />
|
|
63
|
+
<img src="docs/assets/continuum-logo.png" alt="Continuum" width="460" />
|
|
64
|
+
</picture>
|
|
65
|
+
|
|
66
|
+
##### by **[ShyftLabs](https://shyftlabs.io/)**
|
|
67
|
+
|
|
68
|
+
### The agent runtime for builders who ship.
|
|
69
|
+
|
|
70
|
+
Build, run, and deploy reliable AI agents at enterprise scale โ multi-LLM routing, persistent memory, MCP-native tools, durable workflows, and full observability, out of the box.
|
|
71
|
+
|
|
72
|
+
<br />
|
|
73
|
+
|
|
74
|
+
[](https://www.python.org/downloads/)
|
|
75
|
+
[](LICENSE)
|
|
76
|
+
[](https://github.com/shyftlabs/continuum/releases)
|
|
77
|
+
|
|
78
|
+
[](https://github.com/shyftlabs/continuum/actions/workflows/ci.yml)
|
|
79
|
+
[](https://docs.continuum.shyftlabs.io/)
|
|
80
|
+
[](CONTRIBUTING.md)
|
|
81
|
+
[](CODE_OF_CONDUCT.md)
|
|
82
|
+
|
|
83
|
+
[**๐ Documentation**](https://docs.continuum.shyftlabs.io/) ยท [**โก Quick start**](#-quick-start) ยท [**โ๏ธ Configuration**](#๏ธ-configuring-continuum) ยท [**๐งฉ Components**](#-components) ยท [**๐งช Examples**](#-examples) ยท [**๐ค Contributing**](CONTRIBUTING.md)
|
|
84
|
+
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
**Continuum** is a production-grade Python framework for building, orchestrating, and shipping autonomous AI agents at enterprise scale. It unifies a clean, typed agent core with cost-aware multi-model inference, stateful long- and short-term memory, open standards-based tool calling, durable execution, and end-to-end observability โ all behind one small, composable, type-safe API.
|
|
90
|
+
|
|
91
|
+
## โจ Features
|
|
92
|
+
|
|
93
|
+
- ๐ค **Agentic core & orchestration** โ a strongly-typed agent primitive with full lifecycle hooks, schema-validated structured outputs, and nine composable multi-agent patterns (sequential, parallel, loop, routing, planning, reflection, debate, scatter, supervised).
|
|
94
|
+
- ๐ **Smart Inference** โ cost-aware inference routing that classifies every request by complexity and dispatches it to the cheapest capable model, with seamless cross-provider failover and zero lock-in.
|
|
95
|
+
- ๐ง **Stateful memory** โ persistent semantic long-term recall plus low-latency working memory, with multi-tenant isolation scopes and built-in PII redaction for privacy-by-default agents.
|
|
96
|
+
- ๐ **Open tool calling** โ plug into any standards-based tool ecosystem (Model Context Protocol) across multiple transports, with fine-grained capability scoping, context capture/injection, and rich generative-UI artifacts.
|
|
97
|
+
- ๐ **Durable execution** โ long-running, crash- and restart-safe agent workflows with human-in-the-loop approval gates and exactly-once guarantees.
|
|
98
|
+
- ๐ญ **Full observability** โ first-class distributed tracing, token/latency/error telemetry, and one-line function instrumentation for complete run transparency.
|
|
99
|
+
- ๐ **Model-agnostic** โ target frontier or open-weight models through a single model string; swap providers without touching agent code.
|
|
100
|
+
- ๐ค **Multi-agent handoffs** โ context-preserving agent-to-agent delegation with history summarization, cycle detection, and depth control.
|
|
101
|
+
- ๐ก **Real-time streaming** โ token-, tool-, handoff-, and memory-level events streamed the moment they happen.
|
|
102
|
+
- โ
**Built-in evaluation** โ turn live production traces into golden datasets and regression-test agent quality with standard LLM-evaluation metrics.
|
|
103
|
+
|
|
104
|
+
## ๐ Quick start
|
|
105
|
+
|
|
106
|
+
**Requirements:** Python 3.13+ and Docker (for Redis ยท Milvus/Qdrant ยท Langfuse).
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
git clone https://github.com/shyftlabs/continuum.git
|
|
110
|
+
cd continuum
|
|
111
|
+
|
|
112
|
+
python3.13 -m venv .venv && source .venv/bin/activate
|
|
113
|
+
pip install -e .
|
|
114
|
+
|
|
115
|
+
cp .env.template .env # add your provider key(s) โ see Configuration below
|
|
116
|
+
docker compose up -d # Redis ยท Milvus/Qdrant ยท Langfuse
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Your first agent:
|
|
120
|
+
|
|
121
|
+
```python
|
|
122
|
+
import asyncio
|
|
123
|
+
from continuum.agent import BaseAgent, AgentRunner
|
|
124
|
+
|
|
125
|
+
async def main():
|
|
126
|
+
agent = BaseAgent(
|
|
127
|
+
name="hello-agent",
|
|
128
|
+
instructions="You are a friendly assistant.",
|
|
129
|
+
model="gpt-4o-mini",
|
|
130
|
+
)
|
|
131
|
+
runner = AgentRunner()
|
|
132
|
+
response = await runner.run(agent, "Hi!")
|
|
133
|
+
print(response.content)
|
|
134
|
+
|
|
135
|
+
asyncio.run(main())
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
`AgentRunner.run()` returns an `AgentResponse` with `content`, `structured_output`, `usage`, `tool_calls`, `run_artifacts`, `latency_ms`, and the full handoff chain. See the [**docs**](https://docs.continuum.shyftlabs.io/) for streaming, tools/MCP, memory, handoffs, and workflows.
|
|
139
|
+
|
|
140
|
+
## โ๏ธ Configuring Continuum
|
|
141
|
+
|
|
142
|
+
Continuum is configured through environment variables (copy [`.env.template`](.env.template) โ `.env`). Set keys only for the providers and components you use โ everything else has sensible defaults. The most common settings:
|
|
143
|
+
|
|
144
|
+
#### LLM providers & routing
|
|
145
|
+
|
|
146
|
+
| Variable | Description | Example |
|
|
147
|
+
|---|---|---|
|
|
148
|
+
| `OPENAI_API_KEY` / `ANTHROPIC_API_KEY` / `GEMINI_API_KEY` | Provider API keys โ set the one(s) you use | `sk-โฆ` |
|
|
149
|
+
| `DEFAULT_LLM_MODEL` | Default model (`provider/model`, or bare name for OpenAI) | `gemini/gemini-2.5-flash` |
|
|
150
|
+
| `FALLBACK_LLM_MODEL` | Model used if the default fails | `gpt-4o-mini` |
|
|
151
|
+
| `LLM_ENABLE_FALLBACK` | Automatically fall back on provider errors | `true` |
|
|
152
|
+
| `SMART_LAYER_ENABLED` | Enable cost-aware tier routing (Smart Inference) | `true` |
|
|
153
|
+
|
|
154
|
+
#### Memory (long-term) & embeddings
|
|
155
|
+
|
|
156
|
+
| Variable | Description | Example |
|
|
157
|
+
|---|---|---|
|
|
158
|
+
| `MEMORY_ENABLED` | Enable mem0-backed long-term memory | `true` |
|
|
159
|
+
| `VECTOR_STORE_PROVIDER` | Vector store backend | `qdrant` / `milvus` |
|
|
160
|
+
| `EMBEDDER_PROVIDER` / `EMBEDDER_MODEL` | Embedding provider & model | `openai` / `text-embedding-3-small` |
|
|
161
|
+
| `MEMORY_ISOLATION` | Scope of memory isolation | `user` / `agent` / `run` / `shared` |
|
|
162
|
+
|
|
163
|
+
#### Sessions (short-term)
|
|
164
|
+
|
|
165
|
+
| Variable | Description | Example |
|
|
166
|
+
|---|---|---|
|
|
167
|
+
| `SESSION_ENABLED` | Enable Redis-backed conversation sessions | `true` |
|
|
168
|
+
| `SESSION_REDIS_HOST` / `SESSION_REDIS_PORT` | Redis connection | `localhost` / `6380` |
|
|
169
|
+
| `SESSION_TTL_SECONDS` | Session lifetime | `172800` |
|
|
170
|
+
|
|
171
|
+
#### Observability (Langfuse)
|
|
172
|
+
|
|
173
|
+
| Variable | Description | Example |
|
|
174
|
+
|---|---|---|
|
|
175
|
+
| `LANGFUSE_ENABLED` | Enable tracing | `true` |
|
|
176
|
+
| `LANGFUSE_PUBLIC_KEY` / `LANGFUSE_SECRET_KEY` | Langfuse credentials | `pk-โฆ` / `sk-โฆ` |
|
|
177
|
+
| `LANGFUSE_HOST` | Langfuse endpoint | `http://localhost:3000` |
|
|
178
|
+
|
|
179
|
+
#### Temporal (optional, durable workflows)
|
|
180
|
+
|
|
181
|
+
| Variable | Description | Example |
|
|
182
|
+
|---|---|---|
|
|
183
|
+
| `TEMPORAL_ENABLED` | Enable durable workflow orchestration | `false` |
|
|
184
|
+
| `TEMPORAL_HOST` | Temporal frontend | `localhost:7233` |
|
|
185
|
+
|
|
186
|
+
> Optional extras: `pip install -e ".[temporal]"` for Temporal, `".[eval]"` for evaluation, `".[embeddings]"` for local embeddings. See [`.env.template`](.env.template) for the complete, annotated reference.
|
|
187
|
+
|
|
188
|
+
## ๐งฉ Components
|
|
189
|
+
|
|
190
|
+
| Component | What it does |
|
|
191
|
+
|---|---|
|
|
192
|
+
| **Agents** | `BaseAgent` + `AgentRunner` โ config, hooks, structured outputs, ReAct |
|
|
193
|
+
| **Workflows** | Nine multi-agent patterns for chaining, branching, looping, and self-improvement |
|
|
194
|
+
| **Smart Inference** | Request classifier + cost-aware model routing with fallback |
|
|
195
|
+
| **Memory** | mem0 + Qdrant/Milvus (long-term) ยท Redis (sessions) ยท multi-tenant scopes |
|
|
196
|
+
| **Tools / MCP** | MCP servers over Stdio/SSE/StreamableHTTP, tool filtering, widget artifacts |
|
|
197
|
+
| **Temporal** | Durable, restart-safe workflows with human-in-the-loop gates |
|
|
198
|
+
| **Observability** | Langfuse traces, metrics, `@observe` decorators |
|
|
199
|
+
| **Evaluation** | Golden datasets + DeepEval / RAGAS metrics |
|
|
200
|
+
|
|
201
|
+
## ๐ Documentation
|
|
202
|
+
|
|
203
|
+
Full documentation lives at **[docs.continuum.shyftlabs.io](https://docs.continuum.shyftlabs.io/)** โ guides for building & running agents, Smart Inference, memory, tools/MCP, workflows, handoffs, streaming, evaluation, and the research behind it.
|
|
204
|
+
|
|
205
|
+
Markdown sources are also in [`docs/`](docs/) if you prefer reading on GitHub โ e.g. [`agent.md`](docs/agent.md), [`memory.md`](docs/memory.md), [`tools.md`](docs/tools.md), and the integration [`GUIDE.md`](docs/GUIDE.md).
|
|
206
|
+
|
|
207
|
+
## ๐งช Examples
|
|
208
|
+
|
|
209
|
+
Runnable demos live under [`playground/`](playground/):
|
|
210
|
+
|
|
211
|
+
- **`gateway-local-shop`** โ an MCP server + agent + chat UI for a pet-shop assistant (end-to-end: server โ agent โ UI).
|
|
212
|
+
- **`gateway-multi-agent-shop`** โ a multi-agent workflow variant with routing and handoffs.
|
|
213
|
+
- **`frontend/`** โ the demo web UIs (`assortment`, `commerce-chat`).
|
|
214
|
+
|
|
215
|
+
## ๐ค Contributing
|
|
216
|
+
|
|
217
|
+
Contributions are welcome! Please read [`CONTRIBUTING.md`](CONTRIBUTING.md) for the branch model, Conventional Commits, DCO sign-off, and local setup. By participating you agree to our [Code of Conduct](CODE_OF_CONDUCT.md).
|
|
218
|
+
|
|
219
|
+
- ๐ **Bugs & features** โ use the [issue templates](.github/ISSUE_TEMPLATE)
|
|
220
|
+
- ๐ฌ **Questions & ideas** โ [GitHub Discussions](https://github.com/shyftlabs/continuum/discussions)
|
|
221
|
+
- ๐ **Security** โ report privately via [`SECURITY.md`](SECURITY.md), never a public issue
|
|
222
|
+
|
|
223
|
+
## ๐ License
|
|
224
|
+
|
|
225
|
+
Licensed under the [Apache License, Version 2.0](LICENSE). Copyright ยฉ 2025โ2026 [ShyftLabs Inc.](https://shyftlabs.io/)
|
|
226
|
+
|
|
227
|
+
For commercial / enterprise inquiries โ SLAs, indemnification, hosted offerings, custom features โ contact **[continuum@shyftlabs.io](mailto:continuum@shyftlabs.io)**.
|
|
228
|
+
|
|
229
|
+
<div align="center">
|
|
230
|
+
<br />
|
|
231
|
+
<sub>Built with โค๏ธ by <a href="https://shyftlabs.io/">ShyftLabs</a> ยท <a href="mailto:continuum@shyftlabs.io">continuum@shyftlabs.io</a></sub>
|
|
232
|
+
</div>
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/continuum-logo-dark.png" />
|
|
5
|
+
<img src="docs/assets/continuum-logo.png" alt="Continuum" width="460" />
|
|
6
|
+
</picture>
|
|
7
|
+
|
|
8
|
+
##### by **[ShyftLabs](https://shyftlabs.io/)**
|
|
9
|
+
|
|
10
|
+
### The agent runtime for builders who ship.
|
|
11
|
+
|
|
12
|
+
Build, run, and deploy reliable AI agents at enterprise scale โ multi-LLM routing, persistent memory, MCP-native tools, durable workflows, and full observability, out of the box.
|
|
13
|
+
|
|
14
|
+
<br />
|
|
15
|
+
|
|
16
|
+
[](https://www.python.org/downloads/)
|
|
17
|
+
[](LICENSE)
|
|
18
|
+
[](https://github.com/shyftlabs/continuum/releases)
|
|
19
|
+
|
|
20
|
+
[](https://github.com/shyftlabs/continuum/actions/workflows/ci.yml)
|
|
21
|
+
[](https://docs.continuum.shyftlabs.io/)
|
|
22
|
+
[](CONTRIBUTING.md)
|
|
23
|
+
[](CODE_OF_CONDUCT.md)
|
|
24
|
+
|
|
25
|
+
[**๐ Documentation**](https://docs.continuum.shyftlabs.io/) ยท [**โก Quick start**](#-quick-start) ยท [**โ๏ธ Configuration**](#๏ธ-configuring-continuum) ยท [**๐งฉ Components**](#-components) ยท [**๐งช Examples**](#-examples) ยท [**๐ค Contributing**](CONTRIBUTING.md)
|
|
26
|
+
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
**Continuum** is a production-grade Python framework for building, orchestrating, and shipping autonomous AI agents at enterprise scale. It unifies a clean, typed agent core with cost-aware multi-model inference, stateful long- and short-term memory, open standards-based tool calling, durable execution, and end-to-end observability โ all behind one small, composable, type-safe API.
|
|
32
|
+
|
|
33
|
+
## โจ Features
|
|
34
|
+
|
|
35
|
+
- ๐ค **Agentic core & orchestration** โ a strongly-typed agent primitive with full lifecycle hooks, schema-validated structured outputs, and nine composable multi-agent patterns (sequential, parallel, loop, routing, planning, reflection, debate, scatter, supervised).
|
|
36
|
+
- ๐ **Smart Inference** โ cost-aware inference routing that classifies every request by complexity and dispatches it to the cheapest capable model, with seamless cross-provider failover and zero lock-in.
|
|
37
|
+
- ๐ง **Stateful memory** โ persistent semantic long-term recall plus low-latency working memory, with multi-tenant isolation scopes and built-in PII redaction for privacy-by-default agents.
|
|
38
|
+
- ๐ **Open tool calling** โ plug into any standards-based tool ecosystem (Model Context Protocol) across multiple transports, with fine-grained capability scoping, context capture/injection, and rich generative-UI artifacts.
|
|
39
|
+
- ๐ **Durable execution** โ long-running, crash- and restart-safe agent workflows with human-in-the-loop approval gates and exactly-once guarantees.
|
|
40
|
+
- ๐ญ **Full observability** โ first-class distributed tracing, token/latency/error telemetry, and one-line function instrumentation for complete run transparency.
|
|
41
|
+
- ๐ **Model-agnostic** โ target frontier or open-weight models through a single model string; swap providers without touching agent code.
|
|
42
|
+
- ๐ค **Multi-agent handoffs** โ context-preserving agent-to-agent delegation with history summarization, cycle detection, and depth control.
|
|
43
|
+
- ๐ก **Real-time streaming** โ token-, tool-, handoff-, and memory-level events streamed the moment they happen.
|
|
44
|
+
- โ
**Built-in evaluation** โ turn live production traces into golden datasets and regression-test agent quality with standard LLM-evaluation metrics.
|
|
45
|
+
|
|
46
|
+
## ๐ Quick start
|
|
47
|
+
|
|
48
|
+
**Requirements:** Python 3.13+ and Docker (for Redis ยท Milvus/Qdrant ยท Langfuse).
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
git clone https://github.com/shyftlabs/continuum.git
|
|
52
|
+
cd continuum
|
|
53
|
+
|
|
54
|
+
python3.13 -m venv .venv && source .venv/bin/activate
|
|
55
|
+
pip install -e .
|
|
56
|
+
|
|
57
|
+
cp .env.template .env # add your provider key(s) โ see Configuration below
|
|
58
|
+
docker compose up -d # Redis ยท Milvus/Qdrant ยท Langfuse
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Your first agent:
|
|
62
|
+
|
|
63
|
+
```python
|
|
64
|
+
import asyncio
|
|
65
|
+
from continuum.agent import BaseAgent, AgentRunner
|
|
66
|
+
|
|
67
|
+
async def main():
|
|
68
|
+
agent = BaseAgent(
|
|
69
|
+
name="hello-agent",
|
|
70
|
+
instructions="You are a friendly assistant.",
|
|
71
|
+
model="gpt-4o-mini",
|
|
72
|
+
)
|
|
73
|
+
runner = AgentRunner()
|
|
74
|
+
response = await runner.run(agent, "Hi!")
|
|
75
|
+
print(response.content)
|
|
76
|
+
|
|
77
|
+
asyncio.run(main())
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
`AgentRunner.run()` returns an `AgentResponse` with `content`, `structured_output`, `usage`, `tool_calls`, `run_artifacts`, `latency_ms`, and the full handoff chain. See the [**docs**](https://docs.continuum.shyftlabs.io/) for streaming, tools/MCP, memory, handoffs, and workflows.
|
|
81
|
+
|
|
82
|
+
## โ๏ธ Configuring Continuum
|
|
83
|
+
|
|
84
|
+
Continuum is configured through environment variables (copy [`.env.template`](.env.template) โ `.env`). Set keys only for the providers and components you use โ everything else has sensible defaults. The most common settings:
|
|
85
|
+
|
|
86
|
+
#### LLM providers & routing
|
|
87
|
+
|
|
88
|
+
| Variable | Description | Example |
|
|
89
|
+
|---|---|---|
|
|
90
|
+
| `OPENAI_API_KEY` / `ANTHROPIC_API_KEY` / `GEMINI_API_KEY` | Provider API keys โ set the one(s) you use | `sk-โฆ` |
|
|
91
|
+
| `DEFAULT_LLM_MODEL` | Default model (`provider/model`, or bare name for OpenAI) | `gemini/gemini-2.5-flash` |
|
|
92
|
+
| `FALLBACK_LLM_MODEL` | Model used if the default fails | `gpt-4o-mini` |
|
|
93
|
+
| `LLM_ENABLE_FALLBACK` | Automatically fall back on provider errors | `true` |
|
|
94
|
+
| `SMART_LAYER_ENABLED` | Enable cost-aware tier routing (Smart Inference) | `true` |
|
|
95
|
+
|
|
96
|
+
#### Memory (long-term) & embeddings
|
|
97
|
+
|
|
98
|
+
| Variable | Description | Example |
|
|
99
|
+
|---|---|---|
|
|
100
|
+
| `MEMORY_ENABLED` | Enable mem0-backed long-term memory | `true` |
|
|
101
|
+
| `VECTOR_STORE_PROVIDER` | Vector store backend | `qdrant` / `milvus` |
|
|
102
|
+
| `EMBEDDER_PROVIDER` / `EMBEDDER_MODEL` | Embedding provider & model | `openai` / `text-embedding-3-small` |
|
|
103
|
+
| `MEMORY_ISOLATION` | Scope of memory isolation | `user` / `agent` / `run` / `shared` |
|
|
104
|
+
|
|
105
|
+
#### Sessions (short-term)
|
|
106
|
+
|
|
107
|
+
| Variable | Description | Example |
|
|
108
|
+
|---|---|---|
|
|
109
|
+
| `SESSION_ENABLED` | Enable Redis-backed conversation sessions | `true` |
|
|
110
|
+
| `SESSION_REDIS_HOST` / `SESSION_REDIS_PORT` | Redis connection | `localhost` / `6380` |
|
|
111
|
+
| `SESSION_TTL_SECONDS` | Session lifetime | `172800` |
|
|
112
|
+
|
|
113
|
+
#### Observability (Langfuse)
|
|
114
|
+
|
|
115
|
+
| Variable | Description | Example |
|
|
116
|
+
|---|---|---|
|
|
117
|
+
| `LANGFUSE_ENABLED` | Enable tracing | `true` |
|
|
118
|
+
| `LANGFUSE_PUBLIC_KEY` / `LANGFUSE_SECRET_KEY` | Langfuse credentials | `pk-โฆ` / `sk-โฆ` |
|
|
119
|
+
| `LANGFUSE_HOST` | Langfuse endpoint | `http://localhost:3000` |
|
|
120
|
+
|
|
121
|
+
#### Temporal (optional, durable workflows)
|
|
122
|
+
|
|
123
|
+
| Variable | Description | Example |
|
|
124
|
+
|---|---|---|
|
|
125
|
+
| `TEMPORAL_ENABLED` | Enable durable workflow orchestration | `false` |
|
|
126
|
+
| `TEMPORAL_HOST` | Temporal frontend | `localhost:7233` |
|
|
127
|
+
|
|
128
|
+
> Optional extras: `pip install -e ".[temporal]"` for Temporal, `".[eval]"` for evaluation, `".[embeddings]"` for local embeddings. See [`.env.template`](.env.template) for the complete, annotated reference.
|
|
129
|
+
|
|
130
|
+
## ๐งฉ Components
|
|
131
|
+
|
|
132
|
+
| Component | What it does |
|
|
133
|
+
|---|---|
|
|
134
|
+
| **Agents** | `BaseAgent` + `AgentRunner` โ config, hooks, structured outputs, ReAct |
|
|
135
|
+
| **Workflows** | Nine multi-agent patterns for chaining, branching, looping, and self-improvement |
|
|
136
|
+
| **Smart Inference** | Request classifier + cost-aware model routing with fallback |
|
|
137
|
+
| **Memory** | mem0 + Qdrant/Milvus (long-term) ยท Redis (sessions) ยท multi-tenant scopes |
|
|
138
|
+
| **Tools / MCP** | MCP servers over Stdio/SSE/StreamableHTTP, tool filtering, widget artifacts |
|
|
139
|
+
| **Temporal** | Durable, restart-safe workflows with human-in-the-loop gates |
|
|
140
|
+
| **Observability** | Langfuse traces, metrics, `@observe` decorators |
|
|
141
|
+
| **Evaluation** | Golden datasets + DeepEval / RAGAS metrics |
|
|
142
|
+
|
|
143
|
+
## ๐ Documentation
|
|
144
|
+
|
|
145
|
+
Full documentation lives at **[docs.continuum.shyftlabs.io](https://docs.continuum.shyftlabs.io/)** โ guides for building & running agents, Smart Inference, memory, tools/MCP, workflows, handoffs, streaming, evaluation, and the research behind it.
|
|
146
|
+
|
|
147
|
+
Markdown sources are also in [`docs/`](docs/) if you prefer reading on GitHub โ e.g. [`agent.md`](docs/agent.md), [`memory.md`](docs/memory.md), [`tools.md`](docs/tools.md), and the integration [`GUIDE.md`](docs/GUIDE.md).
|
|
148
|
+
|
|
149
|
+
## ๐งช Examples
|
|
150
|
+
|
|
151
|
+
Runnable demos live under [`playground/`](playground/):
|
|
152
|
+
|
|
153
|
+
- **`gateway-local-shop`** โ an MCP server + agent + chat UI for a pet-shop assistant (end-to-end: server โ agent โ UI).
|
|
154
|
+
- **`gateway-multi-agent-shop`** โ a multi-agent workflow variant with routing and handoffs.
|
|
155
|
+
- **`frontend/`** โ the demo web UIs (`assortment`, `commerce-chat`).
|
|
156
|
+
|
|
157
|
+
## ๐ค Contributing
|
|
158
|
+
|
|
159
|
+
Contributions are welcome! Please read [`CONTRIBUTING.md`](CONTRIBUTING.md) for the branch model, Conventional Commits, DCO sign-off, and local setup. By participating you agree to our [Code of Conduct](CODE_OF_CONDUCT.md).
|
|
160
|
+
|
|
161
|
+
- ๐ **Bugs & features** โ use the [issue templates](.github/ISSUE_TEMPLATE)
|
|
162
|
+
- ๐ฌ **Questions & ideas** โ [GitHub Discussions](https://github.com/shyftlabs/continuum/discussions)
|
|
163
|
+
- ๐ **Security** โ report privately via [`SECURITY.md`](SECURITY.md), never a public issue
|
|
164
|
+
|
|
165
|
+
## ๐ License
|
|
166
|
+
|
|
167
|
+
Licensed under the [Apache License, Version 2.0](LICENSE). Copyright ยฉ 2025โ2026 [ShyftLabs Inc.](https://shyftlabs.io/)
|
|
168
|
+
|
|
169
|
+
For commercial / enterprise inquiries โ SLAs, indemnification, hosted offerings, custom features โ contact **[continuum@shyftlabs.io](mailto:continuum@shyftlabs.io)**.
|
|
170
|
+
|
|
171
|
+
<div align="center">
|
|
172
|
+
<br />
|
|
173
|
+
<sub>Built with โค๏ธ by <a href="https://shyftlabs.io/">ShyftLabs</a> ยท <a href="mailto:continuum@shyftlabs.io">continuum@shyftlabs.io</a></sub>
|
|
174
|
+
</div>
|