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".
Use the skills CLI to install this skill with one command. Auto-detects all installed AI assistants.
Method 1 - skills CLI
npx skills i jeremylongshore/claude-code-plugins-plus-skills/plugins/saas-packs/lindy-pack/skills/lindy-sdk-patternsMethod 2 - openskills (supports sync & update)
npx openskills install jeremylongshore/claude-code-plugins-plus-skillsAuto-detects Claude Code, Cursor, Codex CLI, Gemini CLI, and more. One install, works everywhere.
Installation Path
Download and extract to one of the following locations:
No setup needed. Let our cloud agents run this skill for you.
Select Provider
Select Model
Best for coding tasks
No setup required
Essential SDK patterns and best practices for Lindy AI agent development.
lindy-install-auth setup// 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;
}// agents/factory.ts
import { getLindyClient } from '../lib/lindy';
interface AgentConfig {
name: string;
instructions: string;
tools?: string[];
}
export async function createAgent(config: AgentConfig) {
async function runWithRetry<T>(
fn: () => Promise<T>,
maxRetries = 3
): Promise<T> {
for (let i = 0; i < maxRetries; i++) {
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);
| Pattern | Use Case | Benefit |
|---|---|---|
| Singleton | Connection reuse | Reduced overhead |
| Factory | Agent creation | Consistency |
| Retry | Rate limits | Reliability |
| Streaming | Long responses | Better UX |
// services/agent-service.ts
import { getLindyClient } from '../lib/lindy';
export class AgentService {
private lindy = getLindyClient();
async createAndRun(name: string, instructions: string, input: string) {
Proceed to lindy-core-workflow-a for agent creation workflows.