# Common Workflows Short examples for the loops agents usually need: discover state, prepare content, confirm the action, then track the result. Canonical: /docs/workflows.md ## Discover workspace state **CLI** ```bash reelsfarm agent status reelsfarm social connected --agent reelsfarm assets list --category products --agent reelsfarm posts list --status SCHEDULED --agent ``` **SDK** ```ts const account = await rf.account.get(); const connected = await rf.social.listConnected(); const products = await rf.assets.list("products", { limit: 10 }); const posts = await rf.posts.list({ status: "SCHEDULED", limit: 10 }); ``` ## Generate an avatar **CLI** ```bash reelsfarm avatars generate \ --prompt "Creator selfie style, bright room, holding a phone" \ --model nano-banana-pro \ --agent reelsfarm confirm conf_123 --agent ``` **SDK** ```ts const preparedOrJob = await rf.avatars.generate({ prompt: "Creator selfie style, bright room, holding a phone", model: "nano-banana-pro", }); if ("wait" in preparedOrJob) { const result = await preparedOrJob.wait(); } ``` ## Generate slideshow text **CLI** ```bash reelsfarm slideshows generate-text \ --prompt "Summer serum launch for TikTok" \ --slide-count 6 \ --agent ``` **SDK** ```ts const slideshowText = await rf.slideshows.generateText({ prompt: "Summer serum launch for TikTok", slideCount: 6, }); ``` ## Generate a product scene **SDK** ```ts const scene = await rf.productScenes.generate({ avatarUrl: "https://example.com/avatar.png", productImageUrl: "https://example.com/product.png", prompt: "Natural UGC kitchen counter shot, creator holding the product", }); ``` Product scene generation prepares an async Product Studio composition. Confirm the prepared action, then poll the product scene job status or wait through the SDK job wrapper. ## Schedule content **CLI** ```bash reelsfarm posts schedule \ --content-type SLIDESHOW \ --content-id sl_123 \ --when 2026-07-01T15:00:00Z \ --platforms tiktok:conn_123 \ --caption "Launch day" \ --agent reelsfarm confirm conf_123 --agent ``` **SDK** ```ts const prepared = await rf.posts.schedule({ contentType: "SLIDESHOW", contentId: "sl_123", scheduledFor: "2026-07-01T15:00:00Z", caption: "Launch day", platforms: [{ platform: "TIKTOK", connectionId: "conn_123" }], }); ``` ## Create an automation **CLI** ```bash reelsfarm automations create \ --json-definition '{"name":"Daily TikTok","status":"PAUSED","targetConnectionId":"conn_123","schedule":{"slots":[{"days":["mon"],"timeLocal":"09:00"}]},"content":{"topic":"mindset","slidesCount":5}}' \ --agent ``` Automation creation defaults to a prepared action. Keep new automations paused until the user has reviewed content rules, account target, and schedule. ## Track the result **CLI** ```bash reelsfarm posts status --id post_123 --agent reelsfarm events recent --limit 20 --agent ``` **SDK** ```ts const status = await rf.posts.getStatus("post_123"); const events = await rf.events.recent({ limit: 20 }); ```