Przejdź do treści
Biblioteka skilli
AI i agenci · Nauka i wyjaśnianie

lindy-sdk-patterns

/lindy-sdk-patterns

Podpowiada dobre praktyki i typowe wzorce SDK Lindy AI: optymalizacja użycia API i funkcje agentów.

Repozytorium
agent ↗
Licencja
MIT
Ostatnia zmiana repozytorium
14.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
2
Przestarzałość

Brak sygnałów. Repozytorium zmienione 14.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Podpowiada dobre praktyki i typowe wzorce SDK Lindy AI: optymalizacja użycia API i funkcje agentów.

Wyzwalacze z opisu

lindy SDK patternslindy best practiceslindy API patternslindy code patterns
Oryginalny opis (EN)

Lindy AI SDK best practices and common patterns. Use when learning SDK patterns, optimizing API usage, or implementing advanced agent features. Trigger with phrases like "lindy SDK patterns", "lindy best practices", "lindy API patterns", "lindy code patterns".

Jak działa

  1. Overview
  2. Prerequisites
  3. Instructions
  4. Output
  5. Error Handling
  6. Examples
  7. Resources
  8. Next Steps
Sekcje z nagłówków SKILL.md, w oryginale · 137 linii, 400 słów
Podgląd SKILL.md
---
name: lindy-sdk-patterns
description: |
  Lindy AI SDK best practices and common patterns.
  Use when learning SDK patterns, optimizing API usage,
  or implementing advanced agent features.
  Trigger with phrases like "lindy SDK patterns", "lindy best practices",
  "lindy API patterns", "lindy code patterns".
allowed-tools: Read, Write, Edit
version: 1.0.0
license: MIT
author: Jeremy Longshore <jeremy@intentsolutions.io>
---

# Lindy SDK Patterns

## Overview
Essential SDK patterns and best practices for Lindy AI agent development.

## Prerequisites
- Completed `lindy-install-auth` setup
- Basic understanding of async/await
- Familiarity with TypeScript

## Instructions

### Pattern 1: Client Singleton
```typescript
// lib/lindy.ts
import { Lindy } from '@lindy-ai/sdk';

let client: Lindy | null = null;

export function getLindyClient(): Lindy {
  if (!client) {
    client = new Lindy({
      apiKey: process.env.LINDY_API_KEY!,
      timeout: 30000,
    });
  }
  return client;
}
```

### Pattern 2: Agent Factory
```typescript
// agents/factory.ts
import { getLindyClient } from '../lib/lindy';

interface AgentConfig {
  name: string;
  instructions: string;
  tools?: string[];
}

export async function createAgent(config: AgentConfig) {
  const lindy = getLindyClient();

  const agent = await lindy.agents.create({
    name: config.name,
    instructions: config.instructions,
    tools: config.tools || [],
  });

  return agent;
}
```

### Pattern 3: Retry with Backoff
```typescript
async function runWithRetry<T>(
  fn: () => Promise<T>,
  maxRetries = 3
): Promise<T> {
  for (let i = 0; i < maxRetries; i++) {
    try {
      return await fn();
    } catch (error: any) {
      if (error.status === 429 && i < maxRetries - 1) {
        await new Promise(r => setTimeout(r, Math.pow(2, i) * 1000));
        continue;
      }
      throw error;
    }
  }
  throw new Error('Max retries exceeded');
}
```

### Pattern 4: Streaming Responses
```typescript
async function streamAgentResponse(agentId: string, input: string) {
  const lindy = getLindyClient();

  const stream = await lindy.agents.runStream(agentId, { input });

  for await (const chunk of stream) {
    process.stdout.write(chunk.delta);
  }
  console.log(); // newline
}
```

## Output
- Reusable client singleton pattern
- Agent factory for consistent creation
- Robust error handling with retries
- Streaming support for real-time output

## Error Handling
| Pattern | Use Case | Benefit |
|---------|----------|---------|
| Singleton | Connection reuse | Reduced overhead |
| Factory | Agent creation | Consistency |
| Retry | Rate limits | Reliability |
| Streaming | Long responses | Better UX |

## Examples

### Complete Agent Service
```typescript
// services/agent-service.ts
import { getLindyClient } from '../lib/lindy';

export class AgentService {
  private lindy = getLindyClient();

  async createAndRun(name: string, instructions: string, input: string) {
    const agent = await this.lindy.agents.create({ name, instructions });
    const result = await this.lindy.agents.run(agent.id, { input });
    return { agent, result };
  }

  async listAgents() {
    return this.lindy.agents.list();
  }

  async deleteAgent(id: string) {
    return this.lindy.agents.delete(id);
  }
}
```

## Resources
- [Lindy SDK Patterns](https://docs.lindy.ai/patterns)
- [TypeScript Best Practices](https://docs.lindy.ai/typescript)

## Next Steps
Proceed to `lindy-core-workflow-a` for agent creation workflows.

Wersje

RepozytoriumWynikLicencja
Ta strona · HelixDevelopment/agent100MIT
jeremylongshore/tons-of-skills-marketplace100MIT

Migawka bazy z 28.10.2026 · wersja paczki 0ffbb9e13136 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100lindy-install-auth
    Instaluje i konfiguruje uwierzytelnianie SDK i CLI Lindy AI: nowa integracja, klucze API i inicjalizacja Lindy w projekcie.
  • 100lindy-common-errors
    Diagnozuje typowe błędy i problemy Lindy AI, w tym awarie agentów i problemy z integracjami.
  • 100lindy-common-errors
    Diagnozuje typowe błędy agentów Lindy AI i awarie przepływów pracy oraz problemy z integracjami.
  • 100lindy-reference-architecture
    Dostarcza architektury referencyjne integracji agentów Lindy AI do projektowania systemów, planowania architektur wieloagentowych i wzorców integracji produkcyjnych.
  • 95claude-agent-sdk
    Wspiera pracę z Anthropic Claude Agent SDK: wskazówki architektoniczne, wzorce implementacji, dobre praktyki i typowe pułapki.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.