create-loopengine 0.1.5 → 0.1.7
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/README.md +2 -2
- package/package.json +2 -1
- package/template/README.md +34 -0
- package/template/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ clone of loopengine's own source repo.
|
|
|
13
13
|
## Usage
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
|
|
16
|
+
npx create-loopengine@latest my-agents
|
|
17
17
|
cd my-agents
|
|
18
18
|
npm install
|
|
19
19
|
cp .env.example .env # fill in ANTHROPIC_API_KEY
|
|
@@ -36,7 +36,7 @@ Or from the command line directly, no server needed:
|
|
|
36
36
|
npm run cli -- --agent example-agent "what is the weather in Boston?"
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
No name given? `
|
|
39
|
+
No name given? `npx create-loopengine@latest` on its own scaffolds into
|
|
40
40
|
`./my-agents`.
|
|
41
41
|
|
|
42
42
|
## What you get
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-loopengine",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Scaffold a new loopengine agent project — a runnable HTTP server with one example agent, in your own repo.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
|
+
"homepage": "https://loopengine.co",
|
|
7
8
|
"repository": {
|
|
8
9
|
"type": "git",
|
|
9
10
|
"url": "git+https://github.com/evanyan22/create-loopengine.git"
|
package/template/README.md
CHANGED
|
@@ -40,6 +40,40 @@ npm run cli -- --agent example-agent "what is the weather in Boston?"
|
|
|
40
40
|
add, no adapter change.
|
|
41
41
|
3. Call it at `/agents/your-agent/messages`.
|
|
42
42
|
|
|
43
|
+
A flat file like this is enough for most agents. An agent can also be a
|
|
44
|
+
*folder* — `agents/your-agent/index.ts` instead of `agents/your-agent.ts`
|
|
45
|
+
— which unlocks per-agent `tools/`, `skills/`, and `actauth.yml` defaults,
|
|
46
|
+
and lets it have its own subagents (see below). `loopengine`'s own CLI
|
|
47
|
+
scaffolds that folder form for you:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npx loopengine add-agent your-agent
|
|
51
|
+
# -> Created agents/your-agent/index.ts
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Composing agents (subagents)
|
|
55
|
+
|
|
56
|
+
An agent's tools can be other agents. Drop a folder under
|
|
57
|
+
`agents/<name>/subagents/<child>/` and `child` becomes one of `name`'s
|
|
58
|
+
tools automatically — no import, no wiring. This requires `name` itself
|
|
59
|
+
to be in folder form (see above), since a flat file has no folder to nest
|
|
60
|
+
`subagents/` under:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
npx loopengine add-agent support-orchestrator
|
|
64
|
+
npx loopengine add-subagent support-orchestrator billing-agent
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
`billing-agent` is then a normal `AgentConfig` (own tools, own
|
|
68
|
+
permission rules) plus one required field, `toolDescription` — the text
|
|
69
|
+
`support-orchestrator`'s model reads to decide when to delegate to it.
|
|
70
|
+
Calling that tool runs `billing-agent`'s whole loop to completion and
|
|
71
|
+
returns only its final answer; `support-orchestrator` never sees its
|
|
72
|
+
turns or tool calls. See
|
|
73
|
+
[loopengine's own README section on subagents](https://github.com/evanyan22/loopengine#4-subagents--an-agent-as-another-agents-tool)
|
|
74
|
+
for nesting, permission scoping, and the tradeoffs worth knowing before
|
|
75
|
+
reaching for this.
|
|
76
|
+
|
|
43
77
|
## Project layout
|
|
44
78
|
|
|
45
79
|
```
|