Add Relayflow patterns blog post#1046
Conversation
|
CodeAnt AI is reviewing your PR. |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR adds a new MDX blog post describing six Agent Relay workflow patterns with TypeScript examples and updates blog list CSS to use outside markers, increased left padding, and themed/customized list markers. ChangesBlog Content and Styling Updates
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
CodeAnt AI finished reviewing your PR. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 91655b2861
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| agent-relay local run workflows/my-workflow.ts | ||
| agent-relay local logs <run-id> --follow | ||
| agent-relay local sync <run-id> |
There was a problem hiding this comment.
Replace the nonexistent local workflow commands
For readers who install the current agent-relay CLI, this Basic Shape fails before the cloud example: I checked packages/cli/src/cli/bootstrap.ts, which registers local with only registerCoreCommands and registerLocalAgentCommands, and registerCoreCommands adds up, down, status, and metrics rather than run, logs, or sync. In this context, agent-relay local run ... reports an unknown command, so the post should either show the supported local workflow runner or avoid documenting these local subcommands.
Useful? React with 👍 / 👎.
| Relay shape: `handoff` or a live classifier in a channel. If you want deterministic workflow steps, let non-selected specialists return `SKIP`. | ||
|
|
||
| ```ts | ||
| import { workflow } from '@agent-relay/sdk/workflows'; |
There was a problem hiding this comment.
Use an exported workflow import
This import path is not available in the current SDK package: packages/sdk/package.json exports only ., ./messaging, ./delivery, ./actions, ./session, and ./capabilities, and the current code notes workflow-shaped types live in @relayflows/core. A reader copying the TypeScript examples will hit ERR_PACKAGE_PATH_NOT_EXPORTED / cannot find module before any workflow code runs, so the sample should import from the current Relayflows package or the missing SDK subpath needs to be restored.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@web/content/blog/six-workflow-patterns-agent-relay.mdx`:
- Line 27: Update the npm install example to use the conventional flag order by
replacing the command string "npm -g install agent-relay" with "npm install -g
agent-relay" so the documentation shows the standard syntax; locate the snippet
containing the npm command (the line with npm -g install agent-relay) and update
it accordingly.
- Around line 51-78: The import path is incorrect: replace the unsupported deep
import "import { workflow } from '`@agent-relay/sdk/workflows`'" with the public
export from the package root (import the workflow symbol from
'`@agent-relay/sdk`') so the example uses the package's exported entrypoint;
update the top of the snippet to import workflow from the package root and keep
the subsequent usage of workflow('classify-and-act') and its
.pattern/.agent/.step/.run chain unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 600f27ef-fb83-407c-a9e5-410c4b4a7265
📒 Files selected for processing (2)
web/components/blog/blog.module.cssweb/content/blog/six-workflow-patterns-agent-relay.mdx
| Run a workflow from a file: | ||
|
|
||
| ```bash | ||
| npm -g install agent-relay |
There was a problem hiding this comment.
Use standard npm flag order.
The standard npm syntax is npm install -g <package>, not npm -g install <package>. While both may work, the documentation should show the conventional order.
📦 Proposed fix
-npm -g install agent-relay
+npm install -g agent-relay📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| npm -g install agent-relay | |
| npm install -g agent-relay |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@web/content/blog/six-workflow-patterns-agent-relay.mdx` at line 27, Update
the npm install example to use the conventional flag order by replacing the
command string "npm -g install agent-relay" with "npm install -g agent-relay" so
the documentation shows the standard syntax; locate the snippet containing the
npm command (the line with npm -g install agent-relay) and update it
accordingly.
| ```ts | ||
| import { workflow } from '@agent-relay/sdk/workflows'; | ||
| await workflow('classify-and-act') | ||
| .pattern('handoff') | ||
| .agent('router', { cli: 'claude', role: 'classifier' }) | ||
| .agent('bugfix', { cli: 'codex', role: 'bugfix specialist' }) | ||
| .agent('docs', { cli: 'claude', role: 'docs specialist' }) | ||
| .agent('research', { cli: 'gemini', role: 'research specialist' }) | ||
| .step('classify', { | ||
| agent: 'router', | ||
| task: 'Classify {{task}} as bugfix, docs, or research. Output ROUTE:<name> and a short brief.', | ||
| }) | ||
| .step('bugfix', { | ||
| agent: 'bugfix', | ||
| dependsOn: ['classify'], | ||
| task: 'If ROUTE:bugfix is absent, output SKIP. Otherwise execute the brief:\n{{steps.classify.output}}', | ||
| }) | ||
| .step('docs', { | ||
| agent: 'docs', | ||
| dependsOn: ['classify'], | ||
| task: 'If ROUTE:docs is absent, output SKIP. Otherwise execute the brief:\n{{steps.classify.output}}', | ||
| }) | ||
| .step('research', { | ||
| agent: 'research', | ||
| dependsOn: ['classify'], | ||
| task: 'If ROUTE:research is absent, output SKIP. Otherwise execute the brief:\n{{steps.classify.output}}', | ||
| }) | ||
| .run(); |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Verify agent-relay SDK package and API
# Search for the SDK package definition
echo "=== Searching for `@agent-relay/sdk` package ==="
fd package.json --exec sh -c 'if jq -e ".name == \"`@agent-relay/sdk`\"" {} > /dev/null 2>&1; then echo "Found in: {}"; cat {}; fi' \;
# Search for workflow-related exports
echo ""
echo "=== Searching for workflow exports ==="
rg -l "export.*workflow" --type=ts --type=js
# Search for pattern method definitions
echo ""
echo "=== Searching for pattern method ==="
ast-grep --pattern 'pattern($$$) {
$$$
}'
# Search for existing workflow examples
echo ""
echo "=== Searching for existing workflow files ==="
fd -e ts -e js workflow | head -10Repository: AgentWorkforce/relay
Length of output: 2369
Fix SDK import path in blog example
@agent-relay/sdkdoesn’t export./workflowsin itspackage.jsonexportsmap (it only includes.,./messaging,./delivery,./actions,./session,./capabilities), soimport { workflow } from '@agent-relay/sdk/workflows'is not a supported public import for consumers.- The workflow implementation appears to live in
packages/cloud/src/workflows.ts, so the blog should import from the actual exported entry point that matches that implementation.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@web/content/blog/six-workflow-patterns-agent-relay.mdx` around lines 51 - 78,
The import path is incorrect: replace the unsupported deep import "import {
workflow } from '`@agent-relay/sdk/workflows`'" with the public export from the
package root (import the workflow symbol from '`@agent-relay/sdk`') so the example
uses the package's exported entrypoint; update the top of the snippet to import
workflow from the package root and keep the subsequent usage of
workflow('classify-and-act') and its .pattern/.agent/.step/.run chain unchanged.
|
Preview deployed!
This preview will be cleaned up when the PR is merged or closed. |
a185ba3 to
243594a
Compare
User description
Summary
Tests
CodeAnt-AI Description
Publish a new blog post on workflow patterns with Agent Relay
What Changed
Impact
✅ Clearer guidance for building multi-agent workflows✅ Easier-to-scan blog lists✅ More practical examples for choosing a workflow pattern💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.