create-loopengine 0.1.4 → 0.1.6
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 +7 -3
- package/package.json +2 -1
- package/template/README.md +5 -1
- package/template/adapters/http.ts +6 -2
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
|
|
@@ -23,16 +23,20 @@ npm run dev # HTTP server on :8787
|
|
|
23
23
|
```bash
|
|
24
24
|
curl -X POST localhost:8787/agents/example-agent/messages \
|
|
25
25
|
-H 'content-type: application/json' \
|
|
26
|
-
-d '{"
|
|
26
|
+
-d '{"message":"what is the weather in Boston?"}'
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
+
`sessionId` is optional — omit it for a fresh, one-off session (a
|
|
30
|
+
generated id, echoed back in the response as `sessionId` so you can pass
|
|
31
|
+
it in explicitly on a later request to continue that same conversation).
|
|
32
|
+
|
|
29
33
|
Or from the command line directly, no server needed:
|
|
30
34
|
|
|
31
35
|
```bash
|
|
32
36
|
npm run cli -- --agent example-agent "what is the weather in Boston?"
|
|
33
37
|
```
|
|
34
38
|
|
|
35
|
-
No name given? `
|
|
39
|
+
No name given? `npx create-loopengine@latest` on its own scaffolds into
|
|
36
40
|
`./my-agents`.
|
|
37
41
|
|
|
38
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.6",
|
|
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
|
@@ -18,9 +18,13 @@ npm run dev # HTTP server on :8787
|
|
|
18
18
|
```bash
|
|
19
19
|
curl -X POST localhost:8787/agents/example-agent/messages \
|
|
20
20
|
-H 'content-type: application/json' \
|
|
21
|
-
-d '{"
|
|
21
|
+
-d '{"message":"what is the weather in Boston?"}'
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
+
`sessionId` is optional — omit it for a fresh, one-off session (a
|
|
25
|
+
generated id, echoed back in the response as `sessionId` so you can pass
|
|
26
|
+
it in explicitly on a later request to continue that same conversation).
|
|
27
|
+
|
|
24
28
|
Or from the command line directly, no server needed:
|
|
25
29
|
|
|
26
30
|
```bash
|
|
@@ -4,12 +4,16 @@
|
|
|
4
4
|
//
|
|
5
5
|
// curl -X POST localhost:8787/agents/example-agent/messages \
|
|
6
6
|
// -H 'content-type: application/json' \
|
|
7
|
-
// -d '{"
|
|
7
|
+
// -d '{"message":"what is the weather in Boston?"}'
|
|
8
8
|
//
|
|
9
9
|
// # same request, but as it happens: one SSE event per loop step
|
|
10
10
|
// curl -N -X POST localhost:8787/agents/example-agent/messages/stream \
|
|
11
11
|
// -H 'content-type: application/json' \
|
|
12
|
-
// -d '{"
|
|
12
|
+
// -d '{"message":"what is the weather in Boston?"}'
|
|
13
|
+
//
|
|
14
|
+
// sessionId is optional — omit it for a fresh, one-off session (a
|
|
15
|
+
// generated id, echoed back in the response as sessionId so you can pass
|
|
16
|
+
// it in explicitly on a later request to continue that same conversation).
|
|
13
17
|
//
|
|
14
18
|
// Owns: routing by agent name, request/response shape, and (via
|
|
15
19
|
// SessionStore.withSession) making sure two concurrent requests for the
|