agentopology 0.1.0
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.
- package/LICENSE +191 -0
- package/README.md +450 -0
- package/dist/analyzer/__tests__/analyzer.test.d.ts +2 -0
- package/dist/analyzer/__tests__/analyzer.test.d.ts.map +1 -0
- package/dist/analyzer/__tests__/analyzer.test.js +258 -0
- package/dist/analyzer/__tests__/analyzer.test.js.map +1 -0
- package/dist/analyzer/index.d.ts +44 -0
- package/dist/analyzer/index.d.ts.map +1 -0
- package/dist/analyzer/index.js +308 -0
- package/dist/analyzer/index.js.map +1 -0
- package/dist/bindings/__tests__/bindings.test.d.ts +2 -0
- package/dist/bindings/__tests__/bindings.test.d.ts.map +1 -0
- package/dist/bindings/__tests__/bindings.test.js +2089 -0
- package/dist/bindings/__tests__/bindings.test.js.map +1 -0
- package/dist/bindings/claude-code.d.ts +12 -0
- package/dist/bindings/claude-code.d.ts.map +1 -0
- package/dist/bindings/claude-code.js +2063 -0
- package/dist/bindings/claude-code.js.map +1 -0
- package/dist/bindings/codex.d.ts +18 -0
- package/dist/bindings/codex.d.ts.map +1 -0
- package/dist/bindings/codex.js +1633 -0
- package/dist/bindings/codex.js.map +1 -0
- package/dist/bindings/copilot-cli.d.ts +20 -0
- package/dist/bindings/copilot-cli.d.ts.map +1 -0
- package/dist/bindings/copilot-cli.js +1515 -0
- package/dist/bindings/copilot-cli.js.map +1 -0
- package/dist/bindings/cursor.d.ts +17 -0
- package/dist/bindings/cursor.d.ts.map +1 -0
- package/dist/bindings/cursor.js +1715 -0
- package/dist/bindings/cursor.js.map +1 -0
- package/dist/bindings/gemini-cli.d.ts +18 -0
- package/dist/bindings/gemini-cli.d.ts.map +1 -0
- package/dist/bindings/gemini-cli.js +1327 -0
- package/dist/bindings/gemini-cli.js.map +1 -0
- package/dist/bindings/index.d.ts +20 -0
- package/dist/bindings/index.d.ts.map +1 -0
- package/dist/bindings/index.js +33 -0
- package/dist/bindings/index.js.map +1 -0
- package/dist/bindings/kiro.d.ts +17 -0
- package/dist/bindings/kiro.d.ts.map +1 -0
- package/dist/bindings/kiro.js +1624 -0
- package/dist/bindings/kiro.js.map +1 -0
- package/dist/bindings/openclaw.d.ts +18 -0
- package/dist/bindings/openclaw.d.ts.map +1 -0
- package/dist/bindings/openclaw.js +1578 -0
- package/dist/bindings/openclaw.js.map +1 -0
- package/dist/bindings/types.d.ts +33 -0
- package/dist/bindings/types.d.ts.map +1 -0
- package/dist/bindings/types.js +23 -0
- package/dist/bindings/types.js.map +1 -0
- package/dist/cli/index.d.ts +19 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +679 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/docs/__tests__/docs.test.d.ts +2 -0
- package/dist/docs/__tests__/docs.test.d.ts.map +1 -0
- package/dist/docs/__tests__/docs.test.js +438 -0
- package/dist/docs/__tests__/docs.test.js.map +1 -0
- package/dist/docs/content.d.ts +16 -0
- package/dist/docs/content.d.ts.map +1 -0
- package/dist/docs/content.js +3273 -0
- package/dist/docs/content.js.map +1 -0
- package/dist/docs/index.d.ts +17 -0
- package/dist/docs/index.d.ts.map +1 -0
- package/dist/docs/index.js +117 -0
- package/dist/docs/index.js.map +1 -0
- package/dist/exporters/__tests__/exporters.test.d.ts +2 -0
- package/dist/exporters/__tests__/exporters.test.d.ts.map +1 -0
- package/dist/exporters/__tests__/exporters.test.js +731 -0
- package/dist/exporters/__tests__/exporters.test.js.map +1 -0
- package/dist/exporters/index.d.ts +13 -0
- package/dist/exporters/index.d.ts.map +1 -0
- package/dist/exporters/index.js +18 -0
- package/dist/exporters/index.js.map +1 -0
- package/dist/exporters/json.d.ts +8 -0
- package/dist/exporters/json.d.ts.map +1 -0
- package/dist/exporters/json.js +25 -0
- package/dist/exporters/json.js.map +1 -0
- package/dist/exporters/markdown.d.ts +9 -0
- package/dist/exporters/markdown.d.ts.map +1 -0
- package/dist/exporters/markdown.js +686 -0
- package/dist/exporters/markdown.js.map +1 -0
- package/dist/exporters/mermaid.d.ts +11 -0
- package/dist/exporters/mermaid.d.ts.map +1 -0
- package/dist/exporters/mermaid.js +161 -0
- package/dist/exporters/mermaid.js.map +1 -0
- package/dist/exporters/types.d.ts +22 -0
- package/dist/exporters/types.d.ts.map +1 -0
- package/dist/exporters/types.js +10 -0
- package/dist/exporters/types.js.map +1 -0
- package/dist/import/__tests__/import.test.d.ts +2 -0
- package/dist/import/__tests__/import.test.d.ts.map +1 -0
- package/dist/import/__tests__/import.test.js +781 -0
- package/dist/import/__tests__/import.test.js.map +1 -0
- package/dist/import/claude-code.d.ts +38 -0
- package/dist/import/claude-code.d.ts.map +1 -0
- package/dist/import/claude-code.js +897 -0
- package/dist/import/claude-code.js.map +1 -0
- package/dist/import/index.d.ts +18 -0
- package/dist/import/index.d.ts.map +1 -0
- package/dist/import/index.js +28 -0
- package/dist/import/index.js.map +1 -0
- package/dist/import/serializer.d.ts +11 -0
- package/dist/import/serializer.d.ts.map +1 -0
- package/dist/import/serializer.js +960 -0
- package/dist/import/serializer.js.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/parser/__tests__/parser.test.d.ts +2 -0
- package/dist/parser/__tests__/parser.test.d.ts.map +1 -0
- package/dist/parser/__tests__/parser.test.js +6514 -0
- package/dist/parser/__tests__/parser.test.js.map +1 -0
- package/dist/parser/ast.d.ts +708 -0
- package/dist/parser/ast.d.ts.map +1 -0
- package/dist/parser/ast.js +12 -0
- package/dist/parser/ast.js.map +1 -0
- package/dist/parser/index.d.ts +253 -0
- package/dist/parser/index.d.ts.map +1 -0
- package/dist/parser/index.js +1985 -0
- package/dist/parser/index.js.map +1 -0
- package/dist/parser/lexer.d.ts +100 -0
- package/dist/parser/lexer.d.ts.map +1 -0
- package/dist/parser/lexer.js +304 -0
- package/dist/parser/lexer.js.map +1 -0
- package/dist/parser/validator.d.ts +42 -0
- package/dist/parser/validator.d.ts.map +1 -0
- package/dist/parser/validator.js +2568 -0
- package/dist/parser/validator.js.map +1 -0
- package/dist/scaffold/__tests__/scaffold.test.d.ts +7 -0
- package/dist/scaffold/__tests__/scaffold.test.d.ts.map +1 -0
- package/dist/scaffold/__tests__/scaffold.test.js +295 -0
- package/dist/scaffold/__tests__/scaffold.test.js.map +1 -0
- package/dist/scaffold/incremental.d.ts +43 -0
- package/dist/scaffold/incremental.d.ts.map +1 -0
- package/dist/scaffold/incremental.js +185 -0
- package/dist/scaffold/incremental.js.map +1 -0
- package/dist/scaffold/index.d.ts +13 -0
- package/dist/scaffold/index.d.ts.map +1 -0
- package/dist/scaffold/index.js +13 -0
- package/dist/scaffold/index.js.map +1 -0
- package/dist/scaffold/manifest.d.ts +30 -0
- package/dist/scaffold/manifest.d.ts.map +1 -0
- package/dist/scaffold/manifest.js +71 -0
- package/dist/scaffold/manifest.js.map +1 -0
- package/dist/scaffold/merge.d.ts +52 -0
- package/dist/scaffold/merge.d.ts.map +1 -0
- package/dist/scaffold/merge.js +134 -0
- package/dist/scaffold/merge.js.map +1 -0
- package/dist/scaffold/types.d.ts +51 -0
- package/dist/scaffold/types.d.ts.map +1 -0
- package/dist/scaffold/types.js +10 -0
- package/dist/scaffold/types.js.map +1 -0
- package/dist/sync/index.d.ts +34 -0
- package/dist/sync/index.d.ts.map +1 -0
- package/dist/sync/index.js +392 -0
- package/dist/sync/index.js.map +1 -0
- package/dist/visualizer/index.d.ts +17 -0
- package/dist/visualizer/index.d.ts.map +1 -0
- package/dist/visualizer/index.js +1976 -0
- package/dist/visualizer/index.js.map +1 -0
- package/examples/code-review.at +167 -0
- package/examples/data-processing.at +296 -0
- package/examples/openclaw-assistant.at +142 -0
- package/examples/scheduled-monitor.at +193 -0
- package/examples/simple-pipeline.at +163 -0
- package/package.json +77 -0
- package/skill/SKILL.md +403 -0
- package/skill/scripts/emit.ts +853 -0
- package/skill/scripts/visualize.ts +89 -0
- package/spec/grammar.md +1466 -0
- package/spec/reserved-keywords.md +147 -0
- package/spec/validation.md +535 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by the Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding any notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
Copyright 2025-2026 Nadav Naveh
|
|
180
|
+
|
|
181
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
182
|
+
you may not use this file except in compliance with the License.
|
|
183
|
+
You may obtain a copy of the License at
|
|
184
|
+
|
|
185
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
186
|
+
|
|
187
|
+
Unless required by applicable law or agreed to in writing, software
|
|
188
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
189
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
190
|
+
See the License for the specific language governing permissions and
|
|
191
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,450 @@
|
|
|
1
|
+
<h1 align="center">AgenTopology</h1>
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<strong>The Terraform for AI agents.</strong><br/>
|
|
5
|
+
Define your agent team once. Deploy to any platform.
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
<p align="center">
|
|
9
|
+
<a href="https://www.npmjs.com/package/agentopology"><img src="https://img.shields.io/npm/v/agentopology" alt="npm" /></a>
|
|
10
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache%202.0-blue" alt="license" /></a>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
<strong>Claude Code</strong> · <strong>OpenClaw</strong> · <strong>Codex</strong> · <strong>Cursor</strong> · <strong>Gemini CLI</strong> · <strong>Copilot</strong> · <strong>Kiro</strong>
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
<br/>
|
|
18
|
+
|
|
19
|
+
## The Problem
|
|
20
|
+
|
|
21
|
+
Building one AI agent is easy. Building a **team** of agents that actually works together is brutal.
|
|
22
|
+
|
|
23
|
+
You want a marketing team? A dev pipeline? A support squad? You spend hours wiring up AGENT.md files, soul.md configs, MCP servers, hooks, and scripts. You get it working in Claude Code. Then you need the same team in OpenClaw — and you start from scratch. Different config format. Different directory structure. Different conventions. Same agents, same logic, zero portability.
|
|
24
|
+
|
|
25
|
+
**OpenClaw alone** needs soul.md, skill files, channel configs, gateway setup, and workspace definitions — for each agent. Multiply that by 5 agents and you're maintaining 20+ files that you can't visualize, validate, or hand off to anyone.
|
|
26
|
+
|
|
27
|
+
And that's just the platform problem. The architecture problem is worse:
|
|
28
|
+
|
|
29
|
+
- **How do you see the big picture?** Your topology is scattered across 15 files in nested directories. No diagram. No single source of truth.
|
|
30
|
+
- **How do agents talk to each other?** You hack together file-based protocols or copy-paste context between prompts. There's no standard.
|
|
31
|
+
- **How do you enforce quality?** You want a gate between stages but there's no standard way to define one.
|
|
32
|
+
- **How do you move fast?** Every new agent means touching 5-12 files across multiple tools.
|
|
33
|
+
|
|
34
|
+
**AgenTopology fixes all of this.**
|
|
35
|
+
|
|
36
|
+
Write your agent team in one `.at` file. Marketing, development, support, copywriting — any team, any structure. Visualize it. Validate it. Scaffold it to any platform in one command.
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
topology code-review : [pipeline] {
|
|
40
|
+
agent researcher { model: sonnet tools: [Read, Grep, WebSearch] }
|
|
41
|
+
agent writer { model: sonnet tools: [Read, Write] }
|
|
42
|
+
agent reviewer { model: opus tools: [Read, Grep] }
|
|
43
|
+
|
|
44
|
+
flow {
|
|
45
|
+
researcher -> writer -> reviewer
|
|
46
|
+
reviewer -> writer [when reviewer.verdict == revise, max 2]
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
agentopology scaffold my-team.at --target claude-code # → .claude/agents/
|
|
53
|
+
agentopology scaffold my-team.at --target openclaw # → .openclaw/soul.md
|
|
54
|
+
agentopology scaffold my-team.at --target codex # → .codex/
|
|
55
|
+
agentopology scaffold my-team.at --target cursor # → .cursor/rules/
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
One file. Seven platforms. The topology IS the documentation.
|
|
59
|
+
|
|
60
|
+
<p align="center">
|
|
61
|
+
<img src="docs/visualizer-preview.png" alt="AgenTopology Visualizer" width="900" />
|
|
62
|
+
</p>
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## What It Does
|
|
67
|
+
|
|
68
|
+
AgenTopology is a **declarative language** (`.at` files) and a **CLI compiler** that transforms agent definitions into platform-native configuration files.
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
┌──────────────┐ ┌────────────┐ ┌─────────────────────┐
|
|
72
|
+
│ .at file │ ───▶ │ Parser & │ ───▶ │ Platform configs │
|
|
73
|
+
│ (you write) │ │ Validator │ │ (auto-generated) │
|
|
74
|
+
└──────────────┘ └────────────┘ └─────────────────────┘
|
|
75
|
+
├── .claude/agents/
|
|
76
|
+
├── .openclaw/
|
|
77
|
+
├── .codex/
|
|
78
|
+
├── .cursor/rules/
|
|
79
|
+
├── .github/agents/
|
|
80
|
+
├── .kiro/agents/
|
|
81
|
+
└── ...
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
You stop hand-maintaining config files. Your topology becomes the single source of truth.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Quick Start
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npm install -g agentopology
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Validate** — catch errors before you scaffold:
|
|
95
|
+
```bash
|
|
96
|
+
agentopology validate my-team.at
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**Scaffold** — generate platform configs:
|
|
100
|
+
```bash
|
|
101
|
+
agentopology scaffold my-team.at --target claude-code
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**Visualize** — see your topology as an interactive graph:
|
|
105
|
+
```bash
|
|
106
|
+
agentopology visualize my-team.at
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**List targets** — see all supported platforms:
|
|
110
|
+
```bash
|
|
111
|
+
agentopology targets
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## The Language
|
|
117
|
+
|
|
118
|
+
`.at` files are human-readable and version-controllable. Here's a real topology:
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
topology content-pipeline : [pipeline, human-gate] {
|
|
122
|
+
|
|
123
|
+
meta {
|
|
124
|
+
version: "1.0.0"
|
|
125
|
+
description: "Research, write, review — with quality gate"
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
agent researcher {
|
|
129
|
+
model: sonnet
|
|
130
|
+
description: "Gathers information and sources"
|
|
131
|
+
tools: [Read, Grep, WebSearch]
|
|
132
|
+
writes: ["workspace/research.md"]
|
|
133
|
+
prompt {
|
|
134
|
+
Search broadly for relevant sources.
|
|
135
|
+
Compile findings into structured research notes.
|
|
136
|
+
Include citations and source URLs.
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
agent writer {
|
|
141
|
+
model: sonnet
|
|
142
|
+
description: "Drafts content from research"
|
|
143
|
+
tools: [Read, Write]
|
|
144
|
+
reads: ["workspace/research.md"]
|
|
145
|
+
writes: ["workspace/draft.md"]
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
agent reviewer {
|
|
149
|
+
model: opus
|
|
150
|
+
description: "Reviews drafts for quality"
|
|
151
|
+
tools: [Read, Grep]
|
|
152
|
+
reads: ["workspace/draft.md"]
|
|
153
|
+
outputs: { verdict: approve | revise | reject }
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
gates {
|
|
157
|
+
gate quality-check {
|
|
158
|
+
after: reviewer
|
|
159
|
+
run: "scripts/check-quality.sh"
|
|
160
|
+
on-fail: halt
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
flow {
|
|
165
|
+
researcher -> writer -> reviewer
|
|
166
|
+
reviewer -> writer [when reviewer.verdict == revise, max 2]
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
This defines three agents, their tools and memory, a quality gate, and a flow with a conditional retry loop — all in 40 lines.
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Supported Platforms
|
|
176
|
+
|
|
177
|
+
| Target | Command | What It Generates |
|
|
178
|
+
|--------|---------|-------------------|
|
|
179
|
+
| **Claude Code** | `--target claude-code` | `.claude/agents/`, `.claude/skills/`, `.mcp.json`, `.claude/settings.json` |
|
|
180
|
+
| **OpenClaw** | `--target openclaw` | `.openclaw/soul.md`, `.openclaw/skills/`, `.openclaw/config.json` |
|
|
181
|
+
| **Codex** | `--target codex` | `.codex/config.toml`, `AGENTS.md` |
|
|
182
|
+
| **Cursor** | `--target cursor` | `.cursor/rules/*.mdc`, `.cursor/mcp.json`, `.cursor/hooks.json` |
|
|
183
|
+
| **Gemini CLI** | `--target gemini-cli` | `.gemini/`, `AGENTS.md` |
|
|
184
|
+
| **Copilot** | `--target copilot-cli` | `.github/agents/*.agent.md`, `.github/copilot-instructions.md` |
|
|
185
|
+
| **Kiro** | `--target kiro` | `.kiro/agents/*.json`, `.kiro/steering/` |
|
|
186
|
+
|
|
187
|
+
Every binding is ground-truth validated against real-world configs from production repos.
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Language Features
|
|
192
|
+
|
|
193
|
+
<table>
|
|
194
|
+
<tr>
|
|
195
|
+
<td width="50%">
|
|
196
|
+
|
|
197
|
+
**Agents & Models**
|
|
198
|
+
```
|
|
199
|
+
agent planner {
|
|
200
|
+
model: opus
|
|
201
|
+
tools: [Read, Write, Bash]
|
|
202
|
+
permissions: plan
|
|
203
|
+
thinking: high
|
|
204
|
+
thinking-budget: 4000
|
|
205
|
+
max-turns: 20
|
|
206
|
+
}
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
</td>
|
|
210
|
+
<td width="50%">
|
|
211
|
+
|
|
212
|
+
**Flow Graphs**
|
|
213
|
+
```
|
|
214
|
+
flow {
|
|
215
|
+
intake -> researcher
|
|
216
|
+
researcher -> writer
|
|
217
|
+
writer -> reviewer
|
|
218
|
+
reviewer -> writer [when verdict == revise, max 3]
|
|
219
|
+
reviewer -> done [when verdict == approve]
|
|
220
|
+
}
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
</td>
|
|
224
|
+
</tr>
|
|
225
|
+
<tr>
|
|
226
|
+
<td>
|
|
227
|
+
|
|
228
|
+
**Group Chats**
|
|
229
|
+
```
|
|
230
|
+
group debate-arena {
|
|
231
|
+
members: [pro, con]
|
|
232
|
+
speaker-selection: "round-robin"
|
|
233
|
+
max-rounds: 5
|
|
234
|
+
termination: "judge declares winner"
|
|
235
|
+
}
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
</td>
|
|
239
|
+
<td>
|
|
240
|
+
|
|
241
|
+
**Quality Gates**
|
|
242
|
+
```
|
|
243
|
+
gates {
|
|
244
|
+
gate security-scan {
|
|
245
|
+
after: builder
|
|
246
|
+
run: "scripts/security.sh"
|
|
247
|
+
checks: [vulnerabilities, secrets]
|
|
248
|
+
on-fail: halt
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
</td>
|
|
254
|
+
</tr>
|
|
255
|
+
<tr>
|
|
256
|
+
<td>
|
|
257
|
+
|
|
258
|
+
**Hooks & Events**
|
|
259
|
+
```
|
|
260
|
+
hooks {
|
|
261
|
+
hook format-on-save {
|
|
262
|
+
on: PostToolUse
|
|
263
|
+
matcher: "Write"
|
|
264
|
+
run: "scripts/format.sh"
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
</td>
|
|
270
|
+
<td>
|
|
271
|
+
|
|
272
|
+
**MCP Servers**
|
|
273
|
+
```
|
|
274
|
+
mcp-servers {
|
|
275
|
+
github {
|
|
276
|
+
command: "npx"
|
|
277
|
+
args: ["-y", "@mcp/server-github"]
|
|
278
|
+
env { TOKEN: "${GITHUB_TOKEN}" }
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
</td>
|
|
284
|
+
</tr>
|
|
285
|
+
</table>
|
|
286
|
+
|
|
287
|
+
Plus: schemas, artifacts, metering, circuit breakers, scale configs, depth levels, environment overrides, prompt variants, composition via imports, and [more](spec/grammar.md).
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
## Group Chats — Agents That Talk to Each Other
|
|
292
|
+
|
|
293
|
+
Groups aren't fan-out. They're real conversations. Each agent reads what others wrote and responds:
|
|
294
|
+
|
|
295
|
+
```
|
|
296
|
+
group design-review {
|
|
297
|
+
members: [architect, security-lead, tech-lead]
|
|
298
|
+
speaker-selection: "round-robin"
|
|
299
|
+
max-rounds: 3
|
|
300
|
+
termination: "consensus reached"
|
|
301
|
+
}
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
In Claude Code, this compiles to a **file-based protocol** — a shared transcript file that agents read and append to sequentially. No HTTP, no message bus. Just the filesystem as shared state.
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
308
|
+
## Interactive Skill — Build Teams in Minutes
|
|
309
|
+
|
|
310
|
+
AgenTopology ships with an **interactive skill** that turns Claude Code into a topology designer. You don't need to learn the `.at` syntax — just describe what you want and the skill builds it for you.
|
|
311
|
+
|
|
312
|
+
```bash
|
|
313
|
+
# Link the skill into your project
|
|
314
|
+
ln -s $(npm root -g)/agentopology/skill .claude/skills/agentopology
|
|
315
|
+
|
|
316
|
+
# Then in Claude Code:
|
|
317
|
+
/agentopology
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
```
|
|
321
|
+
┌─────────────────────────────────────┐
|
|
322
|
+
│ AgenTopology │
|
|
323
|
+
│ Build agent teams in minutes. │
|
|
324
|
+
├─────────────────────────────────────┤
|
|
325
|
+
│ │
|
|
326
|
+
│ build Design a new topology │
|
|
327
|
+
│ templates Pick a proven team │
|
|
328
|
+
│ validate Check an .at file │
|
|
329
|
+
│ scaffold Generate platform files│
|
|
330
|
+
│ visualize Open graph viewer │
|
|
331
|
+
│ │
|
|
332
|
+
└─────────────────────────────────────┘
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
Say "I want a marketing team with a researcher, copywriter, and editor" — the skill generates the `.at` file, validates it (29 rules), and scaffolds it to Claude Code, OpenClaw, Cursor, or any target. Full topology in under 2 minutes.
|
|
336
|
+
|
|
337
|
+
The skill abstracts the entire AgenTopology system. You focus on **what your team should do** — the skill handles the syntax, validation, and platform-specific config generation.
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
## Programmatic API
|
|
342
|
+
|
|
343
|
+
```typescript
|
|
344
|
+
import { parse, validate, bindings } from "agentopology";
|
|
345
|
+
|
|
346
|
+
// Parse
|
|
347
|
+
const ast = parse(atSource);
|
|
348
|
+
|
|
349
|
+
// Validate (29 built-in rules)
|
|
350
|
+
const issues = validate(ast);
|
|
351
|
+
|
|
352
|
+
// Scaffold
|
|
353
|
+
const files = bindings["claude-code"].scaffold(ast);
|
|
354
|
+
|
|
355
|
+
// Visualize
|
|
356
|
+
import { generateVisualization } from "agentopology";
|
|
357
|
+
const html = generateVisualization(ast);
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
---
|
|
361
|
+
|
|
362
|
+
## Create Your Own Binding
|
|
363
|
+
|
|
364
|
+
Implement the `BindingTarget` interface to add any platform:
|
|
365
|
+
|
|
366
|
+
```typescript
|
|
367
|
+
import type { BindingTarget } from "agentopology";
|
|
368
|
+
|
|
369
|
+
export const myBinding: BindingTarget = {
|
|
370
|
+
name: "my-platform",
|
|
371
|
+
description: "My AI Platform",
|
|
372
|
+
scaffold(ast) {
|
|
373
|
+
return [
|
|
374
|
+
{ path: "agents.json", content: JSON.stringify(ast.nodes) },
|
|
375
|
+
];
|
|
376
|
+
},
|
|
377
|
+
};
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
---
|
|
381
|
+
|
|
382
|
+
## Focus on Structure, Not Config Files
|
|
383
|
+
|
|
384
|
+
The `.at` file IS your architecture diagram. When you open it, you see:
|
|
385
|
+
- Who the agents are
|
|
386
|
+
- What tools they have
|
|
387
|
+
- How work flows between them
|
|
388
|
+
- Where the quality gates are
|
|
389
|
+
- What happens when things fail
|
|
390
|
+
|
|
391
|
+
You can `agentopology visualize` it into an interactive graph. You can hand it to a new team member and they understand the system in 30 seconds. Try doing that with 15 scattered AGENT.md files.
|
|
392
|
+
|
|
393
|
+
| | Config files | AgenTopology |
|
|
394
|
+
|---|---|---|
|
|
395
|
+
| **Switch platforms** | Rewrite everything | Change `--target` |
|
|
396
|
+
| **Add an agent** | Update 5-12 files across 3 tools | Add 4 lines to `.at` file |
|
|
397
|
+
| **See the architecture** | Read YAML, JSON, TOML, Markdown across 6 dirs | One `.at` file. Or `visualize` it. |
|
|
398
|
+
| **Validate** | Hope for the best | 29 built-in rules catch errors before deploy |
|
|
399
|
+
| **Onboard someone** | "Read these 15 files and figure it out" | "Read this `.at` file" |
|
|
400
|
+
| **Version control** | Diff 47 generated files | Diff one `.at` file |
|
|
401
|
+
| **Move to a new tool** | Start over | `--target new-tool` |
|
|
402
|
+
|
|
403
|
+
---
|
|
404
|
+
|
|
405
|
+
## Examples
|
|
406
|
+
|
|
407
|
+
- [`simple-pipeline.at`](examples/simple-pipeline.at) — Research → write → review with quality gate
|
|
408
|
+
- [`code-review.at`](examples/code-review.at) — Multi-agent code review with security scanning
|
|
409
|
+
- [`data-processing.at`](examples/data-processing.at) — ETL pipeline with batch processing and metering
|
|
410
|
+
- [`scheduled-monitor.at`](examples/scheduled-monitor.at) — Monitoring system with scheduled health checks
|
|
411
|
+
- [`openclaw-assistant.at`](examples/openclaw-assistant.at) — Customer support with routing and scheduling
|
|
412
|
+
|
|
413
|
+
---
|
|
414
|
+
|
|
415
|
+
## CLI Reference
|
|
416
|
+
|
|
417
|
+
```
|
|
418
|
+
agentopology validate <file> Validate an .at file
|
|
419
|
+
agentopology scaffold <file> --target <t> Generate platform configs
|
|
420
|
+
agentopology visualize <file> Interactive topology graph
|
|
421
|
+
agentopology targets List supported platforms
|
|
422
|
+
agentopology docs [topic] Language reference
|
|
423
|
+
agentopology info <file> Topology summary
|
|
424
|
+
agentopology export <file> --format json Export AST as JSON
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
---
|
|
428
|
+
|
|
429
|
+
## Contributing
|
|
430
|
+
|
|
431
|
+
We welcome contributions. The easiest ways to start:
|
|
432
|
+
|
|
433
|
+
- Add a new [example topology](examples/)
|
|
434
|
+
- Improve a [binding](src/bindings/)
|
|
435
|
+
- Add [tests](src/bindings/__tests__/)
|
|
436
|
+
- Write [documentation](docs/)
|
|
437
|
+
|
|
438
|
+
Grammar and AST changes require an RFC.
|
|
439
|
+
|
|
440
|
+
---
|
|
441
|
+
|
|
442
|
+
## License
|
|
443
|
+
|
|
444
|
+
Apache 2.0 — see [LICENSE](LICENSE).
|
|
445
|
+
|
|
446
|
+
---
|
|
447
|
+
|
|
448
|
+
<p align="center">
|
|
449
|
+
<sub>Created by <a href="https://github.com/nadavnaveh">Nadav Naveh</a></sub>
|
|
450
|
+
</p>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analyzer.test.d.ts","sourceRoot":"","sources":["../../../src/analyzer/__tests__/analyzer.test.ts"],"names":[],"mappings":""}
|