{"skill":{"slug":"openserv-multi-agent-workflows","displayName":"OpenServ Multi Agent Workflows","summary":"Multi-agent workflow examples to work together on the OpenServ Platform. Covers agent discovery, multi-agent workspaces, task dependencies, and workflow orch...","description":"---\nname: openserv-multi-agent-workflows\ndescription: Multi-agent workflow examples to work together on the OpenServ Platform. Covers agent discovery, multi-agent workspaces, task dependencies, and workflow orchestration using the Platform Client. Read reference.md for the full API reference. Read openserv-agent-sdk and openserv-client for building and running agents.\n---\n\n# Multi-Agent Workflows on OpenServ\n\nBuild workflows where multiple AI agents collaborate to complete complex tasks.\n\n**Reference files:**\n\n- `reference.md` - Workflow patterns, declarative sync, triggers, monitoring\n- `troubleshooting.md` - Common issues and solutions\n- `examples/` - Complete pipeline examples (blog, youtube-to-blog, etc.)\n\n---\n\n## Quick Start\n\nSee `examples/` for complete runnable examples:\n\n- `blog-pipeline.md` - Simple 2-agent workflow (research → write)\n- `content-creation-pipeline.md` - 3-agent workflow (research → write → image)\n- `life-coaching-pipeline.md` - Complex 6-agent workflow with comprehensive input schema\n\n**Recommended pattern using `workflows.sync()`:**\n\n1. Authenticate with `client.authenticate()`\n2. Find agents with `client.agents.listMarketplace()`\n3. Create workflow with `client.workflows.create()` including:\n   - Triggers\n   - Tasks\n   - **Edges** (⚠️ CRITICAL - connects triggers and tasks together)\n\n**⚠️ CRITICAL:** Always define edges when creating workflows. Setting task `dependencies` is NOT enough - you must create workflow edges to actually connect triggers to tasks and tasks to each other.\n\n---\n\n## Workflow Name & Goal\n\nWhen creating workflows (via `workflows.create()` or `provision()`), two properties are critical:\n\n- **`name`** (string) - This becomes the **agent name in ERC-8004**. Make it polished, punchy, and memorable — this is the public-facing brand name users see. Think product launch, not variable name. Examples: `'Instant Blog Machine'`, `'AI Video Studio'`, `'Polymarket Intelligence'`.\n- **`goal`** (string, required) - A detailed description of what the workflow accomplishes. Must be descriptive and thorough — short or vague goals will cause API calls to fail. Write at least a full sentence explaining the end-to-end purpose of the workflow.\n\n---\n\n## Core Concepts\n\n### Workflows\n\nA workflow (workspace) is a container that holds multiple agents and their tasks.\n\n### Task Dependencies\n\n- Each task is assigned to a specific agent\n- Tasks can depend on other tasks: `dependencies: [taskId1, taskId2]`\n- A task only starts when all dependencies are `done`\n- Output from dependencies is passed to dependent tasks\n\n### Workflow Graph\n\n- **Nodes**: Triggers and tasks\n- **Edges**: Connections between nodes\n- When Task A completes, its output flows to dependent tasks via edges\n\n### Agent Discovery\n\n```typescript\n// Search marketplace for agents by name/capability (semantic search)\nconst result = await client.agents.listMarketplace({ search: 'research' })\nconst agents = result.items // Array of marketplace agents\n\n// Get agent details\nconst agent = await client.agents.get({ id: 123 })\nconsole.log(agent.capabilities_description)\n\n// Note: client.agents.searchOwned() only searches YOUR OWN agents\n// Use listMarketplace() to find public agents for multi-agent workflows\n```\n\nCommon agent types: Research (Grok, Perplexity), Content writers, Data analysis, Social media (Nano Banana Pro), Video/audio creators.\n\n---\n\n## Edge Design Best Practices\n\n**CRITICAL: Carefully design your workflow edges to avoid creating tangled \"spaghetti\" graphs.**\n\nA well-designed workflow has clear, intentional data flow. Common mistakes lead to unmaintainable workflows.\n\n### Bad Pattern - Everything Connected to Everything\n\n```\n         ┌──────────────────────────────────┐\n         │           ┌─────────┐            │\n         │     ┌─────┤ Agent A ├─────┐      │\n         │     │     └────┬────┘     │      │\n         │     │          │          │      │\nTrigger ─┼─────┼──────────┼──────────┼──────┤\n         │     │          │          │      │\n         │     │     ┌────┴────┐     │      │\n         │     └─────┤ Agent B ├─────┘      │\n         │           └─────────┘            │\n         └──────────────────────────────────┘\n              (Spaghetti - avoid this!)\n```\n\nThis creates:\n\n- Unclear execution order\n- Difficult debugging\n- Agents receiving redundant/conflicting inputs\n- Hard to understand what depends on what\n\n### Good Patterns\n\n**Sequential Pipeline:**\n\n```\nTrigger → Research → Content → Enhancement → Output\n```\n\n**Staged Fan-Out:**\n\n```\n                    ┌─ Task A ─┐\nTrigger → Research ─┼─ Task B ─┼─→ Combiner → Output\n                    └─ Task C ─┘\n```\n\n**Conditional Branching (v1.1.3+):**\n\n```\n                    ┌─[approved]─→ Process\nTrigger → Review ──┤\n                    └─[rejected]─→ Reject Handler\n```\n\nUse `outputOptions` on tasks and `sourcePort` on edges for branching.\n\n### Guidelines for Clean Workflows\n\n1. **Linear is usually best**: Start with a simple chain, only add complexity when truly needed\n2. **Each task should have a clear purpose**: If you can't explain why Task A connects to Task B, remove the edge\n3. **Minimize cross-connections**: Avoid connecting every agent to every other agent\n4. **Use fan-out only for parallel work**: Multiple tasks from one source is fine; connecting everything to everything is not\n5. **One combiner at the end**: If you need to merge outputs, have ONE final task that depends on all parallel branches\n\n### Before Adding an Edge, Ask:\n\n- Does Task B actually need the output of Task A?\n- Would Task B work without this connection?\n- Am I adding this edge \"just in case\"? (Don't!)\n\n---\n\n## Updating This Skill\n\nThis skill may be outdated. The OpenServ team ships updates regularly—new features, API changes, and bug fixes won't be reflected here until you update. **If something isn't working as expected, or you want to make sure you have the latest information, update the skill before proceeding.**\n\n```bash\n# Check if updates are available\nnpx skills check\n\n# Update all installed skills to latest versions\nnpx skills update\n```\n\nOr reinstall the OpenServ skills directly:\n\n```bash\nnpx skills add openserv-labs/skills\n```\n\n---\n\n## Related Skills\n\n- **openserv-agent-sdk** - Building individual agent capabilities\n- **openserv-client** - Full Platform Client API reference\n- **openserv-launch** - Launch tokens on Base blockchain\n- **openserv-ideaboard-api** - Find ideas and ship agent services on the Ideaboard\n","tags":{"latest":"1.0.2"},"stats":{"comments":2,"downloads":1746,"installsAllTime":6,"installsCurrent":6,"stars":0,"versions":3},"createdAt":1770637671264,"updatedAt":1778486231449},"latestVersion":{"version":"1.0.2","createdAt":1771275418791,"changelog":"- No changes detected in this release; documentation, examples, and workflow recommendations remain the same.\n- Version bump to 1.0.2 with no modifications to files or content.","license":null},"metadata":null,"owner":{"handle":"issa-me-sush","userId":"s1723fny14hmpvya23s46azmxx88526w","displayName":"issa-me-sush","image":"https://avatars.githubusercontent.com/u/29679285?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1779962099107}}