create-loopengine 0.1.0 → 0.1.2

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 ADDED
@@ -0,0 +1,89 @@
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
+ Or from the command line directly, no server needed:
30
+
31
+ ```bash
32
+ npm run cli -- --agent example-agent "what is the weather in Boston?"
33
+ ```
34
+
35
+ No name given? `npm create loopengine@latest` on its own scaffolds into
36
+ `./my-agents`.
37
+
38
+ ## What you get
39
+
40
+ A real, standalone project — its own `package.json` depending on
41
+ `loopengine`, not a copy of loopengine's own repo:
42
+
43
+ ```
44
+ package.json Depends on loopengine — your project, not a fork
45
+ agent-registry.ts Maps agent name -> {config, createModelCall}, one line per agent
46
+ agents/example-agent.ts Starter agent: persona, one tool, one permission rule
47
+ adapters/http.ts HTTP API (streaming + non-streaming), routes by agent name
48
+ adapters/cli.ts Command-line adapter
49
+ .env.example ANTHROPIC_API_KEY / OPENAI_API_KEY / REDIS_URL
50
+ ```
51
+
52
+ The registry is multi-agent-capable from the start — seeded with one
53
+ example agent, not architecturally limited to one — so adding a second
54
+ agent later is one file plus one line in `agent-registry.ts`, not a
55
+ rewrite. See [loopengine's own README](https://github.com/evanyan22/loopengine)
56
+ for the full `AgentConfig` surface: permission rules, skills, context-budget
57
+ recovery, and how to wire a real model (Anthropic or OpenAI, both included).
58
+
59
+ ## Add another agent
60
+
61
+ 1. Copy `agents/example-agent.ts` to `agents/your-agent.ts` and edit its
62
+ `systemPrompt`, `tools`, and `rules`.
63
+ 2. Register it in `agent-registry.ts` — one line, same shape as
64
+ `example-agent`.
65
+ 3. Call it at `/agents/your-agent/messages`.
66
+
67
+ ## Adding external tools via Composio
68
+
69
+ Need an agent to call a real SaaS action (list GitHub repos, send a Slack
70
+ message) instead of a hand-written tool? Route it through
71
+ [Composio](https://composio.dev) via
72
+ [`mcpplug`](https://www.npmjs.com/package/mcpplug) rather than owning that
73
+ vendor's OAuth yourself — see loopengine's own
74
+ [README section on external tool gateways](https://github.com/evanyan22/loopengine#external-tool-gateways)
75
+ for the pattern, and `agents/file-agent.ts` in that repo for a complete,
76
+ working example. Not wired in here by default: it needs the `composio` CLI
77
+ installed and an authenticated account (`composio link <toolkit>`) first,
78
+ so it's a deliberate next step, not part of this starter agent.
79
+
80
+ ## Status
81
+
82
+ Verified end to end against the real published packages: `npm create
83
+ loopengine@latest` resolves and scaffolds, `npm install` resolves
84
+ `loopengine` from the registry, the generated project typechecks clean,
85
+ and the real HTTP server starts and correctly routes a request through
86
+ session storage, permission gating, and tool scheduling up to the model
87
+ call itself.
88
+
89
+ MIT licensed.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-loopengine",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
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",
@@ -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.