create-loopengine 0.1.0 → 0.1.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/README.md +63 -0
- package/package.json +1 -1
- package/template/README.md +13 -0
package/README.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# create-loopengine
|
|
2
|
+
|
|
3
|
+
**Scaffold a new [loopengine](https://www.npmjs.com/package/loopengine)
|
|
4
|
+
agent project — a runnable HTTP server, in your own repo, in one command.**
|
|
5
|
+
|
|
6
|
+
`npm install loopengine` alone only gets you the library (`runAgent`,
|
|
7
|
+
`AgentConfig`, session stores) — the HTTP server, the agent registry, and a
|
|
8
|
+
runnable example are deliberately not part of that package. `create-loopengine`
|
|
9
|
+
is the other half: a Rails/Laravel-style generator that gives you a
|
|
10
|
+
complete, working project to build on, instead of a library import or a
|
|
11
|
+
clone of loopengine's own source repo.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm create loopengine@latest my-agents
|
|
17
|
+
cd my-agents
|
|
18
|
+
npm install
|
|
19
|
+
cp .env.example .env # fill in ANTHROPIC_API_KEY
|
|
20
|
+
npm run dev # HTTP server on :8787
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
curl -X POST localhost:8787/agents/example-agent/messages \
|
|
25
|
+
-H 'content-type: application/json' \
|
|
26
|
+
-d '{"sessionId":"s1","message":"what is the weather in Boston?"}'
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
No name given? `npm create loopengine@latest` on its own scaffolds into
|
|
30
|
+
`./my-agents`.
|
|
31
|
+
|
|
32
|
+
## What you get
|
|
33
|
+
|
|
34
|
+
A real, standalone project — its own `package.json` depending on
|
|
35
|
+
`loopengine`, not a copy of loopengine's own repo:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
package.json Depends on loopengine — your project, not a fork
|
|
39
|
+
agent-registry.ts Maps agent name -> {config, createModelCall}, one line per agent
|
|
40
|
+
agents/example-agent.ts Starter agent: persona, one tool, one permission rule
|
|
41
|
+
adapters/http.ts HTTP API (streaming + non-streaming), routes by agent name
|
|
42
|
+
adapters/cli.ts Command-line adapter
|
|
43
|
+
.env.example ANTHROPIC_API_KEY / OPENAI_API_KEY / REDIS_URL
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The registry is multi-agent-capable from the start — seeded with one
|
|
47
|
+
example agent, not architecturally limited to one — so adding a second
|
|
48
|
+
agent later is one file plus one line in `agent-registry.ts`, not a
|
|
49
|
+
rewrite. See the generated `README.md` for how to add one, and
|
|
50
|
+
[loopengine's own README](https://github.com/evanyan22/loopengine) for the
|
|
51
|
+
full `AgentConfig` surface: permission rules, skills, context-budget
|
|
52
|
+
recovery, and how to wire a real model (Anthropic or OpenAI, both included).
|
|
53
|
+
|
|
54
|
+
## Status
|
|
55
|
+
|
|
56
|
+
Verified end to end against the real published packages: `npm create
|
|
57
|
+
loopengine@latest` resolves and scaffolds, `npm install` resolves
|
|
58
|
+
`loopengine` from the registry, the generated project typechecks clean,
|
|
59
|
+
and the real HTTP server starts and correctly routes a request through
|
|
60
|
+
session storage, permission gating, and tool scheduling up to the model
|
|
61
|
+
call itself.
|
|
62
|
+
|
|
63
|
+
MIT licensed.
|
package/package.json
CHANGED
package/template/README.md
CHANGED
|
@@ -44,6 +44,19 @@ adapters/http.ts HTTP API (streaming + non-streaming)
|
|
|
44
44
|
adapters/cli.ts Command-line adapter
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
+
## Adding external tools via Composio
|
|
48
|
+
|
|
49
|
+
Need an agent to call a real SaaS action (list GitHub repos, send a Slack
|
|
50
|
+
message) instead of a hand-written tool? Route it through
|
|
51
|
+
[Composio](https://composio.dev) via
|
|
52
|
+
[`mcpplug`](https://www.npmjs.com/package/mcpplug) rather than owning that
|
|
53
|
+
vendor's OAuth yourself — see loopengine's own
|
|
54
|
+
[README section on external tool gateways](https://github.com/evanyan22/loopengine#external-tool-gateways)
|
|
55
|
+
for the pattern, and `agents/file-agent.ts` in that repo for a complete,
|
|
56
|
+
working example. Not wired in here by default: it needs the `composio` CLI
|
|
57
|
+
installed and an authenticated account (`composio link <toolkit>`) first,
|
|
58
|
+
so it's a deliberate next step, not part of this starter agent.
|
|
59
|
+
|
|
47
60
|
See [loopengine's own README](https://github.com/evanyan22/loopengine) for
|
|
48
61
|
the full `AgentConfig` surface, permission rules, skills, and how to wire a
|
|
49
62
|
real model.
|