@lloyal-labs/lloyal-agents 2.1.0 → 3.0.1
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 +107 -0
- package/LICENSE-FAQ.md +256 -0
- package/README.md +64 -26
- package/dist/Agent.d.ts +13 -2
- package/dist/Agent.d.ts.map +1 -1
- package/dist/Agent.js +10 -0
- package/dist/Agent.js.map +1 -1
- package/dist/AgentPolicy.d.ts +84 -7
- package/dist/AgentPolicy.d.ts.map +1 -1
- package/dist/AgentPolicy.js +32 -4
- package/dist/AgentPolicy.js.map +1 -1
- package/dist/Tool.d.ts +44 -0
- package/dist/Tool.d.ts.map +1 -1
- package/dist/Tool.js +49 -1
- package/dist/Tool.js.map +1 -1
- package/dist/agent-pool.d.ts.map +1 -1
- package/dist/agent-pool.js +187 -16
- package/dist/agent-pool.js.map +1 -1
- package/dist/app-config.d.ts +50 -0
- package/dist/app-config.d.ts.map +1 -0
- package/dist/app-config.js +27 -0
- package/dist/app-config.js.map +1 -0
- package/dist/app-types.d.ts +309 -0
- package/dist/app-types.d.ts.map +1 -0
- package/dist/app-types.js +28 -0
- package/dist/app-types.js.map +1 -0
- package/dist/chunk.d.ts +118 -0
- package/dist/chunk.d.ts.map +1 -0
- package/dist/chunk.js +19 -0
- package/dist/chunk.js.map +1 -0
- package/dist/context.d.ts +68 -12
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +64 -12
- package/dist/context.js.map +1 -1
- package/dist/create-agent-pool.d.ts +10 -4
- package/dist/create-agent-pool.d.ts.map +1 -1
- package/dist/create-agent-pool.js +7 -6
- package/dist/create-agent-pool.js.map +1 -1
- package/dist/grant-store.d.ts +49 -0
- package/dist/grant-store.d.ts.map +1 -0
- package/dist/grant-store.js +33 -0
- package/dist/grant-store.js.map +1 -0
- package/dist/index.d.ts +7 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/orchestrators.d.ts +7 -0
- package/dist/orchestrators.d.ts.map +1 -1
- package/dist/orchestrators.js.map +1 -1
- package/dist/source.d.ts +31 -1
- package/dist/source.d.ts.map +1 -1
- package/dist/source.js +32 -2
- package/dist/source.js.map +1 -1
- package/dist/spine.d.ts +0 -6
- package/dist/spine.d.ts.map +1 -1
- package/dist/spine.js +18 -2
- package/dist/spine.js.map +1 -1
- package/dist/toolkit.d.ts +44 -17
- package/dist/toolkit.d.ts.map +1 -1
- package/dist/toolkit.js +24 -14
- package/dist/toolkit.js.map +1 -1
- package/dist/trace-types.d.ts +34 -2
- package/dist/trace-types.d.ts.map +1 -1
- package/dist/types.d.ts +27 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/use-agent.d.ts +9 -4
- package/dist/use-agent.d.ts.map +1 -1
- package/dist/use-agent.js +15 -12
- package/dist/use-agent.js.map +1 -1
- package/package.json +7 -5
package/LICENSE
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Functional Source License, Version 1.1, Apache 2.0 Future License
|
|
2
|
+
|
|
3
|
+
## Abbreviation
|
|
4
|
+
|
|
5
|
+
FSL-1.1-Apache-2.0
|
|
6
|
+
|
|
7
|
+
## Notice
|
|
8
|
+
|
|
9
|
+
Copyright 2026 Lloyal Labs
|
|
10
|
+
|
|
11
|
+
## Terms and Conditions
|
|
12
|
+
|
|
13
|
+
### Licensor ("We")
|
|
14
|
+
|
|
15
|
+
The party offering the Software under these Terms and Conditions.
|
|
16
|
+
|
|
17
|
+
### The Software
|
|
18
|
+
|
|
19
|
+
The "Software" is each version of the software that we make available under
|
|
20
|
+
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
+
Conditions with the Software.
|
|
22
|
+
|
|
23
|
+
### License Grant
|
|
24
|
+
|
|
25
|
+
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
+
Redistribution and Trademark clauses below, we hereby grant you the right to
|
|
27
|
+
use, copy, modify, create derivative works, publish, and distribute the
|
|
28
|
+
Software for any Permitted Purpose identified below.
|
|
29
|
+
|
|
30
|
+
### Permitted Purpose
|
|
31
|
+
|
|
32
|
+
A "Permitted Purpose" is any purpose other than a Competing Use. A
|
|
33
|
+
"Competing Use" means making the Software available to others in a
|
|
34
|
+
commercial product or service that:
|
|
35
|
+
|
|
36
|
+
1. substitutes for the Software;
|
|
37
|
+
|
|
38
|
+
2. substitutes for any other product or service we offer using the Software
|
|
39
|
+
that exists as of the date we make the Software available; or
|
|
40
|
+
|
|
41
|
+
3. offers the same or substantially similar functionality as the Software.
|
|
42
|
+
|
|
43
|
+
Permitted Purposes specifically include using the Software:
|
|
44
|
+
|
|
45
|
+
1. for your internal use and access;
|
|
46
|
+
|
|
47
|
+
2. for non-commercial education;
|
|
48
|
+
|
|
49
|
+
3. for non-commercial research; and
|
|
50
|
+
|
|
51
|
+
4. in connection with professional services that you provide to a Licensee
|
|
52
|
+
using the Software in accordance with these Terms and Conditions.
|
|
53
|
+
|
|
54
|
+
### Patents
|
|
55
|
+
|
|
56
|
+
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
+
patents, the license grant above includes a license under our patents. If you
|
|
58
|
+
make a claim against any party that the Software infringes or contributes to
|
|
59
|
+
the infringement of any patent, then your patent license to the Software ends
|
|
60
|
+
immediately.
|
|
61
|
+
|
|
62
|
+
### Redistribution
|
|
63
|
+
|
|
64
|
+
The Terms and Conditions apply to all copies, modifications and derivatives
|
|
65
|
+
of the Software.
|
|
66
|
+
|
|
67
|
+
If you redistribute any copies, modifications or derivatives of the Software,
|
|
68
|
+
you must include a copy of or a link to these Terms and Conditions and not
|
|
69
|
+
remove any copyright notices provided in or with the Software.
|
|
70
|
+
|
|
71
|
+
### Disclaimer
|
|
72
|
+
|
|
73
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND,
|
|
74
|
+
INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE,
|
|
75
|
+
MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
|
|
76
|
+
|
|
77
|
+
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO
|
|
78
|
+
THE SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
|
|
79
|
+
DAMAGES, EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
80
|
+
|
|
81
|
+
### Trademarks
|
|
82
|
+
|
|
83
|
+
Except for displaying the License Details and identifying us as the origin of
|
|
84
|
+
the Software, you have no right under these Terms and Conditions to use our
|
|
85
|
+
trademarks, trade names, service marks or product names.
|
|
86
|
+
|
|
87
|
+
## Grant of Future License
|
|
88
|
+
|
|
89
|
+
We hereby irrevocably grant you an additional license to use the Software
|
|
90
|
+
under the Apache License, Version 2.0 that is effective on the second
|
|
91
|
+
anniversary of the date we make the Software available. On or after that
|
|
92
|
+
date, you may use the Software under the Apache License, Version 2.0, in
|
|
93
|
+
which case the following will apply:
|
|
94
|
+
|
|
95
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
|
96
|
+
use this file except in compliance with the License.
|
|
97
|
+
|
|
98
|
+
You may obtain a copy of the License at
|
|
99
|
+
|
|
100
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
101
|
+
|
|
102
|
+
Unless required by applicable law or agreed to in writing, software
|
|
103
|
+
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
104
|
+
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
105
|
+
|
|
106
|
+
See the License for the specific language governing permissions and
|
|
107
|
+
limitations under the License.
|
package/LICENSE-FAQ.md
ADDED
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
# Licensing FAQ
|
|
2
|
+
|
|
3
|
+
> Canonical version at https://docs.lloyal.ai/licensing/faq.
|
|
4
|
+
> This file is a synced copy. Edit the canonical source and re-run
|
|
5
|
+
> `scripts/sync-license-faq.sh` in lloyal-sdk to update all copies.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
**You can build and sell commercial products using HDK.**
|
|
9
|
+
|
|
10
|
+
> HDK is free to build products with; it is not free to become the
|
|
11
|
+
> replacement HDK platform.
|
|
12
|
+
|
|
13
|
+
That single sentence is the entire restriction reduced to one line. The rest
|
|
14
|
+
of this page is illustration.
|
|
15
|
+
|
|
16
|
+
## The short version
|
|
17
|
+
|
|
18
|
+
HDK 3.0 runtime packages — `liblloyal`, `lloyal-node`, and the lloyal-sdk
|
|
19
|
+
packages (`agents`, `sdk`, `rig`, `apps/corpus`, `apps/web`) — are
|
|
20
|
+
source-available under **FSL-1.1-Apache-2.0** (the Functional Source License,
|
|
21
|
+
Apache 2.0 future grant). FSL is a [Fair Source](https://fair.io) license.
|
|
22
|
+
|
|
23
|
+
Each version converts to Apache 2.0 two years after its release. The
|
|
24
|
+
restriction during those two years is narrow: **you cannot offer a competing
|
|
25
|
+
HDK runtime, a managed HDK service, or an alternative HDK App distribution
|
|
26
|
+
channel.** Everything else — commercial use, redistribution, modification,
|
|
27
|
+
sale, embedding in shipped products — is freely permitted.
|
|
28
|
+
|
|
29
|
+
The reason the channel restriction exists is consumer-protective: every App
|
|
30
|
+
listed on `apps.lloyal.ai` is reviewed by Lloyal Labs for tool-safety,
|
|
31
|
+
manifest conformance, and signature provenance before publication. Pinning
|
|
32
|
+
the App ecosystem to one verified channel keeps the AI-safety review meaningful
|
|
33
|
+
(consumers can rely on a single trust boundary) and prevents protocol
|
|
34
|
+
fragmentation (an App that works on one harness works on every harness).
|
|
35
|
+
|
|
36
|
+
The `harness.dev` CLI and `hdk-create-app` scaffolder are licensed under
|
|
37
|
+
**Apache 2.0** (unrestricted). They're not part of the runtime stack.
|
|
38
|
+
|
|
39
|
+
## Can I ship a commercial product built on HDK?
|
|
40
|
+
|
|
41
|
+
**Yes.** This is the question everyone has and the answer is straightforward.
|
|
42
|
+
Concretely:
|
|
43
|
+
|
|
44
|
+
- **Shipping a paid intelligent inbox app to consumers** — permitted ✅
|
|
45
|
+
- **Selling an Excel-with-AI desktop app to enterprises** — permitted ✅
|
|
46
|
+
- **Embedding HDK in a medical device sold commercially** — permitted ✅
|
|
47
|
+
- **A consulting firm building a custom intelligent harness for a Fortune
|
|
48
|
+
500 client, charging $500K for the engagement, deploying on client
|
|
49
|
+
infrastructure** — permitted ✅
|
|
50
|
+
- **An indie dev shipping a paid productivity app on the Mac App Store** —
|
|
51
|
+
permitted ✅
|
|
52
|
+
- **An OEM shipping HDK inside an infotainment system or industrial device**
|
|
53
|
+
— permitted ✅
|
|
54
|
+
- **A startup building an end-user product on top of HDK** — including
|
|
55
|
+
vertical research apps, workflow tools, and agent applications — permitted
|
|
56
|
+
✅, *as long as the product is not offering HDK itself as a substitute
|
|
57
|
+
runtime, managed HDK service, or competing App distribution channel*.
|
|
58
|
+
- **A research lab using HDK in published academic work** — permitted ✅
|
|
59
|
+
- **Forking HDK on GitHub to learn, modify, demo, or contribute** — permitted ✅
|
|
60
|
+
- **Running HDK internally inside your company for any business use** —
|
|
61
|
+
permitted ✅
|
|
62
|
+
|
|
63
|
+
If you are building something *with* HDK, you are almost certainly fine.
|
|
64
|
+
|
|
65
|
+
## What is actually restricted?
|
|
66
|
+
|
|
67
|
+
The restriction is narrow and specific: **don't become the replacement
|
|
68
|
+
platform vendor**. Concretely:
|
|
69
|
+
|
|
70
|
+
- **AWS / Google / Microsoft launching "Bedrock Managed HDK" or "Vertex HDK"
|
|
71
|
+
as a hosted runtime service** — restricted ❌
|
|
72
|
+
- **A competitor publishing "OpenHDK" as a forked harness runtime under a
|
|
73
|
+
different name** — restricted ❌
|
|
74
|
+
- **A clean-room reimplementation of the HDK runtime in Python / Rust / Go
|
|
75
|
+
intended as a drop-in replacement** — restricted ❌ (Competing Use doesn't
|
|
76
|
+
require forking source code — a reimplementation that competes is the
|
|
77
|
+
same problem)
|
|
78
|
+
- **Launching `apps.competitor.com` as an alternative HDK App distribution
|
|
79
|
+
channel** — restricted ❌
|
|
80
|
+
- **Offering "managed HDK hosting" or "HDK-as-a-Service" as a competing
|
|
81
|
+
SaaS** — restricted ❌
|
|
82
|
+
- **A hosted orchestration service exposing HDK-compatible APIs as a
|
|
83
|
+
substitute for the HDK runtime** — restricted ❌
|
|
84
|
+
|
|
85
|
+
Notice the pattern: every restricted scenario is "become the platform
|
|
86
|
+
vendor," not "build products with HDK." If your project doesn't compete
|
|
87
|
+
directly with the HDK runtime or its distribution channel, FSL doesn't
|
|
88
|
+
affect you.
|
|
89
|
+
|
|
90
|
+
## Why does the LICENSE list four narrow Permitted Purposes then?
|
|
91
|
+
|
|
92
|
+
You may read the FSL LICENSE and see this section:
|
|
93
|
+
|
|
94
|
+
> Permitted Purposes specifically include using the Software:
|
|
95
|
+
> 1. for your internal use and access;
|
|
96
|
+
> 2. for non-commercial education;
|
|
97
|
+
> 3. for non-commercial research; and
|
|
98
|
+
> 4. in connection with professional services that you provide to a
|
|
99
|
+
> Licensee using the Software in accordance with these Terms and
|
|
100
|
+
> Conditions.
|
|
101
|
+
|
|
102
|
+
A careful first reading can mistake this list for the *exclusive* set of
|
|
103
|
+
permitted uses — leading to the (incorrect) conclusion that commercial
|
|
104
|
+
product distribution is prohibited.
|
|
105
|
+
|
|
106
|
+
It isn't. **The operative definition is broader.** Earlier in the same
|
|
107
|
+
section, the license states:
|
|
108
|
+
|
|
109
|
+
> A "Permitted Purpose" is any purpose other than a Competing Use.
|
|
110
|
+
|
|
111
|
+
The four enumerated items are **illustrative examples** added because those
|
|
112
|
+
specific cases are ones a careful reader might otherwise hesitate about
|
|
113
|
+
("is research permitted? is consulting permitted?"). The four items are
|
|
114
|
+
additive clarifications, not a closing of the open-ended definition.
|
|
115
|
+
|
|
116
|
+
Sentry, who authored FSL and uses it on their own software, [confirms this
|
|
117
|
+
explicitly in their FAQ](https://fsl.software):
|
|
118
|
+
|
|
119
|
+
> "You can do anything with FSL software except undermine its producer. You
|
|
120
|
+
> can run it for almost all purposes, study it, modify it, and distribute
|
|
121
|
+
> your changes…"
|
|
122
|
+
|
|
123
|
+
If the license felt restrictive on first read, that's a documented
|
|
124
|
+
[FSL adoption hazard](https://fair.io) — many developers hit the same wall.
|
|
125
|
+
The answer is to read the "any purpose other than a Competing Use" line as
|
|
126
|
+
the operative definition and treat the four enumerated items as examples,
|
|
127
|
+
not as a closed list.
|
|
128
|
+
|
|
129
|
+
## Will it become Apache 2.0?
|
|
130
|
+
|
|
131
|
+
**Yes — automatically, on a per-version schedule.** Each released version of
|
|
132
|
+
the runtime stack converts to Apache 2.0 exactly two years after its release
|
|
133
|
+
date. The conversion is irrevocable and written into the license text — it's
|
|
134
|
+
not a promise from Lloyal Labs, it's a contractual clause.
|
|
135
|
+
|
|
136
|
+
For example: if `lloyal-sdk @lloyal-labs/lloyal-agents` v3.0.0 is released
|
|
137
|
+
on 2026-06-01, that exact version becomes available under Apache 2.0 on
|
|
138
|
+
2028-06-01. Any consumer can elect to use that version under Apache 2.0
|
|
139
|
+
from that date forward — Lloyal Labs takes no action; the grant is
|
|
140
|
+
automatic.
|
|
141
|
+
|
|
142
|
+
New versions released after v3.0.0 start their own two-year clock from
|
|
143
|
+
their own release dates. There is no single global Change Date.
|
|
144
|
+
|
|
145
|
+
## Is this OSI-approved open source?
|
|
146
|
+
|
|
147
|
+
**No, and we want to be honest about that.** FSL is not OSI-approved
|
|
148
|
+
because the OSI definition of open source (clause 6, "No Discrimination
|
|
149
|
+
Against Fields of Endeavor") does not permit restrictions on specific
|
|
150
|
+
use cases. FSL restricts Competing Use. That restriction takes it out of
|
|
151
|
+
strict OSI compliance.
|
|
152
|
+
|
|
153
|
+
FSL falls under the [Fair Source](https://fair.io) classification —
|
|
154
|
+
source-available licenses that are explicitly developer-friendly:
|
|
155
|
+
commercial use permitted, free redistribution, eventual open-source
|
|
156
|
+
conversion. Fair Source is a more developer-friendly framing than the
|
|
157
|
+
generic "source-available" label, which has been tainted by the
|
|
158
|
+
SSPL / Elastic / MongoDB relicensing trauma cycles.
|
|
159
|
+
|
|
160
|
+
What this means practically:
|
|
161
|
+
|
|
162
|
+
- **You can read the source.** ✅
|
|
163
|
+
- **You can modify it.** ✅
|
|
164
|
+
- **You can sell products built with it.** ✅
|
|
165
|
+
- **You can redistribute it (with the same FSL terms).** ✅
|
|
166
|
+
- **It will be Apache 2.0 in two years.** ✅
|
|
167
|
+
- Some enterprise procurement policies that strictly require OSI-approved
|
|
168
|
+
licenses will require an exception for this. We're working on making
|
|
169
|
+
that exception easy to grant.
|
|
170
|
+
|
|
171
|
+
## Why FSL specifically — why not stay Apache?
|
|
172
|
+
|
|
173
|
+
HDK 3.0 introduces installable HDK Apps. Every App declares against a
|
|
174
|
+
specific App protocol — the bytes-locked intro, catalog format,
|
|
175
|
+
tool-selection rule, and boundary marker that the runtime renders into
|
|
176
|
+
the spine. Your App's reliability depends on every HDK runtime your users
|
|
177
|
+
install agreeing on the same protocol.
|
|
178
|
+
|
|
179
|
+
Under a permissive license alone, the protocol is forkable. A
|
|
180
|
+
well-resourced redistributor could fork the runtime, modify the protocol
|
|
181
|
+
surface, and distribute a variant under a different name with captive
|
|
182
|
+
distribution. App developers then face a fragmented ecosystem: target one
|
|
183
|
+
protocol, target both, or pick the bigger distribution and abandon the
|
|
184
|
+
others. The cost of that split is paid by App developers in testing
|
|
185
|
+
burden, divergent behavior, and reliability degradation across runtimes.
|
|
186
|
+
|
|
187
|
+
FSL's two-year Competing Use restriction is shaped to block that
|
|
188
|
+
fragmentation specifically. After the conversion, anyone can build
|
|
189
|
+
whatever they want — by which time the protocol has had enough time to
|
|
190
|
+
stabilize through ecosystem use and the protection is no longer the load-
|
|
191
|
+
bearing thing keeping it coherent.
|
|
192
|
+
|
|
193
|
+
For the longer treatment of this argument, see
|
|
194
|
+
[Why FSL](./why-fsl).
|
|
195
|
+
|
|
196
|
+
We could have used Apache 2.0 and tried to protect only the channel via
|
|
197
|
+
terms-of-service. We could have written a custom license. We chose
|
|
198
|
+
standard FSL because it's:
|
|
199
|
+
|
|
200
|
+
- **Off-the-shelf** — no bespoke license review at every adopter
|
|
201
|
+
- **Recognizable** — Sentry, PowerSync, and others use it
|
|
202
|
+
- **Documented** — the FAQ, definitions, and edge cases have been
|
|
203
|
+
litigated publicly
|
|
204
|
+
- **Time-bounded** — the protocolual Apache 2.0 conversion is the answer
|
|
205
|
+
to the "is this just source-available forever?" critique
|
|
206
|
+
- **Pre-launch** — relicensing at HDK 3.0 launch is structurally
|
|
207
|
+
different from MongoDB / Elastic / HashiCorp relicensing under an
|
|
208
|
+
existing installed base, which is what causes the backlash cycle
|
|
209
|
+
|
|
210
|
+
## What about the lloyal stack — what's under FSL and what's not?
|
|
211
|
+
|
|
212
|
+
| Component | License | Why |
|
|
213
|
+
|---|---|---|
|
|
214
|
+
| `liblloyal` (C++ engine) | FSL-1.1-Apache-2.0 | Native primitives the runtime is built on |
|
|
215
|
+
| `lloyal-node` (N-API binding) | FSL-1.1-Apache-2.0 | The binding that lets Effection drive llama.cpp |
|
|
216
|
+
| `@lloyal-labs/lloyal-agents` | FSL-1.1-Apache-2.0 | Runtime framework |
|
|
217
|
+
| `@lloyal-labs/lloyal-sdk` | FSL-1.1-Apache-2.0 | Runtime framework |
|
|
218
|
+
| `@lloyal-labs/rig` | FSL-1.1-Apache-2.0 | Runtime framework — holds the App protocol |
|
|
219
|
+
| `@lloyal-labs/corpus`, `@lloyal-labs/web` | FSL-1.1-Apache-2.0 | Reference Apps shipped in-tree |
|
|
220
|
+
| **`@lloyal-labs/harness-cli` (the `harness.dev` CLI)** | **Apache 2.0** | Scaffolder — unrestricted for scaffolding new harnesses and Apps |
|
|
221
|
+
| **`hdk-create-app`** (when shipped) | **Apache 2.0** | Scaffolder — same as above |
|
|
222
|
+
| `llama.cpp` (vendored dependency) | MIT (unchanged) | External upstream library; we don't relicense their code |
|
|
223
|
+
|
|
224
|
+
## Can I contribute to HDK?
|
|
225
|
+
|
|
226
|
+
**Yes.** Contributions are welcome under the same FSL license terms. If you
|
|
227
|
+
submit a PR, you're granting Lloyal Labs the right to distribute your
|
|
228
|
+
contribution under FSL-1.1-Apache-2.0 (and automatically under Apache 2.0
|
|
229
|
+
two years after each release that includes it). The CONTRIBUTING file in
|
|
230
|
+
each repo has the details.
|
|
231
|
+
|
|
232
|
+
## I have a use case that's borderline — who do I ask?
|
|
233
|
+
|
|
234
|
+
Email [legal@lloyal.ai](mailto:legal@lloyal.ai) (or open a discussion in the repo). The runtime
|
|
235
|
+
team will help you confirm whether your use case falls under Permitted
|
|
236
|
+
Purpose or Competing Use. We'd rather give you a quick yes than have you
|
|
237
|
+
worry about it.
|
|
238
|
+
|
|
239
|
+
## Further reading
|
|
240
|
+
|
|
241
|
+
- [FSL official site](https://fsl.software) — Sentry's canonical FSL
|
|
242
|
+
resources and FAQ
|
|
243
|
+
- [Fair Source](https://fair.io) — the category FSL belongs to
|
|
244
|
+
- [The FSL template, instantiated for each repo](./fsl-template)
|
|
245
|
+
- [Why we chose FSL over BSL, Apache, or a custom license](./why-fsl)
|
|
246
|
+
|
|
247
|
+
## Is there a safe harbor for building products with the HDK?
|
|
248
|
+
|
|
249
|
+
Yes. The [Lloyal Harness Builder Grant](https://github.com/lloyal-ai/hdk/blob/main/GRANT.md)
|
|
250
|
+
irrevocably guarantees that building, selling, and hosting Harnesses and Apps
|
|
251
|
+
is a Permitted Purpose and never a Competing Use — even products that compete
|
|
252
|
+
head-on with Lloyal's own (including reasoning.run). Only three uses remain
|
|
253
|
+
restricted: offering the HDK itself as a developer framework, hosting the HDK
|
|
254
|
+
as-a-service for third-party developers, and operating a general-purpose App
|
|
255
|
+
distribution channel. Private/internal App distribution and your Harness's
|
|
256
|
+
own plugin system are explicitly permitted.
|
package/README.md
CHANGED
|
@@ -1,39 +1,44 @@
|
|
|
1
1
|
# @lloyal-labs/lloyal-agents
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Run a team of agents on hardware that serves one.**
|
|
4
4
|
|
|
5
|
-
`lloyal-agents`
|
|
6
|
-
|
|
7
|
-
Built on [lloyal.node](https://github.com/lloyal-ai/lloyal.node), which provides forkable decode state and continuous tree batching over llama.cpp. `lloyal-agents` adds structured concurrency, tool dispatch, and a five-phase tick loop. Orchestration is not a layer above inference — it is inference.
|
|
8
|
-
|
|
9
|
-
<picture>
|
|
10
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/lloyal-ai/hdk/main/assets/continuous-context-dark.svg">
|
|
11
|
-
<img src="https://raw.githubusercontent.com/lloyal-ai/hdk/main/assets/continuous-context.svg" alt="Traditional Agents vs Continuous Context Agents — shared KV prefix, tool prefill, sub-agent spawning" width="100%">
|
|
12
|
-
</picture>
|
|
5
|
+
`lloyal-agents` schedules memory, not strings. An agent is a branch of the model's live attention state: shared context is **inherited, not re-sent** — a new agent attends over everything before its fork point without paying a token for it. Advancing the whole fleet costs one GPU forward pass per tick. The more your agents share, the cheaper they get — the inverse of the API-call model, where every agent re-reads the world on every step.
|
|
13
6
|
|
|
14
7
|
```bash
|
|
15
8
|
npm i @lloyal-labs/lloyal-agents @lloyal-labs/lloyal.node
|
|
16
9
|
```
|
|
17
10
|
|
|
18
|
-
`lloyal-agents` provides the agent runtime. [`lloyal.node`](https://github.com/lloyal-ai/lloyal.node) provides the native inference backend — prebuilt binaries for macOS (Metal, CPU), Linux (CPU, CUDA, Vulkan), and Windows (CPU, CUDA, Vulkan). Both are required. GPU selection at runtime.
|
|
19
|
-
|
|
20
|
-
## Public API
|
|
21
|
-
|
|
22
11
|
```typescript
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
12
|
+
yield* withSpine({ systemPrompt: PLAYBOOKS, tools }, function* (spine) {
|
|
13
|
+
// spine is a prefilled branch — system prompt + tool schemas already in KV.
|
|
14
|
+
// Every agent forked from it shares that prefix physically.
|
|
15
|
+
return yield* agentPool({
|
|
16
|
+
orchestrate: parallel(
|
|
17
|
+
questions.map((q) => ({ content: q, systemPrompt: WORKER_PROMPT })),
|
|
18
|
+
),
|
|
19
|
+
tools: [...sourceTools, reportTool],
|
|
20
|
+
parent: spine,
|
|
21
|
+
terminalTool: "report",
|
|
22
|
+
});
|
|
23
|
+
});
|
|
35
24
|
```
|
|
36
25
|
|
|
26
|
+
Three things this buys you that N separate model calls can't:
|
|
27
|
+
|
|
28
|
+
- **Shared prefix, paid once.** Agents don't get told what their siblings know — they *attended over the same tokens*. Context sharing happens in the attention mechanism, not in prompt plumbing.
|
|
29
|
+
- **True concurrency on one GPU.** Continuous tree batching packs every agent's next token into a single `llama_batch` — eight agents stream in lockstep on hardware that serves one.
|
|
30
|
+
- **Agents are virtual processes over branches of the model's attention.** Structured concurrency gives each branch a real process lifecycle — spawn a sub-agent from a live thought mid-reasoning, halt a subtree and its KV is reclaimed, exit a scope and teardown is guaranteed. If an agent is cut under context pressure, recovery extracts its findings from the attention state it leaves behind.
|
|
31
|
+
- **Deep agents are native, not orchestrated.** Elsewhere, a sub-agent is a fresh conversation handed a task brief — everything the parent knew gets squeezed through a prompt and re-paid for. Here a sub-agent is a fork of the parent's live attention: it inherits everything, instantly, for free — or forks from the clean shared spine when you *want* quarantine. Delegation nests to any depth; each subtree is a scope that unwinds cleanly.
|
|
32
|
+
|
|
33
|
+
Local models, your hardware: prebuilt binaries for macOS (Metal), Linux and Windows (CPU, CUDA, Vulkan) via [`lloyal.node`](https://github.com/lloyal-ai/lloyal.node).
|
|
34
|
+
|
|
35
|
+
**[Docs →](https://docs.lloyal.ai)** · **[The HDK →](https://github.com/lloyal-ai/hdk)** · built on this runtime: [`npx reasoning.run`](https://www.npmjs.com/package/reasoning.run)
|
|
36
|
+
|
|
37
|
+
<picture>
|
|
38
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/lloyal-ai/hdk/main/assets/continuous-context-dark.svg">
|
|
39
|
+
<img src="https://raw.githubusercontent.com/lloyal-ai/hdk/main/assets/continuous-context.svg" alt="Traditional Agents vs Continuous Context Agents — shared KV prefix, tool prefill, sub-agent spawning" width="100%">
|
|
40
|
+
</picture>
|
|
41
|
+
|
|
37
42
|
## Bootstrap
|
|
38
43
|
|
|
39
44
|
```typescript
|
|
@@ -233,10 +238,43 @@ The runtime emits structured events for TUI, logging, or telemetry:
|
|
|
233
238
|
| `agent:recovered` | `agentId`, `result` — recovery extracted findings from killed agent |
|
|
234
239
|
| `agent:done` | `agentId` |
|
|
235
240
|
|
|
241
|
+
## App protocol
|
|
242
|
+
|
|
243
|
+
`lloyal-agents` ships the App protocol primitives — types ({@link App}, {@link AppManifest}, {@link AppProtocol}, {@link AppRegistry}), contexts (`AppRegistryCtx`, `AppConfigStoreCtx`, `GrantStoreCtx`, `RerankerCtx`), and the `Tool.protected` flag + authGuard hook in the agent policy. Construction primitives — `defineApp`, `createAppRegistry`, `createInMemoryConfigStore`, `createGrantStore`, `renderSpine`, `renderAgentPreamble` — live in [`@lloyal-labs/rig`](../rig). Reference Apps (`@lloyal-labs/web-app`, `@lloyal-labs/corpus-app`, `@lloyal-labs/wikipedia-app`) consume both.
|
|
244
|
+
|
|
245
|
+
Scaffold an App with `npx harness.dev app <name>`; install one with `npx harness.dev install <publisher>/<name>`.
|
|
246
|
+
|
|
236
247
|
## Documentation
|
|
237
248
|
|
|
238
249
|
Full positioning, mechanics, learn pages, and reference at [docs.lloyal.ai](https://docs.lloyal.ai).
|
|
239
250
|
|
|
251
|
+
## Surface at a glance
|
|
252
|
+
|
|
253
|
+
```typescript
|
|
254
|
+
import {
|
|
255
|
+
initAgents, // bootstrap: session, store, event channel
|
|
256
|
+
useAgent, agent, // single-agent helpers
|
|
257
|
+
agentPool, // multi-agent pool with a swappable orchestrator
|
|
258
|
+
useAgentPool, // lower-level Effection resource (advanced)
|
|
259
|
+
diverge, // multi-branch perplexity selection
|
|
260
|
+
parallel, chain, fanout, dag, reduce, // orchestrators / combinators
|
|
261
|
+
withSpine, // scoped spine branch with guaranteed teardown
|
|
262
|
+
Tool, Source,
|
|
263
|
+
DefaultAgentPolicy,
|
|
264
|
+
Ctx, Store, Events,
|
|
265
|
+
// App protocol primitives — types + contexts the registry + agent pool
|
|
266
|
+
// pick up. Construction lives in `@lloyal-labs/rig` (`defineApp`,
|
|
267
|
+
// `createAppRegistry`).
|
|
268
|
+
AppRegistryCtx, AppConfigStoreCtx, GrantStoreCtx, RerankerCtx,
|
|
269
|
+
} from "@lloyal-labs/lloyal-agents";
|
|
270
|
+
|
|
271
|
+
import type {
|
|
272
|
+
App, AppManifest, AppProtocol, AppFactory, AppState,
|
|
273
|
+
AgentRenderCtx, SkillTemplateFn,
|
|
274
|
+
AppConfigStore, GrantStore,
|
|
275
|
+
} from "@lloyal-labs/lloyal-agents";
|
|
276
|
+
```
|
|
277
|
+
|
|
240
278
|
## License
|
|
241
279
|
|
|
242
|
-
Apache
|
|
280
|
+
See [LICENSE](./LICENSE) (Functional Source License 1.1 — Apache 2.0 Future License) and the [licensing FAQ](./LICENSE-FAQ.md).
|
package/dist/Agent.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type { TraceToken } from './types';
|
|
|
6
6
|
* Agent status — domain language for where the agent is in its lifecycle.
|
|
7
7
|
*
|
|
8
8
|
* - `idle`: created but not yet generating, OR finished but branch still
|
|
9
|
-
* alive (extraction window for
|
|
9
|
+
* alive (extraction window for recovery)
|
|
10
10
|
* - `active`: generating tokens (between PRODUCE start and stop token)
|
|
11
11
|
* - `awaiting_tool`: tool call parsed, waiting for result in SETTLE
|
|
12
12
|
* - `disposed`: branch pruned, agent no longer usable
|
|
@@ -19,7 +19,7 @@ export type AgentStatus = 'idle' | 'active' | 'awaiting_tool' | 'disposed';
|
|
|
19
19
|
*
|
|
20
20
|
* @category Agents
|
|
21
21
|
*/
|
|
22
|
-
export type ResultSource = 'voluntary_return' | 'free_text' | '
|
|
22
|
+
export type ResultSource = 'voluntary_return' | 'free_text' | 'recovery' | 'nudge' | 'tool_error';
|
|
23
23
|
/**
|
|
24
24
|
* Immutable prompt format configuration set at agent creation.
|
|
25
25
|
* Derived from `formatChatSync()` output.
|
|
@@ -91,6 +91,15 @@ export declare class Agent {
|
|
|
91
91
|
readonly fmt: FormatConfig;
|
|
92
92
|
/** The task text this agent was assigned — used by echo detection guard */
|
|
93
93
|
readonly task: string;
|
|
94
|
+
/**
|
|
95
|
+
* Optional non-enforcing label naming the App a spawn nominally belongs
|
|
96
|
+
* to (`SpawnSpec.assignedApp`), or `null` for harness-internal spawns.
|
|
97
|
+
* Purely informational since the authGuard moved the security boundary
|
|
98
|
+
* into the tool: tool access is gated by {@link Tool.protected}
|
|
99
|
+
* + session grants, not by app membership. Carried so trace events
|
|
100
|
+
* (`tool:authReject`) and harness UI can attribute work to an app.
|
|
101
|
+
*/
|
|
102
|
+
readonly assignedApp: string | null;
|
|
94
103
|
private _status;
|
|
95
104
|
private _statusSignal;
|
|
96
105
|
private _startedAt;
|
|
@@ -115,6 +124,8 @@ export declare class Agent {
|
|
|
115
124
|
fmt: FormatConfig;
|
|
116
125
|
parent?: Agent | null;
|
|
117
126
|
task?: string;
|
|
127
|
+
/** Optional non-enforcing app label — see {@link assignedApp}. */
|
|
128
|
+
assignedApp?: string | null;
|
|
118
129
|
});
|
|
119
130
|
get status(): AgentStatus;
|
|
120
131
|
/**
|
package/dist/Agent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Agent.d.ts","sourceRoot":"","sources":["../src/Agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAgB,KAAK,MAAM,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAI1C;;;;;;;;;;GAUG;AACH,MAA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IAEtE,4DAA4D;IAC5D,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI;IAIzC;;;;;;;;;;;;OAYG;IACH,aAAa,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,SAAS,CAAC,EAAE,GAAG,CAAC,EAAE;IAYzD,IAAI,MAAM,IAAI,MAAM,GAAG,IAAI,CAAyB;IACpD,IAAI,YAAY,IAAI,YAAY,GAAG,IAAI,CAA+B;IAEtE,0EAA0E;IAC1E,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,IAAI;IAOtD,IAAI,QAAQ,IAAI,MAAM,CAAiC;IACvD,IAAI,QAAQ,IAAI,MAAM,CAAiC;IACvD,qEAAqE;IACrE,IAAI,WAAW,IAAI,MAAM,CAAwD;IAEjF,uEAAuE;IACvE,IAAI,qBAAqB,IAAI,OAAO,CAEnC;IAID;;;;;;;;;;OAUG;IACI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,qBAAqB,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IASvF,oEAAoE;IACpE,OAAO,IAAI,IAAI;CAIhB"}
|
package/dist/Agent.js
CHANGED
|
@@ -32,6 +32,15 @@ class Agent {
|
|
|
32
32
|
fmt;
|
|
33
33
|
/** The task text this agent was assigned — used by echo detection guard */
|
|
34
34
|
task;
|
|
35
|
+
/**
|
|
36
|
+
* Optional non-enforcing label naming the App a spawn nominally belongs
|
|
37
|
+
* to (`SpawnSpec.assignedApp`), or `null` for harness-internal spawns.
|
|
38
|
+
* Purely informational since the authGuard moved the security boundary
|
|
39
|
+
* into the tool: tool access is gated by {@link Tool.protected}
|
|
40
|
+
* + session grants, not by app membership. Carried so trace events
|
|
41
|
+
* (`tool:authReject`) and harness UI can attribute work to an app.
|
|
42
|
+
*/
|
|
43
|
+
assignedApp;
|
|
35
44
|
// ── Mutable state ───────────────────────────────────────
|
|
36
45
|
_status = 'idle';
|
|
37
46
|
_statusSignal = (0, effection_1.createSignal)();
|
|
@@ -58,6 +67,7 @@ class Agent {
|
|
|
58
67
|
this.fmt = opts.fmt;
|
|
59
68
|
this.task = opts.task ?? '';
|
|
60
69
|
this.parent = opts.parent ?? null;
|
|
70
|
+
this.assignedApp = opts.assignedApp ?? null;
|
|
61
71
|
}
|
|
62
72
|
// ── Status ──────────────────────────────────────────────
|
|
63
73
|
get status() { return this._status; }
|
package/dist/Agent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Agent.js","sourceRoot":"","sources":["../src/Agent.ts"],"names":[],"mappings":";;;AAEA,yCAAsD;AA+EtD,+DAA+D;AAE/D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAa,KAAK;IAChB,2DAA2D;IAE3D,+CAA+C;IACtC,EAAE,CAAS;IAEpB,uEAAuE;IAC9D,QAAQ,CAAS;IAE1B,sCAAsC;IAC7B,MAAM,CAAS;IAExB,4CAA4C;IACnC,GAAG,CAAe;IAE3B,2EAA2E;IAClE,IAAI,CAAS;IAEtB,2DAA2D;IAEnD,OAAO,GAAgB,MAAM,CAAC;IAC9B,aAAa,GAA8B,IAAA,wBAAY,GAAqB,CAAC;IAC7E,UAAU,GAAkB,IAAI,CAAC;IACjC,UAAU,GAAG,EAAE,CAAC;IAChB,WAAW,GAAG,CAAC,CAAC;IAChB,cAAc,GAAG,CAAC,CAAC;IACnB,MAAM,GAAG,CAAC,CAAC;IACX,OAAO,GAAkB,IAAI,CAAC;IAC9B,aAAa,GAAwB,IAAI,CAAC;IAC1C,YAAY,GAAuB,EAAE,CAAC;IACtC,cAAc,GAAa,EAAE,CAAC;IAC9B,YAAY,GAAiB,EAAE,CAAC;IAChC,YAAY,GAAkB,IAAI,CAAC;IACnC,aAAa,GAAG,KAAK,CAAC;IACtB,OAAO,GAAiC,IAAI,CAAC;IAErD,0FAA0F;IACjF,MAAM,GAAiB,IA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