agent-lyra 0.6.3 → 0.6.4

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 +150 -350
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,435 +1,235 @@
1
- # AgentLyra SDK
2
-
3
- Build apps from your saved Lyra agents, 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
- ## Choose an SDK mode
8
-
9
- | Mode | Where work runs | What you need |
10
- | --- | --- | --- |
11
- | **Work locally** | In your own Node.js process. Use `agent-lyra/standalone` for local workflows and retrieval, or run your own local workflows. | No AgentLyra account or key. Model-backed CLI runs use your own OpenAI key. |
12
- | **Connect to Cloud** | On a compatible hosted backend. `agent-lyra/gated` calls the backend's `/agents/<vertical>/invoke` endpoint. | A Lyra API key for that backend and its base URL. For AgentLyra Cloud, use an AgentLyra API key with hosted agent access and the base URL https://api.agentlyra.in/api/sdk/v1. Cloud SDK calls also require an OpenAI key in Models settings. |
13
-
14
- The App Builder below uses an AgentLyra API key with hosted agent access to run saved agents in AgentLyra Cloud. Standalone workflows remain available through the SDK and CLI.
15
-
16
- ## Install
17
-
18
- Requires **Node.js 22.13 or newer**. From your project directory:
19
-
20
- ```bash
21
- npm install agent-lyra
22
- ```
23
-
24
- Use `pnpm add agent-lyra` if your project uses pnpm. Run the CLI with `npx agent-lyra` after installation.
25
-
26
- ## Cloud access
27
-
28
- ### Switch workspace mode from your IDE
29
-
30
- From the project folder, run one of these commands:
31
-
32
- ```sh
33
- npx.cmd agent-lyra connect-cloud
34
- npx.cmd agent-lyra work-locally
35
- ```
36
-
37
- The first connection to Cloud prompts for an AgentLyra API key if none is available. Paste the key at the hidden prompt. The CLI saves a prompted key under `~/.agent-lyra/` for reuse by your OS account. Later switches reuse it. Run `npx.cmd agent-lyra connect-cloud --replace-key` to replace it. Working locally pauses Studio Cloud pulls and runs. Switching preserves your canvas and local agents. When connected to Cloud, you can use local and Cloud agents. If Studio is already open, click **Reload agents** to refresh the mode shown in its header.
1
+ <img src="https://agentlyra.in/images/logo.png" width="80" height="80" alt="AgentLyra constellation mark">
38
2
 
3
+ # AgentLyra SDK
39
4
 
40
- ### Push a local text agent to Cloud
5
+ **Build agent workflows, design apps, and set up coding assistants from your project.**
41
6
 
42
- Generate an **AgentLyra API key** with Cloud resource sync permission on the API Keys page and set it with `npx.cmd agent-lyra connect-cloud --replace-key`. In Studio, click **Push to Cloud** on a local Markdown agent. From the terminal, use `npx.cmd agent-lyra studio push <local-agent-id>`. This sends the name and instructions and creates a private Cloud agent. Later pushes update the same agent. If the Cloud instructions or name changed, Studio stops before overwriting them. Use **Pull agent edits** on the linked card or `npx.cmd agent-lyra studio pull-agent <local-agent-id>` to bring the Cloud version back. If both copies changed, review them before updating either one. If your terminal already sets `LYRA_API_KEY`, that value takes priority over the saved key.
7
+ [Get started](#get-started) · [SDK](#sdk-library) · [Coding setup](#coding-setup) · [Studio](#lyra-studio) · [App Builder](#lyra-app-builder) · [Memory](#project-memory-and-skill-proposals) · [Cloud](#agentlyra-cloud-and-marketplace)
43
8
 
44
- ### Sync a sequential workflow
9
+ [Website](https://agentlyra.in/) · [Cloud console](https://console.agentlyra.in/) · [GitHub](https://github.com/agentlyra-labs/agent-lyra-sdk) · [npm](https://www.npmjs.com/package/agent-lyra) · [PyPI](https://pypi.org/project/agent-lyra/)
45
10
 
46
- Use an **AgentLyra API key** with Cloud resource sync permission. Push any local Markdown agents referenced by the workflow first. Save a workflow such as this one in `.lyra/workflows/review.json`:
11
+ ## Choose your starting point
47
12
 
48
- ```json
49
- {
50
- "id": "review",
51
- "name": "Draft and review",
52
- "description": "Run two text agents in order.",
53
- "runnable": true,
54
- "steps": [
55
- {"agentId": "local:writer", "task": "Draft a note.", "output": "draft"},
56
- {"agentId": "local:reviewer", "task": "Review the draft.", "input": "draft"}
57
- ]
58
- }
59
- ```
13
+ | | What you get |
14
+ | --- | --- |
15
+ | **GitHub source edition** | MIT-licensed JavaScript workflow and retrieval primitives, local execution and run history, evidence-based memory, manifest validation, and [technology skill guides](https://github.com/agentlyra-labs/agent-lyra-sdk/tree/main/src/coding/skills). |
16
+ | **SDK from npm or PyPI** | Coding stack detection, agent and skill generation, assistant exports, Studio, App Builder, and optional Cloud access. The Python package also provides native Python workflow and memory APIs. |
17
+ | **AgentLyra Cloud** | A signed-in workspace for hosted agents, syncing selected project resources, and browsing the Marketplace. |
60
18
 
61
- In Studio, use **Push to Cloud** on the workflow card. This creates a sequential workflow in your own Cloud account. Use **Pull workflow edits** on the same card to bring changes back. If both copies changed, syncing stops for review. Use **Pull from Cloud** to download references for any newly added Cloud agents. Canvas workflows and their triggers are outside this sync path.
19
+ ## Get started
62
20
 
63
- From the terminal:
21
+ **JavaScript · Node.js 22.13 or newer**
64
22
 
65
23
  ```sh
66
- npx.cmd agent-lyra studio push-workflow review
67
- npx.cmd agent-lyra studio pull-workflow review
68
- ```
69
-
70
-
71
- ### Sync a personal team
72
-
73
- Use an **AgentLyra API key** with Cloud resource sync permission. Push local agents first, then save a definition such as this one in `.lyra/teams/research.json`:
74
-
75
- ```json
76
- {"id":"research","name":"Research","description":"Draft and review research notes.","agentIds":["local:writer"]}
24
+ npm install agent-lyra
25
+ npx agent-lyra --help
26
+ npx agent-lyra setup coding --detect --preview
77
27
  ```
78
28
 
79
- Use **Push to Cloud** on the team card to create or update a private team where you are the only member. Use **Pull team edits** to bring back the name, description, and active assignments. Manage shared teams and teams with pending invitations or requests in the Cloud console. If you want to assign an agent that was removed or blocked, review it in the Cloud roster before syncing again.
29
+ **Python · Python 3.9 or newer**
80
30
 
81
31
  ```sh
82
- npx.cmd agent-lyra studio push-team research
83
- npx.cmd agent-lyra studio pull-team research
32
+ python -m pip install agent-lyra
33
+ python -m lyra --help
34
+ python -m lyra setup coding --detect --preview
84
35
  ```
85
36
 
37
+ Coding setup, Studio, App Builder, Cloud commands, and skill proposals require Node.js 22.13 or newer. Native Python workflows and local Memory commands run with Python alone.
86
38
 
87
- ### Sync a text skill
88
-
89
- Use an **AgentLyra API key** with Cloud resource sync permission. Save a text definition such as this one in `.lyra/skills/notes.json`:
90
-
91
- ```json
92
- {"id":"notes","name":"Meeting notes","description":"Turn notes into a short recap.","body":"Summarize decisions and list next steps."}
93
- ```
94
-
95
- In Studio, use **Push to Cloud** on the skill card to create a private skill in your Cloud skill registry. Use **Pull skill edits** to bring back changes from Cloud. If both copies changed, sync stops for review. The skill's name, description, and text instructions can sync. Configure tool access and agent assignments separately. Executable Python skills stay in their local runtime.
39
+ **GitHub source edition · Node.js 22.13 or newer**
96
40
 
97
41
  ```sh
98
- npx.cmd agent-lyra studio push-skill notes
99
- npx.cmd agent-lyra studio pull-skill notes
42
+ git clone https://github.com/agentlyra-labs/agent-lyra-sdk.git
43
+ cd agent-lyra-sdk
44
+ node bin/agent-lyra.js --help
100
45
  ```
101
46
 
47
+ Run project commands from your own project folder using the absolute path to the cloned CLI. Use the npm or PyPI install below to try Studio, App Builder, coding setup, or Cloud commands.
102
48
 
103
- ### Add Cloud access with an environment variable
104
-
105
- Standalone agents run in your project. Cloud agents run in AgentLyra Cloud. Studio can use both in one canvas. You can keep your existing `.lyra` files and `manifest.json`. Rerunning `init` or changing the manifest mode is unnecessary.
106
-
107
- 1. Open [AgentLyra Console → API Keys](https://console.agentlyra.in/mcp-servers). Select **Generate AgentLyra API key** and copy the key beginning with `lyra_sdk_`.
108
- 2. In VS Code, open a **PowerShell** terminal in your project. Run the line below, paste the key at the masked prompt, and press Enter. The key is available to this terminal and the programs it starts.
49
+ **Command prefixes used below**
109
50
 
110
- ```powershell
111
- $env:LYRA_API_KEY = Read-Host "Paste your AgentLyra API key" -MaskInput
112
- ```
113
-
114
- 3. Start Studio from that same terminal. If it is already running, stop it first with **Ctrl+C** so it picks up the key.
115
-
116
- ```sh
117
- npx agent-lyra studio
118
- ```
119
-
120
- 4. Open the URL Studio prints and click **Pull from Cloud**. You can also pull from the terminal with `npx agent-lyra studio pull`. The pull adds agent references, workflows, team metadata, and skill references under `.lyra/` and preserves existing files.
121
- 5. In the Inspector, choose the Cloud agent for an **Agent card**, or add it to a **Run button** sequence. Existing bindings keep using their current agents until you change them. To execute a Cloud agent, also configure your OpenAI key in **Console → Models**. The AgentLyra API key authorizes the pull and Cloud requests.
122
-
123
- For exported apps with Cloud agents, set `LYRA_API_KEY` in the terminal that starts the exported app. Keep keys out of manifests and Git. If Studio asks for the AgentLyra API key after you set it, check that you launched Studio in the same terminal. If Cloud execution asks for a provider key, check **Console → Models**.
124
-
125
-
126
- ## Build an app from your Lyra agents
127
-
128
- Create two enabled text agents in AgentLyra Console. In [API key settings](https://console.agentlyra.in/mcp-servers), choose **Generate AgentLyra API key** and set it as `LYRA_API_KEY` in your terminal environment. Add your own OpenAI key in Console → Models. Keep both keys out of source control.
129
-
130
- ```bash
131
- npx agent-lyra app init
132
- npx agent-lyra app validate manifest.json
133
- npx agent-lyra app preview manifest.json
134
- ```
135
-
136
- Choose the agents in the order they should run. The CLI creates one `manifest.json` in your project. Open the URL printed by the preview and enter some text. The first agent runs on that input, then the second receives the input and first result. The browser shows both outputs. This version runs each saved agent's instructions as text-only; connected tools and skills are outside this workflow.
137
-
138
- Stop the preview or open a new terminal, then export into a new folder:
139
-
140
- ```bash
141
- npx agent-lyra app export manifest.json ./my-app
142
- cd my-app
143
- npm start
144
- ```
145
-
146
- The export contains editable HTML, a Node.js server, the runtime, and the app manifest. Keep `LYRA_API_KEY` in the server environment. The exported server binds to loopback and the two agents continue to run in Cloud.
147
-
148
- ## Choose the workflow you need
149
-
150
- | I want to… | Start here |
51
+ | Edition | Prefix |
151
52
  | --- | --- |
152
- | Build a drag-and-drop app | [Local Studio](#local-studio) |
153
- | Set up a repo with starter agent definitions | `npx agent-lyra init` |
154
- | Build and export an app from your own saved agents | [Build an app from your Lyra agents](#build-an-app-from-your-lyra-agents) |
155
- | Run a model-backed agent from my terminal | [Run an agent](#run-an-agent) |
156
- | Inspect saved runs inside my IDE | [Connect your IDE](#connect-your-ide) |
157
- | Share or import an app | [Use the Marketplace](#use-the-marketplace) |
53
+ | JavaScript | `npx agent-lyra` |
54
+ | Python | `python -m lyra` |
55
+ | GitHub source | `node /absolute/path/to/agent-lyra-sdk/bin/agent-lyra.js` |
158
56
 
159
- ### Run an agent
57
+ Values in angle brackets are placeholders. Use `--help` to check arguments for the command you’re running. On Windows PowerShell, use `npm.cmd` and `npx.cmd` if PowerShell blocks the script shims.
160
58
 
161
- Set `OPENAI_API_KEY` in your environment. Replace `YOUR_MODEL` with an OpenAI model available to your key.
162
-
163
- ```bash
164
- npx agent-lyra agent run --model YOUR_MODEL --prompt "Draft a project update"
165
- npx agent-lyra run status YOUR_RUN_ID
166
- ```
167
-
168
- 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.
169
-
170
- ### Connect your IDE
171
-
172
- 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
+ | Command | Availability | Purpose |
60
+ | --- | --- | --- |
61
+ | `--help` | All editions | Show the CLI entry points |
62
+ | `init [--mode standalone] [--dir <folder>]` | All editions | Initialize a local workspace |
63
+ | `init --domains <ids> [--stack <names> or --detect]` | npm, Python | Select domains and optionally configure a coding stack. The registry wizard also supports hosted setup |
173
64
 
174
- ```json
175
- ["mcp", "serve", "--dir", "ABSOLUTE_PROJECT_PATH"]
176
- ```
65
+ The registry wizard supports `--mode`, `--domains`, `--stack`, `--detect`, `--dir`, `--force`, `--api-key`, and `--api-base-url`. For account credentials, prefer the hidden prompt in `connect-cloud`.
177
66
 
178
- The MCP server reads saved runs from that project.
67
+ ## SDK library
179
68
 
180
- ### Use the Marketplace
69
+ Use the SDK directly in your own code to compose workflows, run agents, and work with retrieval. Choose the runtime and provider that fit your app.
181
70
 
182
- 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)
71
+ **JavaScript**
183
72
 
184
- ## Local Studio
73
+ ```js
74
+ import { standalone } from 'agent-lyra';
185
75
 
186
- ```bash
187
- npx agent-lyra studio
76
+ const workflow = standalone.createLinearWorkflow(() => 'Draft ready');
77
+ console.log(await standalone.runWorkflow(workflow));
188
78
  ```
189
79
 
190
- Open the printed loopback URL. Drag a heading, text, input, text area, run button, or output onto the canvas. You can also add components by clicking them. Select a run button in the inspector, bind an input and output, and add agents or compatible workflows in the order they should run. **Save layout** writes the layout into your root `manifest.json`.
191
-
192
- Studio reads standalone Markdown agents from `.lyra/agents/`. Each needs an `id`, a `name`, and a `## System Prompt` section. To run a local agent, set `OPENAI_API_KEY` and choose a model in the Run now drawer. Override the model list with a comma-separated `LYRA_STUDIO_MODELS` environment variable if needed.
193
-
194
- Follow [Add Cloud access](#cloud-access) to import Cloud resources. Studio runs compatible sequential text workflows. Canvas workflows and teams appear as references.
195
-
196
- Add an **Agent card** to let users run one agent directly from the app. Choose the agent in the Inspector and optionally bind an input and an output. Use a **Run button** for a sequence of agents or workflows.
197
-
198
- Save the canvas in Studio and export it with `npx agent-lyra app export manifest.json ./my-app`. Open the new folder and run `npm start` to launch the app locally. The export keeps the component layout and Run button bindings. It includes the prompts of referenced local agents and the IDs of referenced Cloud agents. Supply your API keys through environment variables when starting the app.
199
-
200
-
201
- ### Run a Python skill from the canvas
202
-
203
- Install the Python SDK in your environment. Create `.lyra/agents/draft.py`:
80
+ **Python**
204
81
 
205
82
  ```python
206
- from lyra.standalone import Agent, Skill
207
-
208
- def draft(text):
209
- return f"Draft: {text}"
210
-
211
- agent = Agent("draft", [Skill("draft-note", draft)])
212
- ```
83
+ import asyncio
84
+ from lyra.standalone import create_linear_workflow, run_workflow
213
85
 
214
- Register the skill in `.lyra/agents/draft.json`:
86
+ async def draft(context):
87
+ return "Draft ready"
215
88
 
216
- ```json
217
- {"id":"draft","name":"Draft a note","runtime":"python","file":"draft.py","skill":"draft-note"}
89
+ print(asyncio.run(run_workflow(create_linear_workflow(draft))))
218
90
  ```
219
91
 
220
- Restart Studio or click **Reload agents**. Select **Draft a note** on an Agent card, or add it to a Run button's execution order. Studio passes the input as a string, along with any previous step result. Skills may return strings or JSON-serializable values. The Python CLI uses its own interpreter. If you launch Studio from npm or start an exported app, set `LYRA_PYTHON` to your virtual environment's Python executable when needed.
92
+ From the GitHub source edition, import the JavaScript primitives from `./src/standalone/index.js`. That edition also includes the [v1 manifest contract](https://github.com/agentlyra-labs/agent-lyra-sdk/blob/main/src/app-builder/manifest-contract.js).
221
93
 
222
- Export includes the Python files bound to the canvas. Install the Python SDK and any dependencies in the environment running the export. If an agent imports other project files, add those files to the exported project and make them importable in that environment. Run Python agents from projects whose source you trust.
223
-
224
- ## Local memory
225
-
226
- Local memory stores notes you explicitly record in `.lyra/memory/memory.db`. It works offline and does not need an AgentLyra account. Each new note is a candidate. Use a reviewed test receipt to verify a coding correction. Automatic capture is outside this release. Cloud sync is optional and record by record.
227
-
228
- Run commands from the folder you want to associate with the database:
229
-
230
- ```sh
231
- npx agent-lyra memory init
232
- npx agent-lyra memory record lesson.json
233
- npx agent-lyra memory search "nullable GraphQL"
234
- npx agent-lyra memory list
235
- npx agent-lyra memory stats
236
- ```
237
-
238
- Example `lesson.json`:
239
-
240
- ```json
241
- {
242
- "type": "corrective",
243
- "title": "Handle nullable API fields",
244
- "learning": "Show the fallback when the response field is null.",
245
- "evidence": ["test:nullable-response"]
246
- }
247
- ```
248
-
249
- Evidence IDs are references. Recording an ID does not verify the lesson. Copy the ID returned by `record` into `memory inspect <id>`, `memory archive <id>`, or `memory forget <id> --yes`. Archive keeps the record for inspection and excludes it from search. Forget removes the content from normal store access and retains a deletion marker with the ID, revision, and deletion time.
250
-
251
- Set `LYRA_MEMORY=off` in the launching process to disable local memory. Store only information appropriate for your machine. The database is plain SQLite and the memory folder has its own Git ignore file. Use OS account protections or disk encryption as appropriate. Close all memory clients before copying the database for a backup or before restoring it to another project. WAL files and older backups may retain deleted content.
252
-
253
-
254
- Use `openMemoryStore(projectPath)` from `agent-lyra/memory` for programmatic access. Close the store after use.
255
-
256
- ### Verify a coding correction
257
-
258
- Run your test, review whether it supports the correction, and record the test reference in the memory's `evidence` list. Save a receipt like this as `evidence.json`:
259
-
260
- ```json
261
- {
262
- "adapter": "coding",
263
- "evidenceId": "test:nullable-response",
264
- "test": "nullable-response",
265
- "result": "passed",
266
- "reviewed": true,
267
- "context": "graphql-client@1"
268
- }
269
- ```
270
-
271
- ```sh
272
- npx agent-lyra memory verify MEMORY_ID evidence.json
273
- ```
274
-
275
- This command checks the receipt and recorded evidence reference. The developer supplies the test result and attests to the review. The command does not run the test or independently prove the correction.
276
-
277
- For model-backed local runs, set `LYRA_MEMORY_CONTEXT` to the same compatibility tag in the terminal that launches the Node CLI or Studio. Use a new tag when relevant dependencies or assumptions change. The runner includes a few relevant verified memories as historical context and keeps the current request intact. Starting without a tag leaves retrieval off. Native Python callers can use `MemoryStore.retrieve(query, context)` explicitly. Python skills, Cloud agents, and exported apps do not automatically retrieve project memory.
278
-
279
-
280
- ### Practice exercise adapter
281
-
282
- The experimental `practice` adapter supports self-contained training exercises. Record a procedural or corrective lesson with an `exercise:` evidence ID, then verify it with a reviewed passing receipt. For example:
283
-
284
- ```json
285
- {"adapter":"practice","evidenceId":"exercise:async-sequence","exercise":"async-sequence","result":"passed","reviewed":true,"context":"async-practice@1"}
286
- ```
287
-
288
- Set `LYRA_MEMORY_ADAPTER=practice` and `LYRA_MEMORY_CONTEXT=async-practice@1` for a model-backed local run. The default adapter is `coding`. Retrieval filters by both adapter and compatibility context. Skill proposal consolidation currently uses coding corrections.
94
+ | Command | Availability | Purpose |
95
+ | --- | --- | --- |
96
+ | `agent run --model <model> --prompt <text>` | Source, npm | Run the local assistant with an OpenAI model |
97
+ | `team run draft-review --model <model> --prompt <text>` | Source, npm | Run the built-in drafting and review sequence |
98
+ | `run status <run-id>` | Source, npm | Read the latest saved run event |
99
+ | `mcp serve --dir <absolute-project-directory>` | Source, npm | Expose `get_saved_run` over read-only stdio MCP |
289
100
 
290
- From the AgentLyra source checkout, run `node packages/lyra/examples/evaluate-practice-memory.js` to compare a synthetic task with memory off, memory on, and a stale compatibility context. The example uses a fixed model response to test context assembly. It does not measure learning outcomes or live model quality.
101
+ Model-backed runs require `OPENAI_API_KEY`. The provider receives the prompt and any retrieved project memory included with it. AgentLyra records local run history in SQLite. The MCP tool can read saved run output by UUID.
291
102
 
292
- ### Review a skill proposal
103
+ ## Coding setup
293
104
 
294
- Consolidation groups verified corrections with matching wording, a shared compatibility tag, and distinct test references. It reports the groups without changing the source memories. Use a memory ID from one group to draft a proposal.
105
+ Generate editable agents and skills in `.lyra/` for the technology you use. Choose packs manually or let Lyra detect your stack from local project files. Review the preview before applying it. Existing files are preserved.
295
106
 
296
107
  ```sh
297
- npx agent-lyra memory consolidate graphql-client@1
298
- npx agent-lyra skills evolve graphql-client@1 MEMORY_ID
299
- npx agent-lyra skills proposal PROPOSAL_ID
300
- ```
301
-
302
- Review the draft Markdown and run a separate regression test. Save a receipt such as this one as `regression.json`:
303
-
304
- ```json
305
- {"evidenceId":"test:skill-regression","context":"graphql-client@1","result":"passed","reviewed":true}
306
- ```
307
-
308
- ```sh
309
- npx agent-lyra skills approve PROPOSAL_ID regression.json
108
+ npx agent-lyra setup coding --detect --preview
109
+ npx agent-lyra setup coding --stack playwright-cucumber --yes
110
+ npx agent-lyra setup coding export --to claude,codex,copilot --preview
310
111
  ```
311
112
 
312
- The approval records your review. It does not install the proposal or edit any skill file. Use `skills proposals` to list drafts, `skills reject PROPOSAL_ID` to reject a pending proposal, or `skills withdraw PROPOSAL_ID` to revoke an approval. These commands do not run tests themselves. Forgetting a source memory removes its dependent proposals from the local store.
113
+ | Command | Purpose |
114
+ | --- | --- |
115
+ | `setup coding` | Choose technologies interactively |
116
+ | `setup coding --stack <names>` | Choose packs or presets such as `mern`, `python-fastapi`, and `playwright-cucumber` |
117
+ | `setup coding --detect` | Review detected technologies and the files that support each recommendation |
118
+ | `setup coding --stack <names> --catalog-version <number> --preview` | Preview a published Cloud catalog version. Without this option, setup uses the bundled catalog offline |
119
+ | `setup coding export --to claude,codex,copilot --preview` | Preview assistant-specific instructions. Replace `--preview` with `--yes` to write the files |
313
120
 
314
- ### Sync selected memories to Cloud
121
+ These commands are available in npm and Python. Both setup commands accept `--dir <folder>`. After setup, you can run `node .lyra/scripts/detect-stack.mjs` for a read-only JSON report. The GitHub source edition includes the guide files for reading and reuse.
315
122
 
316
- Local memory stays on your machine by default. In [Console → API Keys](https://console.agentlyra.in/mcp-servers), select **Generate AgentLyra API key** with **Sync verified memories** enabled. Leave all permissions selected to reuse the same key for hosted agents, Cloud resources, and memories.
123
+ ## Lyra Studio
317
124
 
318
- ```sh
319
- npx agent-lyra connect-cloud
320
- ```
321
-
322
- If you previously saved a key, add `--replace-key` to enter the new one. Existing dedicated Memory keys still work through `LYRA_MEMORY_KEY`, which takes priority for Memory sync.
323
-
324
- From the same terminal, preview a verified record and then explicitly confirm the upload:
125
+ Studio is a **local browser canvas** that you launch from your IDE terminal. Add a text input, agent card or run button, and an output. Use the Inspector to bind inputs and outputs, then run an agent or workflow from the canvas.
325
126
 
326
127
  ```sh
327
- npx agent-lyra memory cloud preview MEMORY_ID
328
- npx agent-lyra memory cloud push MEMORY_ID --yes
128
+ npx agent-lyra studio
329
129
  ```
330
130
 
331
- The preview shows the name, lesson, type, and evidence IDs that will be sent. Review it for personal or proprietary information. Model requests, run transcripts, files, approvals, and working state are outside this sync path.
332
-
333
- In a second project or machine, use the same Cloud account and run:
131
+ Run `python -m lyra studio` from a Python project. Start from the project root so Studio can find your `.lyra` agents, workflows, and skills. See [Cloud sync](#agentlyra-cloud-and-marketplace) for importing or pushing selected resources.
334
132
 
335
- ```sh
336
- npx agent-lyra memory cloud list
337
- npx agent-lyra memory cloud pull MEMORY_ID
338
- ```
339
-
340
- Imported records start as candidates and require local review before an agent can retrieve them. If the two copies changed, sync stops. Review both before changing either one. To propagate a deletion, run `memory forget MEMORY_ID --yes` locally. Preview and push that ID again to remove its Cloud content. In the other project, pull the ID to apply the deletion when its local copy has no conflicting changes.
133
+ ## Lyra App Builder
341
134
 
342
- Cloud sync is manual and uses Node.js for the shared CLI. Revoking the key blocks future requests. Previously downloaded local copies remain until removed from their workspaces.
135
+ App Builder turns an **app manifest** into a browser preview or editable application source. Use `app init` to start with saved Cloud agents, then validate, preview, and export.
343
136
 
137
+ | Command | Purpose |
138
+ | --- | --- |
139
+ | `app init [manifest.json]` | Create a manifest using saved Cloud agents. Connect to Cloud first |
140
+ | `app validate <manifest.json>` | Check the manifest |
141
+ | `app preview <manifest.json>` | Open a local browser preview. Set `LYRA_PREVIEW_PORT` if you need a different port |
142
+ | `app export <manifest.json> <new-directory>` | Export editable source to a new directory |
344
143
 
345
- ## CLI reference
144
+ These commands are available in npm and Python. To import an app or preview a public listing, see [Marketplace](#marketplace).
346
145
 
347
- Prefix each command with `npx agent-lyra`. Angle brackets indicate required arguments. Square brackets indicate optional arguments.
146
+ ## Project Memory and Skill Proposals
348
147
 
349
- ### Project setup
148
+ Project Memory uses SQLite on your machine. Record a lesson, verify it against evidence, and retrieve it for later runs. The runtimes provide SQLite, so there is no separate database server to install.
350
149
 
351
- | Command | What it does |
352
- | --- | --- |
353
- | `init [options]` | Scaffold a `.lyra` workspace and starter agents. Options include `--mode`, `--domains`, `--api-key`, `--api-base-url`, `--dir`, and `--force`. |
354
- | `--help` | Show the init command and its options. The help alias does the same. Add `--help` to a specific command for its syntax. |
150
+ ### Local memory
355
151
 
356
- ### Studio and App Builder
152
+ Local memory commands work in Source, npm, and Python. `consolidate` uses the shared Node CLI from Python.
357
153
 
358
- | Command | What it does |
154
+ | Command | Purpose |
359
155
  | --- | --- |
360
- | `studio` | Open the drag-and-drop canvas. |
361
- | `studio pull` | Import Cloud agents, workflows, and teams. Requires `LYRA_API_KEY`. |
362
- | `app init [manifest.json]` | Select two saved Lyra agents. Defaults to `manifest.json` in your project. |
363
- | `app validate <manifest.json>` | Check the app manifest before previewing or exporting. |
364
- | `app preview <manifest.json>` | Preview the app in your browser on loopback. Set `LYRA_PREVIEW_PORT` to change its port. |
365
- | `app export <manifest.json> <new-directory>` | Export editable app source into a new directory. |
366
- | `app publish <manifest.json> --dry-run` | Print the proposed Marketplace payload for review. Submit the listing in the cloud. |
367
- | `app use <listing-id> [new-manifest.json]` | Import a published app and save its manifest. Requires `LYRA_SESSION_TOKEN`. |
368
-
369
- ### Agent runs and IDE integration
370
-
371
- | Command | What it does |
372
- | --- | --- |
373
- | `agent run --model <model> --prompt <text>` | Run a local agent with an OpenAI model. Requires `OPENAI_API_KEY`. |
374
- | `team run draft-review --model <model> --prompt <text>` | Run the built-in writer and reviewer team. Requires `OPENAI_API_KEY`. |
375
- | `run status <run-id>` | Read the latest event for a run from local SQLite history. |
376
- | `mcp serve --dir <absolute-project-directory>` | Expose saved runs to an IDE over read-only stdio MCP. |
377
-
378
- ## Use the library from JavaScript
156
+ | `memory --help` | List memory commands |
157
+ | `memory init` | Initialize the SQLite memory store |
158
+ | `memory record <json-file>` | Record a candidate lesson |
159
+ | `memory list` | List project memories |
160
+ | `memory search <query>` | Search project memory |
161
+ | `memory inspect <id>` | Read a record and its evidence references |
162
+ | `memory verify <id> <evidence.json>` | Verify a candidate against reviewed evidence |
163
+ | `memory archive <id>` | Archive a memory |
164
+ | `memory consolidate <context>` | Find recurring lessons for a context |
165
+ | `memory stats` | Show store counts and search mode |
166
+ | `memory forget <id> --yes` | Permanently remove a local record |
379
167
 
380
- ```js
381
- import { createLinearWorkflow, runWorkflow } from "agent-lyra/standalone";
168
+ See [memory types](https://github.com/agentlyra-labs/agent-lyra-sdk/blob/main/src/memory/index.d.ts) and [evidence validation](https://github.com/agentlyra-labs/agent-lyra-sdk/blob/main/src/memory/validation.js). Store evidence references and reusable lessons. Keep secrets and sensitive data in appropriate stores. Use `LYRA_MEMORY_CONTEXT=off` to disable historical retrieval for model-backed runs.
382
169
 
383
- const workflow = createLinearWorkflow(
384
- async () => "collect",
385
- async (context) => `${context.step_1}:analyze`,
386
- );
170
+ ### Skill proposals
387
171
 
388
- console.log(await runWorkflow(workflow));
389
- ```
172
+ These commands work in Source, npm, and Python. Approving a proposal requires independent regression evidence.
390
173
 
391
- 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.
174
+ | Command | Purpose |
175
+ | --- | --- |
176
+ | `skills --help` | List skill proposal commands |
177
+ | `skills evolve <context> <memory-id>` | Draft an improvement from verified memory |
178
+ | `skills proposals` | List proposals |
179
+ | `skills proposal <id>` | Inspect a proposal and its sources |
180
+ | `skills approve <id> <regression.json>` | Approve a proposal with evidence |
181
+ | `skills reject <id>` | Reject a pending proposal |
182
+ | `skills withdraw <id>` | Withdraw an approval |
392
183
 
393
- ## Current scope
184
+ ## AgentLyra Cloud and Marketplace
394
185
 
395
- The App Builder supports two saved text agents in sequence. Publishing saved-agent app manifests to Marketplace is outside the current release. 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/).
186
+ [Open the AgentLyra console](https://console.agentlyra.in/) to run hosted agents, manage a workspace, and view synced records. Create one AgentLyra API key under [API Keys](https://console.agentlyra.in/mcp-servers). Enable the permissions you need for hosted runs, resource sync, and verified memory sync.
396
187
 
397
- MIT licensed.
188
+ | Command | Purpose |
189
+ | --- | --- |
190
+ | `connect-cloud [--replace-key]` | Connect once from the IDE. Use `--replace-key` to enter a new key |
191
+ | `work-locally` | Pause Cloud actions while keeping project files |
398
192
 
399
- ## Set up coding agents and skills
193
+ These commands are available in npm and Python. The compatibility names `gated` and `standalone` still work for switching modes. Provider credentials are configured separately where a hosted run requires them.
400
194
 
401
- Choose **Coding** or **Engineering** during interactive `init`, or run `npx agent-lyra setup coding` from an existing project. The Python command uses the bundled CLI and requires Node.js 22.13 or newer.
195
+ ### Sync project resources
402
196
 
403
- ```sh
404
- npx agent-lyra setup coding --stack mern,typescript,playwright --preview
405
- npx agent-lyra setup coding --stack playwright-cucumber --yes
406
- ```
197
+ These commands work in the npm and Python distributions with a key that has Cloud resource sync permission.
407
198
 
408
- Choose frontend, backend, database, DevOps, or QA packs individually. Presets include `mern`, `python-fastapi`, and `playwright-cucumber`. Setup works locally and creates editable agents in `.lyra/agents` and skills in `.lyra/skills`. It preserves existing files on rerun. A new combination creates a separate profile for the affected area. Studio lists the generated agents and Markdown skills.
199
+ | Command | Purpose |
200
+ | --- | --- |
201
+ | `studio pull` | Pull the workspace catalog from Cloud |
202
+ | `studio push <agent-id>` | Push a local agent to Cloud |
203
+ | `studio pull-agent <agent-id>` | Pull changes to a linked agent |
204
+ | `studio push-workflow <workflow-id>` | Push a local workflow |
205
+ | `studio pull-workflow <workflow-id>` | Pull changes to a linked workflow |
206
+ | `studio push-team <team-id>` | Push a local team |
207
+ | `studio pull-team <team-id>` | Pull changes to a linked team |
208
+ | `studio push-skill <skill-id>` | Push a local text skill |
209
+ | `studio pull-skill <skill-id>` | Pull changes to a linked text skill |
409
210
 
410
- For an existing repository, preview automatic stack recommendations:
211
+ ### Sync verified memories
411
212
 
412
- ```sh
413
- npx agent-lyra setup coding --detect --preview
414
- ```
213
+ Cloud memory commands work in the npm and Python distributions. They require an AgentLyra API key with Memory sync permission.
415
214
 
416
- The scan prints the evidence for each folder and flags technologies that have no bundled pack. Run interactive setup to confirm the recommendations or choose manually. Use `--detect --yes` to apply recommendations unattended. After setup, run `node .lyra/scripts/detect-stack.mjs` to get a read-only JSON report. The scanner reads local project metadata and skips hidden directories, dependency trees, and symbolic links.
417
-
418
- ### Export to a coding assistant
215
+ | Command | Purpose |
216
+ | --- | --- |
217
+ | `memory cloud list [cursor]` | List your synced records |
218
+ | `memory cloud preview <id>` | Review what would be sent |
219
+ | `memory cloud push <id> --yes` | Upload the reviewed record |
220
+ | `memory cloud pull <id>` | Import a Cloud copy for local review |
419
221
 
420
- ```sh
421
- npx agent-lyra setup coding export --to claude,codex,copilot --preview
422
- npx agent-lyra setup coding export --to claude,codex,copilot --yes
423
- ```
222
+ A verified record stays local until you choose to upload it. Preview the payload before confirming a push. The Cloud copy is private to your account.
424
223
 
425
- The command reads the editable Markdown in `.lyra/agents` and `.lyra/skills`. An interactive run suggests targets from project folders and asks which ones to configure. Each target gets its own agent format and `SKILL.md` files. Preview reports existing files and the exporter preserves them. Export carries instructions only. Check referenced scripts and resources separately. Review any changed export against your customized copy before replacing an existing file.
224
+ ### Marketplace
426
225
 
427
- ### Choose a catalog version
226
+ Browse [published apps](https://agentlyra.in/marketplace/apps). Sign in to import or submit an app.
428
227
 
429
- Setup uses the bundled catalog offline. It includes frontend, backend, databases, DevOps, QA, mobile, and data engineering packs. To preview a specific published version from AgentLyra Cloud, run:
228
+ | Command | Purpose |
229
+ | --- | --- |
230
+ | `app use <listing-id> [new-manifest.json]` | Import a published app manifest. Requires `LYRA_SESSION_TOKEN` |
231
+ | `app publish <manifest.json> --dry-run` | Preview the listing payload. Submit the listing through Cloud |
430
232
 
431
- ```sh
432
- npx agent-lyra setup coding --detect --catalog-version 3 --preview
433
- ```
233
+ ## License
434
234
 
435
- Use `--stack` with a named preset or comma-separated technologies for manual setup. Catalog v3 includes a detailed guide for each technology. Existing files are preserved. To review a new guide alongside a personalized copy, generate the same stack in an empty folder and merge the changes you want. The setup receipt records which catalog version was selected.
235
+ The public source edition is available under the [MIT License](https://github.com/agentlyra-labs/agent-lyra-sdk/blob/main/LICENSE). For questions and reproducible bugs, use [GitHub Issues](https://github.com/agentlyra-labs/agent-lyra-sdk/issues). Report security issues privately and keep credentials out of issue reports.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-lyra",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "description": "Two-layer Lyra SDK with standalone local primitives and gated hosted agents.",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",