agent-lyra 0.3.0 → 0.3.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.
Files changed (2) hide show
  1. package/README.md +120 -129
  2. package/package.json +56 -56
package/README.md CHANGED
@@ -1,129 +1,120 @@
1
- # agent-lyra
2
-
3
- ## Local-first release 0.3.0
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
- ## Build a support app
8
-
9
- ```bash
10
- npx agent-lyra app init
11
- npx agent-lyra app validate .lyra/app/manifest.json
12
- npx agent-lyra app preview .lyra/app/manifest.json
13
- npx agent-lyra app export .lyra/app/manifest.json ./my-support-app
14
- ```
15
-
16
- 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.
17
-
18
- ## Run a local agent
19
-
20
- With Node.js 22.13 or newer, set `OPENAI_API_KEY` in your terminal environment, then run these commands from your project:
21
-
22
- ```bash
23
- npx agent-lyra agent run --model YOUR_MODEL --prompt "Summarize this idea"
24
- npx agent-lyra run status YOUR_RUN_ID
25
- ```
26
-
27
- 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.
28
-
29
- To run the built-in writing team with the same setup:
30
-
31
- ```bash
32
- npx agent-lyra team run draft-review --model YOUR_MODEL --prompt "Draft a project update"
33
- ```
34
-
35
- 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.
36
-
37
- ## Inspect saved runs from an IDE
38
-
39
- Configure a stdio MCP server in your IDE with the installed `agent-lyra` executable (use its absolute path if needed) and these arguments:
40
-
41
- ```json
42
- ["mcp", "serve", "--dir", "ABSOLUTE_PROJECT_PATH"]
43
- ```
44
-
45
- Two-layer Lyra SDK package:
46
-
47
- - Standalone layer: local orchestration primitives and RAG utilities with no API key.
48
- - Gated layer: compatibility client for deployments that provide the hosted invocation endpoint.
49
-
50
- ## Install
51
-
52
- ```bash
53
- npm install agent-lyra
54
- # or
55
- pnpm add agent-lyra
56
- ```
57
-
58
- Installation has zero side effects:
59
-
60
- - no files/folders created
61
- - no network calls by package code
62
- - no postinstall hooks
63
-
64
- Initialization is explicit and happens only when the user runs the CLI.
65
-
66
- ## Init A Repo
67
-
68
- ```bash
69
- npx agent-lyra init
70
- ```
71
-
72
- Or after install:
73
-
74
- ```bash
75
- agent-lyra init
76
- ```
77
-
78
- Flow:
79
-
80
- - optional login step with Lyra API key to sync your web-created agents
81
- - choose pack type: `Professional` or `Everyday`
82
- - choose `standalone` or `gated` (or set with `--mode`)
83
- - standalone: select onboarding domains with `Space`, confirm with `Enter`
84
- - for repository-aware engineering personas, select `engineering-bootstrap`
85
- - gated: select hosted verticals, then enter the Lyra API key from the Lyra login UI
86
- - logged-out gated selections are marked as `needs login` in generated metadata
87
- - the command creates a `.lyra/` folder in the current repo only after confirmation
88
-
89
- Generated files:
90
-
91
- - `.lyra/config.json`
92
- - `.lyra/manifest.json` (root manifest with `source` + `comparisonStatus`)
93
- - `.lyra/README.md`
94
- - `.lyra/domains/<domain>/domain.json` (domain manifest)
95
- - `.lyra/domains/<domain>/agents/*.md`
96
- - `.lyra/agents/*.md` (flattened top-level agent specs)
97
- - `.lyra/credentials.json` only for gated mode
98
- - `.lyra/.gitignore` to ignore the local credentials file
99
-
100
- Agent Markdown files are generated from the canonical onboarding catalog and include rich fields:
101
-
102
- - identity: `id`, `slug`, `name`, `domain`, `category`, `mode`
103
- - execution: `type`, `runtime` (standalone) or `hosted` (gated)
104
- - behavior: `description`, `systemPrompt`, `skills`, `integrations`
105
- - output policy: `outputs`
106
-
107
- Engineering bootstrap agents are dynamic and repo-intelligence-ready:
108
-
109
- - roles generated: `Engineering Dev Lead`, `Engineering QA Lead`, `Engineering Product Manager`, `Engineering Scrum Master`, `Engineering Architect`
110
- - prompts are stack-agnostic and rely on runtime repo scan context
111
- - each agent spec includes a `repoIntelligence` contract that aligns with:
112
- - scan endpoint: `/api/repositories/:id/scan`
113
- - PR endpoint: `/api/repositories/:id/lyra-pr`
114
-
115
- ## Usage
116
-
117
- ```js
118
- import { standalone, gated } from "agent-lyra";
119
-
120
- const workflow = standalone.createLinearWorkflow(
121
- async () => "collect",
122
- async (ctx) => `${ctx.step_1}:analyze`,
123
- );
124
-
125
- const result = await standalone.runWorkflow(workflow);
126
-
127
- const client = gated.createHostedAgentClient({ apiKey: process.env.LYRA_API_KEY });
128
- const output = await client.invoke("sales", { prompt: "Summarize latest pipeline risk." });
129
- ```
1
+ # AgentLyra SDK
2
+
3
+ Build and preview agent apps locally, run agents with your own OpenAI key, and inspect saved runs from your IDE. The Node.js package includes a command-line tool and typed JavaScript APIs for composing workflows.
4
+
5
+ [AgentLyra homepage](https://agentlyra.in/) · [CLI reference](https://agentlyra.in/#sdk-commands) · [Cloud console](https://console.agentlyra.in/)
6
+
7
+ ## Install
8
+
9
+ Requires **Node.js 22.13 or newer**. From your project directory:
10
+
11
+ ```bash
12
+ npm install agent-lyra
13
+ ```
14
+
15
+ Use `pnpm add agent-lyra` if your project uses pnpm. Run the CLI with `npx agent-lyra` after installation.
16
+
17
+ ## Start with a working app
18
+
19
+ ```bash
20
+ npx agent-lyra app init
21
+ npx agent-lyra app preview .lyra/app/manifest.json
22
+ ```
23
+
24
+ Open the local URL printed by the preview. The **Support IQ** starter lets you enter a sample support ticket and see a draft reply. It uses a built-in example workflow, so you can try it without a Lyra account or a model API key.
25
+
26
+ Edit `.lyra/app/manifest.json`, then restart the preview to see your changes. When you are ready to export, stop the preview or use a second terminal:
27
+
28
+ ```bash
29
+ npx agent-lyra app validate .lyra/app/manifest.json
30
+ npx agent-lyra app export .lyra/app/manifest.json ./support-app
31
+ cd support-app
32
+ npm start
33
+ ```
34
+
35
+ ## Choose the workflow you need
36
+
37
+ | I want to… | Start here |
38
+ | --- | --- |
39
+ | Set up a repo with starter agent definitions | `npx agent-lyra init` |
40
+ | Build and export the local support starter | [Start with a working app](#start-with-a-working-app) |
41
+ | Run a model-backed agent from my terminal | [Run an agent](#run-an-agent) |
42
+ | Inspect saved runs inside my IDE | [Connect your IDE](#connect-your-ide) |
43
+ | Share or import an app | [Use the Marketplace](#use-the-marketplace) |
44
+
45
+ ### Run an agent
46
+
47
+ Set `OPENAI_API_KEY` in your environment. Replace `YOUR_MODEL` with an OpenAI model available to your key.
48
+
49
+ ```bash
50
+ npx agent-lyra agent run --model YOUR_MODEL --prompt "Draft a project update"
51
+ npx agent-lyra run status YOUR_RUN_ID
52
+ ```
53
+
54
+ Copy the run ID printed by the first command into the second. The CLI saves run events locally in `.lyra/state/runs.sqlite`. To run a writer followed by a reviewer, use `team run draft-review` with the same model and prompt flags.
55
+
56
+ ### Connect your IDE
57
+
58
+ Configure a stdio MCP server with the installed `agent-lyra` executable, using its absolute path if your IDE requires one. Set the arguments to:
59
+
60
+ ```json
61
+ ["mcp", "serve", "--dir", "ABSOLUTE_PROJECT_PATH"]
62
+ ```
63
+
64
+ The MCP server reads saved runs from that project.
65
+
66
+ ### Use the Marketplace
67
+
68
+ Generate a shareable listing preview with `npx agent-lyra app publish .lyra/app/manifest.json --dry-run`. Review it before submitting the listing in the cloud. Browse apps publicly, then sign in to import an editable private copy. CLI imports require an existing Lyra session supplied through `LYRA_SESSION_TOKEN`. [Marketplace Apps](https://agentlyra.in/marketplace/apps)
69
+
70
+ ## CLI reference
71
+
72
+ Prefix each command with `npx agent-lyra`. Angle brackets indicate required arguments. Square brackets indicate optional arguments.
73
+
74
+ ### Project setup
75
+
76
+ | Command | What it does |
77
+ | --- | --- |
78
+ | `init [options]` | Scaffold a `.lyra` workspace and starter agents. Options include `--mode`, `--domains`, `--api-key`, `--api-base-url`, `--dir`, and `--force`. |
79
+ | `--help` | Show the init command and its options. The help alias does the same. Add `--help` to a specific command for its syntax. |
80
+
81
+ ### App Builder
82
+
83
+ | Command | What it does |
84
+ | --- | --- |
85
+ | `app init [manifest.json]` | Create the Support IQ starter. Defaults to `.lyra/app/manifest.json`. |
86
+ | `app validate <manifest.json>` | Check the app manifest before previewing or exporting. |
87
+ | `app preview <manifest.json>` | Run the starter preview on loopback. Set `LYRA_PREVIEW_PORT` to change its port. |
88
+ | `app export <manifest.json> <new-directory>` | Export the supported starter into a new directory. |
89
+ | `app publish <manifest.json> --dry-run` | Print the proposed Marketplace payload for review. Submit the listing in the cloud. |
90
+ | `app use <listing-id> [new-manifest.json]` | Import a published app and save its manifest. Requires `LYRA_SESSION_TOKEN`. |
91
+
92
+ ### Agent runs and IDE integration
93
+
94
+ | Command | What it does |
95
+ | --- | --- |
96
+ | `agent run --model <model> --prompt <text>` | Run a local agent with an OpenAI model. Requires `OPENAI_API_KEY`. |
97
+ | `team run draft-review --model <model> --prompt <text>` | Run the built-in writer and reviewer team. Requires `OPENAI_API_KEY`. |
98
+ | `run status <run-id>` | Read the latest event for a run from local SQLite history. |
99
+ | `mcp serve --dir <absolute-project-directory>` | Expose saved runs to an IDE over read-only stdio MCP. |
100
+
101
+ ## Use the library from JavaScript
102
+
103
+ ```js
104
+ import { createLinearWorkflow, runWorkflow } from "agent-lyra/standalone";
105
+
106
+ const workflow = createLinearWorkflow(
107
+ async () => "collect",
108
+ async (context) => `${context.step_1}:analyze`,
109
+ );
110
+
111
+ console.log(await runWorkflow(workflow));
112
+ ```
113
+
114
+ The standalone entry point also includes retrieval utilities. The gated entry point is a compatibility client for deployments that expose the hosted invocation API. Check endpoint compatibility before using it with a cloud deployment.
115
+
116
+ ## Current scope
117
+
118
+ The App Builder preview and exporter support the included Support IQ starter. OpenAI-backed agent runs use your own provider key. Cloud accounts and AgentLyra API keys are managed in the [AgentLyra console](https://console.agentlyra.in/).
119
+
120
+ MIT licensed.
package/package.json CHANGED
@@ -1,56 +1,56 @@
1
- {
2
- "name": "agent-lyra",
3
- "version": "0.3.0",
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.2",
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
+ }