agent-lyra 0.3.0 → 0.3.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 +160 -129
- package/package.json +56 -56
package/README.md
CHANGED
|
@@ -1,129 +1,160 @@
|
|
|
1
|
-
# agent-lyra
|
|
2
|
-
|
|
3
|
-
## Local-first release
|
|
4
|
-
|
|
5
|
-
The supported release path is local. It includes the Node CLI, SQLite run history, the draft-review team, and read-only IDE MCP. OpenAI-backed runs use your own key. The legacy gated client expects a compatible hosted `/agents/<vertical>/invoke` endpoint. The bundled hosted default has not been verified against AgentLyra production, so hosted invocation is outside this release’s supported scope.
|
|
6
|
-
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
npx agent-lyra
|
|
24
|
-
npx agent-lyra
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
)
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
1
|
+
# agent-lyra
|
|
2
|
+
|
|
3
|
+
## Local-first release
|
|
4
|
+
|
|
5
|
+
The supported release path is local. It includes the Node CLI, SQLite run history, the draft-review team, and read-only IDE MCP. OpenAI-backed runs use your own key. The legacy gated client expects a compatible hosted `/agents/<vertical>/invoke` endpoint. The bundled hosted default has not been verified against AgentLyra production, so hosted invocation is outside this release’s supported scope.
|
|
6
|
+
|
|
7
|
+
## CLI reference
|
|
8
|
+
|
|
9
|
+
Use Node.js 22.13 or newer. Run these commands from your project after installing `agent-lyra`. Angle brackets mark required arguments. Square brackets mark optional arguments.
|
|
10
|
+
|
|
11
|
+
### Project setup
|
|
12
|
+
|
|
13
|
+
| Command | What it does |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| `npx agent-lyra init [options]` | Scaffold a `.lyra` workspace and starter agents. Options include `--mode`, `--domains`, `--api-key`, `--api-base-url`, `--dir`, and `--force`. |
|
|
16
|
+
| `npx agent-lyra --help` | Show the init command and its options. The help alias does the same. Add `--help` to a specific command for its syntax. |
|
|
17
|
+
|
|
18
|
+
### App Builder
|
|
19
|
+
|
|
20
|
+
| Command | What it does |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| `npx agent-lyra app init [manifest.json]` | Create the Support IQ starter. Defaults to `.lyra/app/manifest.json`. |
|
|
23
|
+
| `npx agent-lyra app validate <manifest.json>` | Check the app manifest before previewing or exporting. |
|
|
24
|
+
| `npx agent-lyra app preview <manifest.json>` | Run the starter preview on loopback. Set `LYRA_PREVIEW_PORT` to change its port. |
|
|
25
|
+
| `npx agent-lyra app export <manifest.json> <new-directory>` | Export the supported starter into a new directory. |
|
|
26
|
+
| `npx agent-lyra app publish <manifest.json> --dry-run` | Print the proposed Marketplace payload for review. Submit the listing in the cloud. |
|
|
27
|
+
| `npx agent-lyra app use <listing-id> [new-manifest.json]` | Import a published app and save its manifest. Requires `LYRA_SESSION_TOKEN`. |
|
|
28
|
+
|
|
29
|
+
### Agent runs and IDE integration
|
|
30
|
+
|
|
31
|
+
| Command | What it does |
|
|
32
|
+
| --- | --- |
|
|
33
|
+
| `npx agent-lyra agent run --model <model> --prompt <text>` | Run a local agent with an OpenAI model. Requires `OPENAI_API_KEY`. |
|
|
34
|
+
| `npx agent-lyra team run draft-review --model <model> --prompt <text>` | Run the built-in writer and reviewer team. Requires `OPENAI_API_KEY`. |
|
|
35
|
+
| `npx agent-lyra run status <run-id>` | Read the latest event for a run from local SQLite history. |
|
|
36
|
+
| `npx agent-lyra mcp serve --dir <absolute-project-directory>` | Expose saved runs to an IDE over read-only stdio MCP. |
|
|
37
|
+
|
|
38
|
+
## Build a support app
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npx agent-lyra app init
|
|
42
|
+
npx agent-lyra app validate .lyra/app/manifest.json
|
|
43
|
+
npx agent-lyra app preview .lyra/app/manifest.json
|
|
44
|
+
npx agent-lyra app export .lyra/app/manifest.json ./my-support-app
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Run each command separately. Stop the preview before exporting from the same terminal. The starter supports the local Support IQ template without cloud authentication. Use `app publish <manifest.json> --dry-run` to review a listing payload offline. `app use <listing-id>` imports a published app using an existing cloud session supplied through `LYRA_SESSION_TOKEN`. The cloud Marketplace also lets signed-in users save a private copy and download its manifest.
|
|
48
|
+
|
|
49
|
+
## Run a local agent
|
|
50
|
+
|
|
51
|
+
With Node.js 22.13 or newer, set `OPENAI_API_KEY` in your terminal environment, then run these commands from your project:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npx agent-lyra agent run --model YOUR_MODEL --prompt "Summarize this idea"
|
|
55
|
+
npx agent-lyra run status YOUR_RUN_ID
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The first command sends your prompt to OpenAI using your key and prints a run ID. The second reads the most recent event from `.lyra/state/runs.sqlite`, including the generated output on success. Keep that directory local if the output is sensitive. The run requires no Lyra account. The existing `init` wizard remains available for scaffolding.
|
|
59
|
+
|
|
60
|
+
To run the built-in writing team with the same setup:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
npx agent-lyra team run draft-review --model YOUR_MODEL --prompt "Draft a project update"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The writer produces a draft, then the reviewer receives the prompt and draft and returns revised text. Each step prints a run ID you can inspect with `agent-lyra run status`. The team makes two model calls when both steps succeed.
|
|
67
|
+
|
|
68
|
+
## Inspect saved runs from an IDE
|
|
69
|
+
|
|
70
|
+
Configure a stdio MCP server in your IDE with the installed `agent-lyra` executable (use its absolute path if needed) and these arguments:
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
["mcp", "serve", "--dir", "ABSOLUTE_PROJECT_PATH"]
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Two-layer Lyra SDK package:
|
|
77
|
+
|
|
78
|
+
- Standalone layer: local orchestration primitives and RAG utilities with no API key.
|
|
79
|
+
- Gated layer: compatibility client for deployments that provide the hosted invocation endpoint.
|
|
80
|
+
|
|
81
|
+
## Install
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
npm install agent-lyra
|
|
85
|
+
# or
|
|
86
|
+
pnpm add agent-lyra
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Installation has zero side effects:
|
|
90
|
+
|
|
91
|
+
- no files/folders created
|
|
92
|
+
- no network calls by package code
|
|
93
|
+
- no postinstall hooks
|
|
94
|
+
|
|
95
|
+
Initialization is explicit and happens only when the user runs the CLI.
|
|
96
|
+
|
|
97
|
+
## Init A Repo
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
npx agent-lyra init
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Or after install:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
agent-lyra init
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Flow:
|
|
110
|
+
|
|
111
|
+
- optional login step with Lyra API key to sync your web-created agents
|
|
112
|
+
- choose pack type: `Professional` or `Everyday`
|
|
113
|
+
- choose `standalone` or `gated` (or set with `--mode`)
|
|
114
|
+
- standalone: select onboarding domains with `Space`, confirm with `Enter`
|
|
115
|
+
- for repository-aware engineering personas, select `engineering-bootstrap`
|
|
116
|
+
- gated: select hosted verticals, then enter the Lyra API key from the Lyra login UI
|
|
117
|
+
- logged-out gated selections are marked as `needs login` in generated metadata
|
|
118
|
+
- the command creates a `.lyra/` folder in the current repo only after confirmation
|
|
119
|
+
|
|
120
|
+
Generated files:
|
|
121
|
+
|
|
122
|
+
- `.lyra/config.json`
|
|
123
|
+
- `.lyra/manifest.json` (root manifest with `source` + `comparisonStatus`)
|
|
124
|
+
- `.lyra/README.md`
|
|
125
|
+
- `.lyra/domains/<domain>/domain.json` (domain manifest)
|
|
126
|
+
- `.lyra/domains/<domain>/agents/*.md`
|
|
127
|
+
- `.lyra/agents/*.md` (flattened top-level agent specs)
|
|
128
|
+
- `.lyra/credentials.json` only for gated mode
|
|
129
|
+
- `.lyra/.gitignore` to ignore the local credentials file
|
|
130
|
+
|
|
131
|
+
Agent Markdown files are generated from the canonical onboarding catalog and include rich fields:
|
|
132
|
+
|
|
133
|
+
- identity: `id`, `slug`, `name`, `domain`, `category`, `mode`
|
|
134
|
+
- execution: `type`, `runtime` (standalone) or `hosted` (gated)
|
|
135
|
+
- behavior: `description`, `systemPrompt`, `skills`, `integrations`
|
|
136
|
+
- output policy: `outputs`
|
|
137
|
+
|
|
138
|
+
Engineering bootstrap agents are dynamic and repo-intelligence-ready:
|
|
139
|
+
|
|
140
|
+
- roles generated: `Engineering Dev Lead`, `Engineering QA Lead`, `Engineering Product Manager`, `Engineering Scrum Master`, `Engineering Architect`
|
|
141
|
+
- prompts are stack-agnostic and rely on runtime repo scan context
|
|
142
|
+
- each agent spec includes a `repoIntelligence` contract that aligns with:
|
|
143
|
+
- scan endpoint: `/api/repositories/:id/scan`
|
|
144
|
+
- PR endpoint: `/api/repositories/:id/lyra-pr`
|
|
145
|
+
|
|
146
|
+
## Usage
|
|
147
|
+
|
|
148
|
+
```js
|
|
149
|
+
import { standalone, gated } from "agent-lyra";
|
|
150
|
+
|
|
151
|
+
const workflow = standalone.createLinearWorkflow(
|
|
152
|
+
async () => "collect",
|
|
153
|
+
async (ctx) => `${ctx.step_1}:analyze`,
|
|
154
|
+
);
|
|
155
|
+
|
|
156
|
+
const result = await standalone.runWorkflow(workflow);
|
|
157
|
+
|
|
158
|
+
const client = gated.createHostedAgentClient({ apiKey: process.env.LYRA_API_KEY });
|
|
159
|
+
const output = await client.invoke("sales", { prompt: "Summarize latest pipeline risk." });
|
|
160
|
+
```
|
package/package.json
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "agent-lyra",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "Two-layer Lyra SDK with standalone local primitives and gated hosted agents.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./src/index.js",
|
|
7
|
-
"types": "./src/index.d.ts",
|
|
8
|
-
"engines": {
|
|
9
|
-
"node": ">=22.13.0"
|
|
10
|
-
},
|
|
11
|
-
"repository": {
|
|
12
|
-
"type": "git",
|
|
13
|
-
"url": "git+https://gitlab.com/vibified/agent-lyra.git",
|
|
14
|
-
"directory": "packages/lyra"
|
|
15
|
-
},
|
|
16
|
-
"homepage": "https://agentlyra.in",
|
|
17
|
-
"bin": {
|
|
18
|
-
"agent-lyra": "./bin/agent-lyra.js"
|
|
19
|
-
},
|
|
20
|
-
"exports": {
|
|
21
|
-
".": {
|
|
22
|
-
"types": "./src/index.d.ts",
|
|
23
|
-
"default": "./src/index.js"
|
|
24
|
-
},
|
|
25
|
-
"./standalone": {
|
|
26
|
-
"types": "./src/standalone/index.d.ts",
|
|
27
|
-
"default": "./src/standalone/index.js"
|
|
28
|
-
},
|
|
29
|
-
"./gated": {
|
|
30
|
-
"types": "./src/gated/index.d.ts",
|
|
31
|
-
"default": "./src/gated/index.js"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"files": [
|
|
35
|
-
"bin",
|
|
36
|
-
"src",
|
|
37
|
-
"README.md",
|
|
38
|
-
"LICENSE"
|
|
39
|
-
],
|
|
40
|
-
"sideEffects": false,
|
|
41
|
-
"scripts": {
|
|
42
|
-
"test": "node --test"
|
|
43
|
-
},
|
|
44
|
-
"keywords": [
|
|
45
|
-
"lyra",
|
|
46
|
-
"orchestration",
|
|
47
|
-
"rag",
|
|
48
|
-
"agents",
|
|
49
|
-
"sdk"
|
|
50
|
-
],
|
|
51
|
-
"author": "",
|
|
52
|
-
"license": "MIT",
|
|
53
|
-
"publishConfig": {
|
|
54
|
-
"access": "public"
|
|
55
|
-
}
|
|
56
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "agent-lyra",
|
|
3
|
+
"version": "0.3.1",
|
|
4
|
+
"description": "Two-layer Lyra SDK with standalone local primitives and gated hosted agents.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./src/index.js",
|
|
7
|
+
"types": "./src/index.d.ts",
|
|
8
|
+
"engines": {
|
|
9
|
+
"node": ">=22.13.0"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://gitlab.com/vibified/agent-lyra.git",
|
|
14
|
+
"directory": "packages/lyra"
|
|
15
|
+
},
|
|
16
|
+
"homepage": "https://agentlyra.in",
|
|
17
|
+
"bin": {
|
|
18
|
+
"agent-lyra": "./bin/agent-lyra.js"
|
|
19
|
+
},
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./src/index.d.ts",
|
|
23
|
+
"default": "./src/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./standalone": {
|
|
26
|
+
"types": "./src/standalone/index.d.ts",
|
|
27
|
+
"default": "./src/standalone/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./gated": {
|
|
30
|
+
"types": "./src/gated/index.d.ts",
|
|
31
|
+
"default": "./src/gated/index.js"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"bin",
|
|
36
|
+
"src",
|
|
37
|
+
"README.md",
|
|
38
|
+
"LICENSE"
|
|
39
|
+
],
|
|
40
|
+
"sideEffects": false,
|
|
41
|
+
"scripts": {
|
|
42
|
+
"test": "node --test"
|
|
43
|
+
},
|
|
44
|
+
"keywords": [
|
|
45
|
+
"lyra",
|
|
46
|
+
"orchestration",
|
|
47
|
+
"rag",
|
|
48
|
+
"agents",
|
|
49
|
+
"sdk"
|
|
50
|
+
],
|
|
51
|
+
"author": "",
|
|
52
|
+
"license": "MIT",
|
|
53
|
+
"publishConfig": {
|
|
54
|
+
"access": "public"
|
|
55
|
+
}
|
|
56
|
+
}
|