agent-company-core 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.
Files changed (55) hide show
  1. agent_company_core-0.1.0/.gitignore +22 -0
  2. agent_company_core-0.1.0/LICENSE +200 -0
  3. agent_company_core-0.1.0/PKG-INFO +357 -0
  4. agent_company_core-0.1.0/README.md +118 -0
  5. agent_company_core-0.1.0/SECURITY.md +39 -0
  6. agent_company_core-0.1.0/docs/integrations.md +24 -0
  7. agent_company_core-0.1.0/examples/basic.py +18 -0
  8. agent_company_core-0.1.0/pyproject.toml +74 -0
  9. agent_company_core-0.1.0/src/agent_company_core/__init__.py +54 -0
  10. agent_company_core-0.1.0/src/agent_company_core/agents/__init__.py +5 -0
  11. agent_company_core-0.1.0/src/agent_company_core/agents/registry.py +105 -0
  12. agent_company_core-0.1.0/src/agent_company_core/contracts/__init__.py +23 -0
  13. agent_company_core-0.1.0/src/agent_company_core/contracts/common.py +9 -0
  14. agent_company_core-0.1.0/src/agent_company_core/contracts/decision.py +40 -0
  15. agent_company_core-0.1.0/src/agent_company_core/contracts/mission.py +68 -0
  16. agent_company_core-0.1.0/src/agent_company_core/integrations/__init__.py +3 -0
  17. agent_company_core-0.1.0/src/agent_company_core/integrations/google.py +50 -0
  18. agent_company_core-0.1.0/src/agent_company_core/integrations/postgres.py +16 -0
  19. agent_company_core-0.1.0/src/agent_company_core/integrations/temporal.py +19 -0
  20. agent_company_core-0.1.0/src/agent_company_core/memory/__init__.py +5 -0
  21. agent_company_core-0.1.0/src/agent_company_core/memory/store.py +81 -0
  22. agent_company_core-0.1.0/src/agent_company_core/models/__init__.py +25 -0
  23. agent_company_core-0.1.0/src/agent_company_core/models/base.py +79 -0
  24. agent_company_core-0.1.0/src/agent_company_core/models/routing.py +66 -0
  25. agent_company_core-0.1.0/src/agent_company_core/observability/__init__.py +6 -0
  26. agent_company_core-0.1.0/src/agent_company_core/observability/audit.py +37 -0
  27. agent_company_core-0.1.0/src/agent_company_core/observability/redaction.py +27 -0
  28. agent_company_core-0.1.0/src/agent_company_core/orchestration/__init__.py +5 -0
  29. agent_company_core-0.1.0/src/agent_company_core/orchestration/engine.py +501 -0
  30. agent_company_core-0.1.0/src/agent_company_core/permissions/__init__.py +13 -0
  31. agent_company_core-0.1.0/src/agent_company_core/permissions/approvals.py +80 -0
  32. agent_company_core-0.1.0/src/agent_company_core/permissions/policy.py +63 -0
  33. agent_company_core-0.1.0/src/agent_company_core/persistence/__init__.py +5 -0
  34. agent_company_core-0.1.0/src/agent_company_core/persistence/sqlite.py +317 -0
  35. agent_company_core-0.1.0/src/agent_company_core/py.typed +0 -0
  36. agent_company_core-0.1.0/src/agent_company_core/reference/__init__.py +1 -0
  37. agent_company_core-0.1.0/src/agent_company_core/reference/app.py +178 -0
  38. agent_company_core-0.1.0/src/agent_company_core/runtime/__init__.py +5 -0
  39. agent_company_core-0.1.0/src/agent_company_core/runtime/stop_control.py +58 -0
  40. agent_company_core-0.1.0/src/agent_company_core/skills/__init__.py +5 -0
  41. agent_company_core-0.1.0/src/agent_company_core/skills/runner.py +70 -0
  42. agent_company_core-0.1.0/src/agent_company_core/tools/__init__.py +5 -0
  43. agent_company_core-0.1.0/src/agent_company_core/tools/registry.py +85 -0
  44. agent_company_core-0.1.0/tests/conftest.py +11 -0
  45. agent_company_core-0.1.0/tests/integration/test_approvals_and_fallback.py +88 -0
  46. agent_company_core-0.1.0/tests/integration/test_engine.py +41 -0
  47. agent_company_core-0.1.0/tests/integration/test_reference_app.py +18 -0
  48. agent_company_core-0.1.0/tests/unit/test_agents_tools.py +27 -0
  49. agent_company_core-0.1.0/tests/unit/test_contracts.py +14 -0
  50. agent_company_core-0.1.0/tests/unit/test_integrations.py +28 -0
  51. agent_company_core-0.1.0/tests/unit/test_persistence.py +23 -0
  52. agent_company_core-0.1.0/tests/unit/test_routing.py +22 -0
  53. agent_company_core-0.1.0/tests/unit/test_safety.py +36 -0
  54. agent_company_core-0.1.0/tests/unit/test_secret_scan.py +8 -0
  55. agent_company_core-0.1.0/tests/unit/test_skill_runner.py +28 -0
@@ -0,0 +1,22 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.egg-info/
4
+ .pytest_cache/
5
+ .ruff_cache/
6
+ .mypy_cache/
7
+ .coverage
8
+ htmlcov/
9
+ .venv/
10
+ dist/
11
+ dist2/
12
+ build/
13
+ *.sqlite3
14
+ *.db
15
+ /runtime/
16
+ .env
17
+ .env.*
18
+ !.env.example
19
+ *.log
20
+ .DS_Store
21
+ .idea/
22
+ .vscode/
@@ -0,0 +1,200 @@
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 Work
90
+ or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You meet
92
+ the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or Derivative Works
95
+ 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 that
101
+ You distribute, all copyright, patent, trademark, and attribution
102
+ notices from the Source form of the Work, excluding those notices
103
+ that do not pertain to any part of the Derivative Works; and
104
+
105
+ (d) If the Work includes a "NOTICE" text file as part of its
106
+ distribution, then any Derivative Works that You distribute must
107
+ include a readable copy of the attribution notices contained
108
+ within such NOTICE file, excluding those notices that do not
109
+ pertain to any part of the Derivative Works, in at least one
110
+ of the following places: within a NOTICE text file distributed
111
+ as part of the Derivative Works; within the Source form or
112
+ documentation, if provided along with the Derivative Works; or,
113
+ within a display generated by the Derivative Works, if and
114
+ wherever such third-party notices normally appear. The contents
115
+ of the NOTICE file are for informational purposes only and
116
+ do not modify the License. You may add Your own attribution
117
+ notices within Derivative Works that You distribute, alongside
118
+ or as an addendum to the NOTICE text from the Work, provided
119
+ that such additional attribution notices cannot be construed
120
+ as modifying the License.
121
+
122
+ You may add Your own copyright statement to Your modifications and
123
+ may provide additional or different license terms and conditions
124
+ for use, reproduction, or distribution of Your modifications, or
125
+ for any such Derivative Works as a whole, provided Your use,
126
+ reproduction, and distribution of the Work otherwise complies with
127
+ the conditions stated in this License.
128
+
129
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
130
+ any Contribution intentionally submitted for inclusion in the Work
131
+ by You to the Licensor shall be under the terms and conditions of
132
+ this License, without any additional terms or conditions.
133
+ Notwithstanding the above, nothing herein shall supersede or modify
134
+ the terms of any separate license agreement you may have executed
135
+ with Licensor regarding such Contributions.
136
+
137
+ 6. Trademarks. This License does not grant permission to use the trade
138
+ names, trademarks, service marks, or product names of the Licensor,
139
+ except as required for reasonable and customary use in describing the
140
+ origin of the Work and reproducing the content of the NOTICE file.
141
+
142
+ 7. Disclaimer of Warranty. Unless required by applicable law or
143
+ agreed to in writing, Licensor provides the Work (and each
144
+ Contributor provides its Contributions) on an "AS IS" BASIS,
145
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
146
+ implied, including, without limitation, any warranties or conditions
147
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
148
+ PARTICULAR PURPOSE. You are solely responsible for determining the
149
+ appropriateness of using or redistributing the Work and assume any
150
+ risks associated with Your exercise of permissions under this License.
151
+
152
+ 8. Limitation of Liability. In no event and under no legal theory,
153
+ whether in tort (including negligence), contract, or otherwise,
154
+ unless required by applicable law (such as deliberate and grossly
155
+ negligent acts) or agreed to in writing, shall any Contributor be
156
+ liable to You for damages, including any direct, indirect, special,
157
+ incidental, or consequential damages of any character arising as a
158
+ result of this License or out of the use or inability to use the
159
+ Work (including but not limited to damages for loss of goodwill,
160
+ work stoppage, computer failure or malfunction, or any and all
161
+ other commercial damages or losses), even if such Contributor
162
+ has been advised of the possibility of such damages.
163
+
164
+ 9. Accepting Warranty or Additional Liability. While redistributing
165
+ the Work or Derivative Works thereof, You may choose to offer,
166
+ and charge a fee for, acceptance of support, warranty, indemnity,
167
+ or other liability obligations and/or rights consistent with this
168
+ License. However, in accepting such obligations, You may act only
169
+ on Your own behalf and on Your sole responsibility, not on behalf
170
+ of any other Contributor, and only if You agree to indemnify,
171
+ defend, and hold each Contributor harmless for any liability
172
+ incurred by, or claims asserted against, such Contributor by reason
173
+ of your accepting any such warranty or additional liability.
174
+
175
+ END OF TERMS AND CONDITIONS
176
+
177
+ APPENDIX: How to apply the Apache License to your work.
178
+
179
+ To apply the Apache License to your work, attach the following
180
+ boilerplate notice, with the fields enclosed by brackets "[]"
181
+ replaced with your own identifying information. (Don't include
182
+ the brackets!) The text should be enclosed in the appropriate
183
+ comment syntax for the file format. We also recommend that a
184
+ file or class name and description of purpose be included on the
185
+ same "printed page" as the copyright notice for easier
186
+ identification within third-party archives.
187
+
188
+ Copyright [yyyy] [name of copyright owner]
189
+
190
+ Licensed under the Apache License, Version 2.0 (the "License");
191
+ you may not use this file except in compliance with the License.
192
+ You may obtain a copy of the License at
193
+
194
+ http://www.apache.org/licenses/LICENSE-2.0
195
+
196
+ Unless required by applicable law or agreed to in writing, software
197
+ distributed under the License is distributed on an "AS IS" BASIS,
198
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
199
+ See the License for the specific language governing permissions and
200
+ limitations under the License.
@@ -0,0 +1,357 @@
1
+ Metadata-Version: 2.4
2
+ Name: agent-company-core
3
+ Version: 0.1.0
4
+ Summary: Durable, policy-aware orchestration primitives for multi-agent systems
5
+ Author: agent-company-core contributors
6
+ License: Apache License
7
+ Version 2.0, January 2004
8
+ http://www.apache.org/licenses/
9
+
10
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
11
+
12
+ 1. Definitions.
13
+
14
+ "License" shall mean the terms and conditions for use, reproduction,
15
+ and distribution as defined by Sections 1 through 9 of this document.
16
+
17
+ "Licensor" shall mean the copyright owner or entity authorized by
18
+ the copyright owner that is granting the License.
19
+
20
+ "Legal Entity" shall mean the union of the acting entity and all
21
+ other entities that control, are controlled by, or are under common
22
+ control with that entity. For the purposes of this definition,
23
+ "control" means (i) the power, direct or indirect, to cause the
24
+ direction or management of such entity, whether by contract or
25
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
26
+ outstanding shares, or (iii) beneficial ownership of such entity.
27
+
28
+ "You" (or "Your") shall mean an individual or Legal Entity
29
+ exercising permissions granted by this License.
30
+
31
+ "Source" form shall mean the preferred form for making modifications,
32
+ including but not limited to software source code, documentation
33
+ source, and configuration files.
34
+
35
+ "Object" form shall mean any form resulting from mechanical
36
+ transformation or translation of a Source form, including but
37
+ not limited to compiled object code, generated documentation,
38
+ and conversions to other media types.
39
+
40
+ "Work" shall mean the work of authorship, whether in Source or
41
+ Object form, made available under the License, as indicated by a
42
+ copyright notice that is included in or attached to the work
43
+ (an example is provided in the Appendix below).
44
+
45
+ "Derivative Works" shall mean any work, whether in Source or Object
46
+ form, that is based on (or derived from) the Work and for which the
47
+ editorial revisions, annotations, elaborations, or other modifications
48
+ represent, as a whole, an original work of authorship. For the purposes
49
+ of this License, Derivative Works shall not include works that remain
50
+ separable from, or merely link (or bind by name) to the interfaces of,
51
+ the Work and Derivative Works thereof.
52
+
53
+ "Contribution" shall mean any work of authorship, including
54
+ the original version of the Work and any modifications or additions
55
+ to that Work or Derivative Works thereof, that is intentionally
56
+ submitted to Licensor for inclusion in the Work by the copyright owner
57
+ or by an individual or Legal Entity authorized to submit on behalf of
58
+ the copyright owner. For the purposes of this definition, "submitted"
59
+ means any form of electronic, verbal, or written communication sent
60
+ to the Licensor or its representatives, including but not limited to
61
+ communication on electronic mailing lists, source code control systems,
62
+ and issue tracking systems that are managed by, or on behalf of, the
63
+ Licensor for the purpose of discussing and improving the Work, but
64
+ excluding communication that is conspicuously marked or otherwise
65
+ designated in writing by the copyright owner as "Not a Contribution."
66
+
67
+ "Contributor" shall mean Licensor and any individual or Legal Entity
68
+ on behalf of whom a Contribution has been received by Licensor and
69
+ subsequently incorporated within the Work.
70
+
71
+ 2. Grant of Copyright License. Subject to the terms and conditions of
72
+ this License, each Contributor hereby grants to You a perpetual,
73
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
74
+ copyright license to reproduce, prepare Derivative Works of,
75
+ publicly display, publicly perform, sublicense, and distribute the
76
+ Work and such Derivative Works in Source or Object form.
77
+
78
+ 3. Grant of Patent License. Subject to the terms and conditions of
79
+ this License, each Contributor hereby grants to You a perpetual,
80
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
81
+ (except as stated in this section) patent license to make, have made,
82
+ use, offer to sell, sell, import, and otherwise transfer the Work,
83
+ where such license applies only to those patent claims licensable
84
+ by such Contributor that are necessarily infringed by their
85
+ Contribution(s) alone or by combination of their Contribution(s)
86
+ with the Work to which such Contribution(s) was submitted. If You
87
+ institute patent litigation against any entity (including a
88
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
89
+ or a Contribution incorporated within the Work constitutes direct
90
+ or contributory patent infringement, then any patent licenses
91
+ granted to You under this License for that Work shall terminate
92
+ as of the date such litigation is filed.
93
+
94
+ 4. Redistribution. You may reproduce and distribute copies of the Work
95
+ or Derivative Works thereof in any medium, with or without
96
+ modifications, and in Source or Object form, provided that You meet
97
+ the following conditions:
98
+
99
+ (a) You must give any other recipients of the Work or Derivative Works
100
+ a copy of this License; and
101
+
102
+ (b) You must cause any modified files to carry prominent notices
103
+ stating that You changed the files; and
104
+
105
+ (c) You must retain, in the Source form of any Derivative Works that
106
+ You distribute, all copyright, patent, trademark, and attribution
107
+ notices from the Source form of the Work, excluding those notices
108
+ that do not pertain to any part of the Derivative Works; and
109
+
110
+ (d) If the Work includes a "NOTICE" text file as part of its
111
+ distribution, then any Derivative Works that You distribute must
112
+ include a readable copy of the attribution notices contained
113
+ within such NOTICE file, excluding those notices that do not
114
+ pertain to any part of the Derivative Works, in at least one
115
+ of the following places: within a NOTICE text file distributed
116
+ as part of the Derivative Works; within the Source form or
117
+ documentation, if provided along with the Derivative Works; or,
118
+ within a display generated by the Derivative Works, if and
119
+ wherever such third-party notices normally appear. The contents
120
+ of the NOTICE file are for informational purposes only and
121
+ do not modify the License. You may add Your own attribution
122
+ notices within Derivative Works that You distribute, alongside
123
+ or as an addendum to the NOTICE text from the Work, provided
124
+ that such additional attribution notices cannot be construed
125
+ as modifying the License.
126
+
127
+ You may add Your own copyright statement to Your modifications and
128
+ may provide additional or different license terms and conditions
129
+ for use, reproduction, or distribution of Your modifications, or
130
+ for any such Derivative Works as a whole, provided Your use,
131
+ reproduction, and distribution of the Work otherwise complies with
132
+ the conditions stated in this License.
133
+
134
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
135
+ any Contribution intentionally submitted for inclusion in the Work
136
+ by You to the Licensor shall be under the terms and conditions of
137
+ this License, without any additional terms or conditions.
138
+ Notwithstanding the above, nothing herein shall supersede or modify
139
+ the terms of any separate license agreement you may have executed
140
+ with Licensor regarding such Contributions.
141
+
142
+ 6. Trademarks. This License does not grant permission to use the trade
143
+ names, trademarks, service marks, or product names of the Licensor,
144
+ except as required for reasonable and customary use in describing the
145
+ origin of the Work and reproducing the content of the NOTICE file.
146
+
147
+ 7. Disclaimer of Warranty. Unless required by applicable law or
148
+ agreed to in writing, Licensor provides the Work (and each
149
+ Contributor provides its Contributions) on an "AS IS" BASIS,
150
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
151
+ implied, including, without limitation, any warranties or conditions
152
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
153
+ PARTICULAR PURPOSE. You are solely responsible for determining the
154
+ appropriateness of using or redistributing the Work and assume any
155
+ risks associated with Your exercise of permissions under this License.
156
+
157
+ 8. Limitation of Liability. In no event and under no legal theory,
158
+ whether in tort (including negligence), contract, or otherwise,
159
+ unless required by applicable law (such as deliberate and grossly
160
+ negligent acts) or agreed to in writing, shall any Contributor be
161
+ liable to You for damages, including any direct, indirect, special,
162
+ incidental, or consequential damages of any character arising as a
163
+ result of this License or out of the use or inability to use the
164
+ Work (including but not limited to damages for loss of goodwill,
165
+ work stoppage, computer failure or malfunction, or any and all
166
+ other commercial damages or losses), even if such Contributor
167
+ has been advised of the possibility of such damages.
168
+
169
+ 9. Accepting Warranty or Additional Liability. While redistributing
170
+ the Work or Derivative Works thereof, You may choose to offer,
171
+ and charge a fee for, acceptance of support, warranty, indemnity,
172
+ or other liability obligations and/or rights consistent with this
173
+ License. However, in accepting such obligations, You may act only
174
+ on Your own behalf and on Your sole responsibility, not on behalf
175
+ of any other Contributor, and only if You agree to indemnify,
176
+ defend, and hold each Contributor harmless for any liability
177
+ incurred by, or claims asserted against, such Contributor by reason
178
+ of your accepting any such warranty or additional liability.
179
+
180
+ END OF TERMS AND CONDITIONS
181
+
182
+ APPENDIX: How to apply the Apache License to your work.
183
+
184
+ To apply the Apache License to your work, attach the following
185
+ boilerplate notice, with the fields enclosed by brackets "[]"
186
+ replaced with your own identifying information. (Don't include
187
+ the brackets!) The text should be enclosed in the appropriate
188
+ comment syntax for the file format. We also recommend that a
189
+ file or class name and description of purpose be included on the
190
+ same "printed page" as the copyright notice for easier
191
+ identification within third-party archives.
192
+
193
+ Copyright [yyyy] [name of copyright owner]
194
+
195
+ Licensed under the Apache License, Version 2.0 (the "License");
196
+ you may not use this file except in compliance with the License.
197
+ You may obtain a copy of the License at
198
+
199
+ http://www.apache.org/licenses/LICENSE-2.0
200
+
201
+ Unless required by applicable law or agreed to in writing, software
202
+ distributed under the License is distributed on an "AS IS" BASIS,
203
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
204
+ See the License for the specific language governing permissions and
205
+ limitations under the License.
206
+ License-File: LICENSE
207
+ Keywords: agents,approvals,durability,human-in-the-loop,orchestration
208
+ Classifier: Development Status :: 3 - Alpha
209
+ Classifier: Intended Audience :: Developers
210
+ Classifier: License :: OSI Approved :: Apache Software License
211
+ Classifier: Programming Language :: Python :: 3
212
+ Classifier: Programming Language :: Python :: 3 :: Only
213
+ Classifier: Programming Language :: Python :: 3.11
214
+ Classifier: Programming Language :: Python :: 3.12
215
+ Classifier: Programming Language :: Python :: 3.13
216
+ Classifier: Topic :: Software Development :: Libraries
217
+ Requires-Python: >=3.11
218
+ Requires-Dist: pydantic<3,>=2.7
219
+ Provides-Extra: app
220
+ Requires-Dist: fastapi<1,>=0.115; extra == 'app'
221
+ Requires-Dist: uvicorn[standard]<1,>=0.30; extra == 'app'
222
+ Provides-Extra: dev
223
+ Requires-Dist: build<2,>=1.2; extra == 'dev'
224
+ Requires-Dist: httpx<1,>=0.27; extra == 'dev'
225
+ Requires-Dist: mypy<2,>=1.11; extra == 'dev'
226
+ Requires-Dist: pip-audit<3,>=2.7; extra == 'dev'
227
+ Requires-Dist: pytest-asyncio<2,>=1; extra == 'dev'
228
+ Requires-Dist: pytest<10,>=9.0.3; extra == 'dev'
229
+ Requires-Dist: ruff<1,>=0.8; extra == 'dev'
230
+ Requires-Dist: twine<7,>=5; extra == 'dev'
231
+ Provides-Extra: google
232
+ Requires-Dist: google-genai<2,>=1.0; extra == 'google'
233
+ Provides-Extra: postgres
234
+ Requires-Dist: asyncpg<1,>=0.29; extra == 'postgres'
235
+ Requires-Dist: sqlalchemy[asyncio]<3,>=2; extra == 'postgres'
236
+ Provides-Extra: temporal
237
+ Requires-Dist: temporalio<2,>=1.7; extra == 'temporal'
238
+ Description-Content-Type: text/markdown
239
+
240
+ # agent-company-core
241
+
242
+ `agent-company-core` is an alpha Python framework for durable, policy-aware
243
+ multi-agent workflows. It provides reusable infrastructure for applications
244
+ that need typed decisions, persistent mission state, explicit approval
245
+ boundaries, cancellation and recovery controls, provider-neutral model
246
+ routing, memory interfaces, tool registration, and auditable execution.
247
+
248
+ It is not production-ready. The default runtime is intentionally small and
249
+ local: Pydantic contracts, SQLite, JSONL audit events, and a deterministic fake
250
+ model are enough to run the quickstart without cloud credentials.
251
+
252
+ ## Architecture
253
+
254
+ ```mermaid
255
+ flowchart LR
256
+ A[Application] --> E[MissionEngine]
257
+ E --> D[Typed AgentDecision]
258
+ E --> R[Structured Model Router]
259
+ R --> P[ModelProvider protocol]
260
+ E --> G[Risk and approval policy]
261
+ G --> T[ToolRegistry]
262
+ E --> S[StopControl]
263
+ E --> M[MemoryStore]
264
+ E --> DB[(SQLite default)]
265
+ E --> L[Append-only redacted audit]
266
+ P -. optional .-> V[Google adapter]
267
+ E -. optional .-> X[Temporal gateway]
268
+ ```
269
+
270
+ The model proposes an intention; the engine validates it and applies effects
271
+ through registered interfaces. Message text is not used as a hidden business
272
+ router. Routing and delegation consume typed assessments and declared
273
+ capabilities.
274
+
275
+ ## Installation
276
+
277
+ ```powershell
278
+ uv venv
279
+ uv pip install -e ".[dev,app]"
280
+ ```
281
+
282
+ Python 3.11 or newer is supported. The core package has only Pydantic as a
283
+ required dependency.
284
+
285
+ ## Five-minute quickstart
286
+
287
+ ```python
288
+ import asyncio
289
+ from pathlib import Path
290
+
291
+ from agent_company_core import MissionCreate, MissionEngine
292
+ from agent_company_core.persistence import SQLiteStore
293
+
294
+
295
+ async def main() -> None:
296
+ engine = MissionEngine(store=SQLiteStore(Path("runtime/state.sqlite3")))
297
+ mission = engine.create_mission(
298
+ MissionCreate(title="First mission", objective="Complete a harmless example")
299
+ )
300
+ result = await engine.run_mission(mission.id)
301
+ print(result.status, result.summary)
302
+
303
+
304
+ asyncio.run(main())
305
+ ```
306
+
307
+ This uses `FakeModel`, so it needs no API key and performs no external action.
308
+ The SQLite file, `stop.json`, and `audit.jsonl` are durable across process
309
+ restarts. For a small HTTP reference app, run:
310
+
311
+ ```powershell
312
+ ./start.ps1
313
+ Invoke-RestMethod http://127.0.0.1:8000/health
314
+ ./stop.ps1
315
+ ```
316
+
317
+ The reference app is a development example, not a production deployment.
318
+
319
+ ## Core capabilities
320
+
321
+ - Typed mission lifecycle and append-only mission events.
322
+ - Idempotent mission creation and durable checkpoints.
323
+ - Capability-based neutral agent registry with risk ceilings.
324
+ - Provider-neutral async model and embedding protocols, plus a fake provider.
325
+ - Deterministic risk policy and approvals that must match the requested effect.
326
+ - Persistent STOP state checked before model and tool effects.
327
+ - SQLite memory implementation behind a replaceable `MemoryStore` interface.
328
+ - Tool registry with explicit capabilities, handlers, risk metadata, and STOP checks.
329
+ - Recursive secret redaction before JSONL audit persistence.
330
+ - Experimental restricted local skill runner, disabled and untrusted by default.
331
+
332
+ ## Optional integrations
333
+
334
+ Install only what an application needs:
335
+
336
+ ```powershell
337
+ uv pip install -e ".[google]" # Google Gen AI adapter
338
+ uv pip install -e ".[temporal]" # Temporal client gateway
339
+ uv pip install -e ".[postgres]" # SQLAlchemy/asyncpg extension point
340
+ ```
341
+
342
+ The integrations are optional and are not needed by the test suite. The Google
343
+ adapter requires credentials supplied by the host application; credentials
344
+ are never included in this repository.
345
+
346
+ ## Development
347
+
348
+ ```powershell
349
+ uv pip install -e ".[dev,app]"
350
+ python -m pytest
351
+ ruff check src tests
352
+ mypy src
353
+ python -m build
354
+ ```
355
+
356
+ See [SECURITY.md](SECURITY.md), [CONTRIBUTING.md](CONTRIBUTING.md), and
357
+ [ROADMAP.md](ROADMAP.md) for current boundaries and unfinished work.