Skip to content

Commit 8e755a9

Browse files
committed
docs: update Lyzr integration section with SDK example, correct endpoint URL
1 parent 917f9f9 commit 8e755a9

1 file changed

Lines changed: 36 additions & 5 deletions

File tree

Documentation.md

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# GitClaw Documentation
22

33
> **GitClaw** — A universal git-native multimodal always-learning AI Agent
4-
> Version 1.3.0 | MIT License | [github.com/open-gitagent/gitclaw](https://github.com/open-gitagent/gitclaw)
4+
> Version 1.3.3 | MIT License | [github.com/open-gitagent/gitclaw](https://github.com/open-gitagent/gitclaw)
55
66
---
77

@@ -306,14 +306,45 @@ model:
306306

307307
### Lyzr Integration
308308

309-
When installed via the LYZR setup mode, GitClaw uses Lyzr AI Studio as the agent brain:
309+
GitClaw integrates with [Lyzr AI Studio](https://studio.lyzr.ai) as an agent brain. The Lyzr completions endpoint is fully OpenAI-compatible.
310310

311+
**Via installer (easiest):**
311312
```bash
312-
# Model format for Lyzr
313-
lyzr:<agent-id>@https://agent-prod.studio.lyzr.ai/v4/chat
313+
curl -fsSL https://raw.githubusercontent.com/open-gitagent/gitclaw/main/install.sh | bash
314+
# Pick option 1: "Install with LYZR"
315+
# Enter your Lyzr API key — agent is created automatically
316+
```
317+
318+
**Via CLI flag:**
319+
```bash
320+
export OPENAI_API_KEY="your-lyzr-api-key" # Lyzr uses standard Bearer auth
321+
gitclaw --model "lyzr:<agent-id>@https://agent-prod.studio.lyzr.ai/v4" --voice --dir ~/assistant
322+
```
323+
324+
**Via SDK (programmatic):**
325+
```typescript
326+
import { query } from "gitclaw";
327+
328+
// Set OPENAI_API_KEY to your Lyzr API key (uses standard Bearer auth)
329+
process.env.OPENAI_API_KEY = process.env.LYZR_API_KEY;
330+
331+
const result = query({
332+
prompt: "Hello! What can you help me with?",
333+
dir: "/path/to/agent",
334+
model: `lyzr:${LYZR_AGENT_ID}@https://agent-prod.studio.lyzr.ai/v4`,
335+
constraints: { temperature: 0.7, maxTokens: 2000 },
336+
});
337+
338+
for await (const msg of result) {
339+
if (msg.type === "assistant") console.log(msg.content);
340+
}
314341
```
315342

316-
The installer automatically creates the Lyzr agent and configures the endpoint.
343+
**How it works:**
344+
- Base URL: `https://agent-prod.studio.lyzr.ai/v4` (OpenAI SDK appends `/chat/completions`)
345+
- Auth: `Authorization: Bearer <LYZR_API_KEY>` (standard OpenAI-compatible)
346+
- Model field: your Lyzr agent ID (e.g., `69d52b90a011dc91d7877bfd`)
347+
- Full example: `examples/lyzr-sdk.ts`
317348

318349
---
319350

0 commit comments

Comments
 (0)