fixed docs, readme and rust sdk #94
Conversation
WalkthroughThis PR restructures RunAgent's documentation by moving cloud deployment content to a dedicated RunAgent Cloud section, introduces comprehensive cloud deployment workflows and streaming support documentation, updates configuration schema to include Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20–30 minutes
Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 8
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
runagent-rust/runagent/src/client/socket_client.rs (1)
57-68: Go SDK uses incompatible URL pattern—breaking change not applied to all SDKs.The Rust SDK now uses
agents/{agent_id}/run-streamwithentrypoint_tagsent in the message payload. However, the Go SDK still uses the old patternagents/{agentID}/execute/{entrypointTag}with entrypoint_tag embedded in the URL path (client.go line 269). The Python and TypeScript SDKs match the new Rust pattern. This inconsistency creates a breaking change for Go users and diverges from the server-side implementation.Requires: Update the Go SDK to match the new URL format before merging.
examples/recipe_creator/sdk/python/test.py (1)
73-73: Critical: Undefined variables will cause runtime errors.Lines 73 and 95 reference undefined variables
AGENT_IDandLOCAL_MODE. These variables are used intest_quick()andtest_vegan()functions but are never defined in the file. Line 117 also referencesAGENT_IDin validation logic.Add the missing variable definitions after the imports:
import os - - +# Configuration +AGENT_ID = "9cd7f85d-248c-4931-831a-5b4d43a01a78" +LOCAL_MODE = False print("🧪 Testing ChefGenius Recipe Agent")Also applies to: 95-95
examples/recipe_creator/backend/app.py (1)
24-31: Hardcoded agent_id in health endpoint doesn't match actual configuration.The health endpoint returns a hardcoded
agent_id(00efd47c-2c3d-492b-97ec-c6b79eeb93c4) that differs from the actual agent IDs used by the RunAgentClient instances. This could mislead health check consumers about which agent is running.Update the health endpoint to return the actual agent_id:
@app.route('/health', methods=['GET']) def health(): """Health check endpoint""" return jsonify({ "status": "healthy", - "agent_id": "00efd47c-2c3d-492b-97ec-c6b79eeb93c4", - "mode": "local" + "agent_id": "9cd7f85d-248c-4931-831a-5b4d43a01a78", + "mode": "cloud" })
🧹 Nitpick comments (9)
examples/lead-agent/backend-rust/src/main.rs (2)
13-13: Consider using environment variable for agent ID.The hard-coded
RUNAGENT_IDmay cause issues when deploying to different environments (dev, staging, production). Consider loading it from an environment variable with a fallback:-const RUNAGENT_ID: &str = "bd87871d-b4c4-4ec1-990b-bef0ea4766f7"; +fn get_agent_id() -> String { + std::env::var("RUNAGENT_ID") + .unwrap_or_else(|_| "bd87871d-b4c4-4ec1-990b-bef0ea4766f7".to_string()) +}
153-175: Consider extracting result parsing to a helper function.The nested result parsing logic is robust but complex. Consider extracting it to a helper function for better readability and reusability:
fn extract_result_payload(result: Value) -> Value { // Extract payload field if it exists (RunAgent wraps result in {"payload": "...", "type": "object"}) if let Some(obj) = result.as_object() { if let Some(payload_value) = obj.get("payload") { if let Some(payload_str) = payload_value.as_str() { // Try to parse the payload JSON string return serde_json::from_str::<Value>(payload_str).unwrap_or(result); } } else if let Some(result_str) = result.as_str() { // Check if result is a JSON string that needs parsing return serde_json::from_str::<Value>(result_str).unwrap_or(result); } } else if let Some(result_str) = result.as_str() { // Result is a string, try to parse it return serde_json::from_str::<Value>(result_str).unwrap_or(result); } result }Then use it as:
let final_result = extract_result_payload(result); Ok(JsonResponse(final_result))docs/tutorials/book-writer.mdx (1)
88-108: Consider adding env_vars and auth_settings fields.The configuration example is correct but could include the newly introduced
env_varsandauth_settingsfields for consistency with other examples in this PR:{ "agent_name": "book-writer", "description": "AI-powered book writing with multi-agent workflows", "framework": "crewai", "agent_architecture": { "entrypoints": [ { "file": "main.py", "module": "generate_outline", "tag": "generate_outline" }, { "file": "main.py", "module": "write_book", "tag": "write_book" } ] }, "env_vars": {}, "auth_settings": { "type": "api_key" } }templates/agno/default/runagent.config.json (1)
11-11: Absolute path in template_source might be environment-specific.The
pathfield contains an absolute path/home/azureuser/runagent/templates/agno/defaultwhich may not work across different development environments. Consider if this should be a relative path or if it's only used during template initialization.examples/lead-agent/lead-score-flow/runagent.config.json (1)
8-12: Consider making template_source.path relative or template-agnostic.Line 11 contains an absolute system path (
/home/azureuser/runagent/examples/...) which may not be portable across different development environments. Consider storing this as a relative path or making it environment-independent for better reproducibility.docs/explanation/overview.mdx (1)
15-17: Markdown formatting improvement needed.Line 16 contains a
<Tip>component that should maintain consistent markdown formatting style. The content is clear but ensure component styling is consistent with other pages in the documentation.runagent-rust/runagent/README.md (2)
28-42: Standardize dependency version specifications.Line 33 shows
cargo add runagent tokiobut the manualCargo.tomlsection (lines 37-42) specifies explicit versions. For consistency and clarity, either add versions to the cargo add command or document that the latest versions will be installed.
286-290: Clarify feature documentation.Lines 287-290 document only the
dbfeature, but the Cargo.toml snippet at lines 36-42 includesserde_jsonandfuturesas direct dependencies. Clarify whether these are optional features or core dependencies, and update the documentation accordingly.README.md (1)
443-454: Consider refining the "Coming Soon" messaging.The Action Memory System section is marked as "Coming Soon" but provides detailed information about how it "will work." This might create confusion about feature availability. Consider adding a clearer timeline or expected release window if available.
Consider adding a timeline or beta signup option:
## 🧠 Action Memory System (Coming Soon) RunAgent is introducing **Action Memory** - a revolutionary approach to agent reliability that focuses on *how to remember* rather than *what to remember*. +**Expected Release**: Q2 2025 | [Join the Beta Waitlist](#) + ### How It Will Work
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (51)
README.md(4 hunks)docs/api-reference/endpoints/health.mdx(1 hunks)docs/configuration/environment.mdx(1 hunks)docs/deployment/cloud-deployment.mdx(4 hunks)docs/deployment/local-development.mdx(1 hunks)docs/docs.json(2 hunks)docs/explanation/architecture-overview.mdx(1 hunks)docs/explanation/installation.mdx(1 hunks)docs/explanation/introduction.mdx(4 hunks)docs/explanation/overview.mdx(1 hunks)docs/explanation/production-considerations.mdx(1 hunks)docs/explanation/quickstart-map.mdx(4 hunks)docs/how-to/advanced-tasks.mdx(1 hunks)docs/how-to/advanced/streaming-responses.mdx(1 hunks)docs/how-to/call-from-go.mdx(1 hunks)docs/how-to/call-from-javascript.mdx(1 hunks)docs/how-to/call-from-python.mdx(1 hunks)docs/how-to/call-from-rust.mdx(1 hunks)docs/how-to/frameworks/ag2.mdx(1 hunks)docs/how-to/frameworks/agno.mdx(1 hunks)docs/how-to/frameworks/crewai.mdx(1 hunks)docs/how-to/frameworks/custom.mdx(1 hunks)docs/how-to/frameworks/langgraph.mdx(1 hunks)docs/how-to/frameworks/letta.mdx(1 hunks)docs/how-to/frameworks/llamaindex.mdx(1 hunks)docs/how-to/frameworks/parlant.mdx(1 hunks)docs/how-to/overview.mdx(1 hunks)docs/runagent-cloud/cloud-deployment.mdx(1 hunks)docs/runagent-cloud/overview.mdx(1 hunks)docs/tutorials/book-writer.mdx(1 hunks)docs/tutorials/customer-support-agent.mdx(0 hunks)docs/tutorials/deploy-your-first-agent.mdx(1 hunks)docs/tutorials/internal-qa-agent.mdx(0 hunks)docs/tutorials/lead-agent.mdx(1 hunks)docs/tutorials/multi-language-wrapper.mdx(0 hunks)docs/tutorials/overview.mdx(1 hunks)docs/tutorials/recipe-creator.mdx(1 hunks)examples/lead-agent/README.md(1 hunks)examples/lead-agent/backend-rust/src/main.rs(2 hunks)examples/lead-agent/lead-score-flow/runagent.config.json(1 hunks)examples/lead-agent/runagent_sdk/rust/src/main.rs(2 hunks)examples/recipe_creator/agents/runagent.config.json(1 hunks)examples/recipe_creator/backend/app.py(1 hunks)examples/recipe_creator/sdk/python/test.py(2 hunks)runagent-rust/Cargo.toml(1 hunks)runagent-rust/runagent/Cargo.toml(1 hunks)runagent-rust/runagent/README.md(6 hunks)runagent-rust/runagent/src/client/socket_client.rs(1 hunks)templates/agno/default/runagent.config.json(2 hunks)test_scripts/rust/test_agno/Cargo.toml(1 hunks)test_scripts/rust/test_agno/src/main.rs(1 hunks)
💤 Files with no reviewable changes (3)
- docs/tutorials/customer-support-agent.mdx
- docs/tutorials/internal-qa-agent.mdx
- docs/tutorials/multi-language-wrapper.mdx
🧰 Additional context used
🧬 Code graph analysis (4)
test_scripts/rust/test_agno/src/main.rs (2)
runagent-rust/runagent/src/client/runagent_client.rs (2)
agent_id(351-353)new(34-73)examples/Stockagent/sdk_test/rust/src/main.rs (1)
main(6-46)
examples/recipe_creator/sdk/python/test.py (1)
runagent-rust/runagent/src/client/runagent_client.rs (1)
agent_id(351-353)
examples/lead-agent/runagent_sdk/rust/src/main.rs (1)
runagent-rust/runagent/src/client/runagent_client.rs (1)
agent_id(351-353)
examples/recipe_creator/backend/app.py (1)
runagent-rust/runagent/src/client/runagent_client.rs (2)
agent_id(351-353)entrypoint_tag(356-358)
🪛 LanguageTool
docs/tutorials/book-writer.mdx
[grammar] ~15-~15: Use a hyphen to join words.
Context: ... In this tutorial, you'll create a book writing agent that: - Generates comprehe...
(QB_NEW_EN_HYPHEN)
[grammar] ~35-~35: Use a hyphen to join words.
Context: ...tly. ## Architecture Overview The book writing agent uses a multi-agent workflo...
(QB_NEW_EN_HYPHEN)
[grammar] ~67-~67: Use a hyphen to join words.
Context: ...erstanding the Agent Structure The book writing agent uses CrewAI flows with spe...
(QB_NEW_EN_HYPHEN)
[grammar] ~267-~267: Use a hyphen to join words.
Context: ...complished You've built a complete book writing system: ...
(QB_NEW_EN_HYPHEN)
🪛 markdownlint-cli2 (0.18.1)
runagent-rust/runagent/README.md
133-133: Multiple spaces after hash on atx style heading
(MD019, no-multiple-space-atx)
🔇 Additional comments (46)
docs/how-to/frameworks/custom.mdx (1)
530-530: Production Deployment link successfully migrated to RunAgent Cloud.The update correctly redirects the Production Deployment card to the new RunAgent Cloud documentation path, aligning with the documentation restructuring.
docs/how-to/frameworks/llamaindex.mdx (1)
1077-1077: Production Deployment link updated to RunAgent Cloud.This update maintains consistency with the documentation restructuring across framework guides.
runagent-rust/runagent/Cargo.toml (1)
3-3: Rust SDK version bump appropriate for patch release.The version increment from 0.1.32 to 0.1.33 aligns with the PR objective of pushing an updated SDK to crates.io. However, verify that workspace dependencies (tokio-tungstenite, reqwest) include the TLS features mentioned in the AI summary for proper WebSocket and HTTPS support.
docs/how-to/frameworks/agno.mdx (1)
518-518: Production Deployment link updated consistently with other framework guides.docs/how-to/frameworks/langgraph.mdx (1)
534-534: Production Deployment link migrated to RunAgent Cloud path.docs/how-to/frameworks/letta.mdx (1)
738-738: Production Deployment link updated to RunAgent Cloud.docs/tutorials/deploy-your-first-agent.mdx (1)
536-536: Critical tutorial updated with correct production deployment link.The primary onboarding tutorial now correctly directs users to the RunAgent Cloud deployment guide.
docs/configuration/environment.mdx (1)
297-297: Configuration documentation correctly links to RunAgent Cloud security guidance.The See Also reference for production security is now properly routed to the RunAgent Cloud deployment guide.
docs/how-to/call-from-rust.mdx (1)
888-888: LGTM! Documentation link updated correctly.The Production Deployment link has been correctly updated to reflect the new RunAgent Cloud documentation structure.
examples/lead-agent/runagent_sdk/rust/src/main.rs (1)
9-19: Verify the local flag change is intentional.The
localflag has been changed fromtruetofalse, which means this example now requires a cloud deployment instead of connecting to a localrunagent serveinstance. This could impact developers trying to run the example locally for testing.Ensure this change aligns with the example's purpose. If the example is meant to demonstrate cloud deployment, consider adding a comment explaining this requirement. If it should support local testing, the flag should remain
true.docs/api-reference/endpoints/health.mdx (1)
206-206: LGTM! Documentation link updated correctly.The monitoring guide link has been correctly updated to reflect the new RunAgent Cloud documentation structure.
docs/explanation/quickstart-map.mdx (1)
48-48: LGTM! All cloud deployment links updated consistently.All four cloud deployment references have been correctly updated to point to the new RunAgent Cloud documentation structure at
/runagent-cloud/cloud-deployment.Also applies to: 82-82, 151-151, 177-177
docs/how-to/advanced-tasks.mdx (1)
11-14: The streaming responses page exists at the expected location. No issues found.docs/tutorials/overview.mdx (1)
28-30: No issues found—all referenced tutorial pages exist.The verification confirms all three tutorial files referenced in the tutorial cards exist in the docs/tutorials directory:
lead-agent.mdxbook-writer.mdxrecipe-creator.mdxThe links are valid and will not result in broken links.
docs/tutorials/lead-agent.mdx (1)
1-308: Verification confirmed: All referenced example files and directory structure exist.The tutorial accurately references the examples/lead-agent directory. All key files (runagent.config.json, main.py, app.py) and directory structure (lead-score-flow, backend, frontend) are in place. The deployment instructions and code snippets are consistent with the actual repository structure.
docs/how-to/advanced/streaming-responses.mdx (3)
29-44: LGTM: Clear naming convention.The
_streamsuffix requirement is well documented and enforced. The examples clearly demonstrate the difference between synchronous and streaming entrypoints.
274-289: LGTM: Configuration example aligns with new schema.The configuration example correctly uses the nested
agent_architecture.entrypointsstructure introduced in this PR.
295-358: LGTM: Comprehensive best practices.The best practices section provides practical guidance on chunk sizing, error handling, and streaming patterns. The code examples are clear and actionable.
runagent-rust/runagent/src/client/socket_client.rs (1)
208-209: LGTM: Test updated correctly.The test expectation now matches the new URL format. The comment explaining the update is helpful for future maintainers.
docs/tutorials/book-writer.mdx (1)
240-263: LGTM: Clear deployment instructions.The deployment section provides clear steps for both local and production deployment. The commands align with standard RunAgent CLI usage.
runagent-rust/Cargo.toml (1)
9-9: TLS feature configuration is correct and properly validated.Verification confirms that
rustls-tls-native-rootsis a valid feature for tokio-tungstenite 0.21, and the same applies torustls-tlsfor reqwest 0.11. The absence of explicit platform-specific TLS code in the codebase is appropriate—the dependencies handle platform abstractions internally, which is the correct design pattern. The configuration works seamlessly across Linux, macOS, and Windows as the native-roots feature automatically integrates with each platform's certificate store.docs/explanation/installation.mdx (1)
34-56: No issues found—documentation and implementation are aligned.All verification checks confirm the authentication setup documentation is accurate and fully implemented:
- ✓
runagent setupcommand exists with both Express (browser/device code) and Manual (API key) options- ✓
runagent whoamidisplays current configuration- ✓
runagent setup --againflag enables reconfiguration- ✓ Device code authentication flow is implemented and functional for Express Setup
- ✓ Manual setup prompts for API key entry with validation and secure credential storage
examples/lead-agent/README.md (1)
320-328: Fix broken deployment documentation link.Line 325 references
/runagent-cloud/cloud-deploymentin a code comment but this should be verified as a valid path in the new documentation structure. However, based on the context from other files in this PR, this appears correct and aligns with the documentation reorganization.docs/deployment/cloud-deployment.mdx (2)
134-244: Configuration documentation is comprehensive and well-organized.The Agent Configuration section provides clear guidance on agent_id, entrypoints, and manual editing workflows. The examples are accurate and align with the new configuration schema.
314-329: Streaming execution documentation is clear and helpful.The Note at lines 326-328 appropriately emphasizes using
run-streamfor streaming endpoints with WebSocket connections. This is an important distinction that helps prevent user confusion.docs/explanation/introduction.mdx (2)
99-131: Configuration schema documentation is accurate and complete.The runagent.config.json example properly shows all required fields including agent_id, agent_architecture with entrypoints, auth_settings, and env_vars. The Key fields note at lines 133-139 helps clarify important concepts.
434-450: Streaming setup documentation properly conveys auto-generated configuration.The explanation that
runagent initautomatically creates both streaming and non-streaming functions, with the streaming function already configured, is helpful and accurate. The note about the _stream suffix requirement is important and well-placed.runagent-rust/runagent/README.md (1)
301-323: API Reference is comprehensive and accurate.The method signatures and descriptions for RunAgentClient clearly document all main entry points including streaming variants and helper methods. The documentation properly distinguishes between positional and keyword arguments.
docs/how-to/frameworks/parlant.mdx (1)
1047-1052: Documentation links are properly updated and Next Steps are comprehensive.Line 1050 correctly references
/runagent-cloud/cloud-deploymentwhich aligns with the documentation reorganization. The Next Steps section provides a good progression of advanced topics.docs/deployment/local-development.mdx (1)
371-374: Deployment documentation link properly updated.Line 373 correctly updates the See Also link to point to
/runagent-cloud/cloud-deployment, maintaining consistency with the documentation reorganization across the PR.docs/explanation/architecture-overview.mdx (1)
485-485: Navigation link updated to reflect new documentation structure.The deployment card now correctly points to the relocated RunAgent Cloud documentation. This change aligns with the documentation reorganization introduced in this PR.
docs/how-to/frameworks/ag2.mdx (1)
731-731: Navigation link updated consistently with documentation restructuring.The Production Deployment card reference has been updated to point to the new RunAgent Cloud deployment documentation path, maintaining consistency across the documentation.
docs/explanation/production-considerations.mdx (1)
633-633: Navigation target updated to reflect new documentation hierarchy.The Cloud Deployment card now routes to the new RunAgent Cloud section, consistent with the documentation restructuring applied across the repository.
docs/how-to/call-from-javascript.mdx (1)
711-711: Next Steps navigation link updated to new documentation path.The Production Deployment card link has been updated to point to the new RunAgent Cloud deployment guide, maintaining consistency with other SDK documentation guides.
docs/how-to/call-from-python.mdx (1)
582-582: Navigation link aligned with new documentation structure.The Production Deployment card href has been updated to the new RunAgent Cloud path, maintaining consistency with the documentation reorganization across all SDK guides.
docs/how-to/call-from-go.mdx (1)
1173-1173: Next Steps reference updated to match new documentation organization.The Production Deployment link has been updated to the new RunAgent Cloud path, maintaining consistency with the Python and JavaScript SDK documentation updates.
docs/docs.json (1)
96-96: Documentation structure reorganized with new RunAgent Cloud tab.The changes implement a clean separation by moving cloud deployment guidance to a dedicated "RunAgent Cloud" tab, while keeping local development under the "How-to Guides" section. Verification confirms both new documentation files exist:
docs/runagent-cloud/overview.mdxdocs/runagent-cloud/cloud-deployment.mdxdocs/how-to/overview.mdx (1)
36-37: Both navigation paths are valid and reference existing documentation files.The changes have been verified:
/deployment/local-development→docs/deployment/local-development.mdx✓/runagent-cloud/cloud-deployment→docs/runagent-cloud/cloud-deployment.mdx✓Both files exist at their target locations. The path updates from relative (
./prefixed) to absolute paths are intentional restructuring aligned with the documentation organization.docs/how-to/frameworks/crewai.mdx (1)
571-571: LGTM!The documentation link has been correctly updated to reflect the new RunAgent Cloud documentation structure.
examples/recipe_creator/agents/runagent.config.json (1)
1-33: Configuration updated to new schema structure.The configuration has been updated to include the new
agent_architecture.entrypointsstructure,agent_id,env_vars, andauth_settingsfields. The structure aligns with the configuration examples in the cloud deployment documentation.Note: The
agent_idhere (9cd7f85d-248c-4931-831a-5b4d43a01a78) should be used consistently across all related files in the recipe_creator example.docs/runagent-cloud/cloud-deployment.mdx (1)
1-625: Comprehensive cloud deployment documentation.Excellent and thorough cloud deployment guide that covers:
- Authentication setup with API keys
- Two deployment methods (quick deploy vs two-step)
- Agent configuration with agent_id and entrypoints
- Validation requirements and checks
- Running agents with streaming support
- CI/CD integration examples
- Troubleshooting and best practices
- Security considerations
The documentation is well-organized with clear examples and covers both beginner and advanced use cases.
docs/tutorials/recipe-creator.mdx (1)
1-392: Excellent comprehensive tutorial for the Recipe Creator Agent.This tutorial effectively demonstrates:
- Real-world agent architecture with multiple entrypoints
- Synchronous and streaming patterns
- Backend integration with Flask
- Frontend integration concepts
- Local and production deployment workflows
The tutorial provides a complete learning path from understanding the challenge to deploying a production system. The code examples are clear and well-commented.
README.md (3)
101-103: Good clarification of local development vs deployment.Renaming "Local Deployment" to "Local Development" and emphasizing that it's for testing before deploying to RunAgent Cloud provides better clarity on the intended workflow.
118-131: Clear cloud deployment workflow added.The new "Deploy to RunAgent Cloud" section provides a straightforward path for users to move from local development to production. The authentication and deployment commands are clear and concise.
351-430: Comprehensive cloud deployment marketing section.The RunAgent Cloud Deployment section effectively communicates:
- Cloud availability and benefits
- Sign-up and dashboard links
- Deployment speed and VM image management
- Security architecture
- Dashboard features and monitoring capabilities
- Enterprise-grade features
This provides a strong value proposition for the cloud platform while maintaining technical accuracy.
docs/runagent-cloud/overview.mdx (1)
1-166: Fragment link verified as valid.The section "## Authentication Setup" exists at line 16 in
cloud-deployment.mdx, which correctly corresponds to the fragment anchor#authentication-setup. The link on line 107 is correct and will resolve properly.
| ### Rust SDK | ||
|
|
||
| ```rust | ||
| use runagent::client::RunAgentClient; | ||
| use serde_json::json; | ||
| use futures::StreamExt; | ||
|
|
||
| #[tokio::main] | ||
| async fn main() -> Result<(), Box<dyn std::error::Error>> { | ||
| let client = RunAgentClient::new( | ||
| "your_agent_id", | ||
| "chat_stream", // Must end with _stream | ||
| false | ||
| ).await?; | ||
|
|
||
| let mut stream = client.run_stream(&[ | ||
| ("message", json!("Tell me a story")) | ||
| ]).await?; | ||
|
|
||
| while let Some(chunk) = stream.next().await { | ||
| print!("{}", chunk?); | ||
| } | ||
|
|
||
| Ok(()) | ||
| } | ||
| ``` |
There was a problem hiding this comment.
🧩 Analysis chain
Verify Rust SDK API matches documentation.
The Rust SDK example should align with the actual implementation. Based on the socket_client.rs changes in this PR, verify that:
RunAgentClient::newsignature matches (agent_id, entrypoint_tag, local)run_streamparameter format is correct- The stream output format matches what's documented
🏁 Script executed:
#!/bin/bash
# Verify Rust SDK API signatures
ast-grep --pattern $'impl RunAgentClient {
$$$
pub async fn new($$$) -> $_ {
$$$
}
$$$
}'
ast-grep --pattern $'pub async fn run_stream($$$) -> $_ {
$$$
}'Length of output: 42888
Fix stream output handling in Rust SDK example.
The run_stream API signature and parameter format are correct, but the example code has incomplete stream chunk handling. Each chunk from stream.next().await is a RunAgentResult<Value> (a Result type), so it requires proper string conversion:
while let Some(chunk) = stream.next().await {
print!("{}", chunk?.to_string()); // or use serde_json::to_string for JSON output
}Without .to_string(), printing a Value directly won't display properly.
🤖 Prompt for AI Agents
In docs/how-to/advanced/streaming-responses.mdx around lines 214 to 239, the
Rust example prints a serde_json::Value result directly from the stream
(print!("{}", chunk?);) which will not render properly; update the loop to
convert the Value into a string before printing — e.g., replace the print call
with one that uses chunk?.to_string() or serde_json::to_string(&chunk?) to
serialize the JSON value to a string (keeping the existing ? error propagation).
| agent_id, | ||
| "lead_score_flow", // entrypoint_tag | ||
| true, // local = true | ||
| false, // local = true |
There was a problem hiding this comment.
Fix misleading comment.
The comment says local = true but the code sets it to false. This inconsistency can confuse developers.
Apply this diff to fix the comment:
- false, // local = true
+ false, // local = false (connects to cloud deployment)📝 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.
| false, // local = true | |
| false, // local = false (connects to cloud deployment) |
🤖 Prompt for AI Agents
In examples/lead-agent/runagent_sdk/rust/src/main.rs around line 18, the inline
comment incorrectly reads "local = true" while the code sets the value to false;
update that comment to "local = false" (or remove the comment) so it accurately
reflects the boolean value.
| # Initialize RunAgent client | ||
| recipe_client = RunAgentClient( | ||
| agent_id="6f15f51e-0b6e-479a-ae8c-8174db2712fd", | ||
| agent_id="7cd7f85d-248c-4931-831a-5b4d43a01a78", |
There was a problem hiding this comment.
Agent ID mismatch between backend and test files.
The agent_id used here (7cd7f85d-248c-4931-831a-5b4d43a01a78) differs from the agent_id in examples/recipe_creator/sdk/python/test.py (9cd7f85d-248c-4931-831a-5b4d43a01a78) and examples/recipe_creator/agents/runagent.config.json. This inconsistency will cause the test file to fail when attempting to connect to the backend.
Update the agent_id to match the configuration:
recipe_client = RunAgentClient(
- agent_id="7cd7f85d-248c-4931-831a-5b4d43a01a78",
+ agent_id="9cd7f85d-248c-4931-831a-5b4d43a01a78",
entrypoint_tag="recipe_create",
local=False
)
stream_client = RunAgentClient(
- agent_id="7cd7f85d-248c-4931-831a-5b4d43a01a78",
+ agent_id="9cd7f85d-248c-4931-831a-5b4d43a01a78",
entrypoint_tag="recipe_stream",
local=False
)Also applies to: 18-18
🤖 Prompt for AI Agents
In examples/recipe_creator/backend/app.py around lines 12 and 18, the agent_id
values do not match the agent_id used in
examples/recipe_creator/sdk/python/test.py and
examples/recipe_creator/agents/runagent.config.json; update the agent_id strings
at both line 12 and line 18 to the canonical value used in the tests/config
(9cd7f85d-248c-4931-831a-5b4d43a01a78) so backend, SDK test, and agent config
are identical.
|
|
||
| client = RunAgentClient( | ||
| agent_id="76aef000-0000-0000-0000-000000000000", | ||
| agent_id="9cd7f85d-248c-4931-831a-5b4d43a01a78", |
There was a problem hiding this comment.
🧩 Analysis chain
Verify agent_id consistency across the example.
The agent_id 9cd7f85d-248c-4931-831a-5b4d43a01a78 should match the configuration in examples/recipe_creator/agents/runagent.config.json and the backend implementation in examples/recipe_creator/backend/app.py.
Also applies to: 50-50
🏁 Script executed:
#!/bin/bash
# Verify agent_id consistency across recipe_creator example files
echo "=== Checking agent_id in runagent.config.json ==="
cat examples/recipe_creator/agents/runagent.config.json | jq -r '.agent_id'
echo -e "\n=== Checking agent_id in backend/app.py ==="
rg -n 'agent_id=' examples/recipe_creator/backend/app.py
echo -e "\n=== Checking agent_id in sdk/python/test.py ==="
rg -n 'agent_id=' examples/recipe_creator/sdk/python/test.pyLength of output: 472
I found a critical inconsistency. Let me verify the AGENT_ID definition and backend context:
🏁 Script executed:
#!/bin/bash
# Find AGENT_ID definition in test.py and verify backend context
echo "=== Checking AGENT_ID definition in sdk/python/test.py ==="
head -30 examples/recipe_creator/sdk/python/test.py | grep -n "AGENT_ID"
echo -e "\n=== Full context around agent_id in backend/app.py ==="
sed -n '10,20p' examples/recipe_creator/backend/app.py
echo -e "\n=== Checking if there's an environment variable or config for AGENT_ID ==="
grep -r "AGENT_ID" examples/recipe_creator/ --include="*.py" --include="*.json" 2>/dev/null | head -20Length of output: 374
Let me fix that by running the verification with repository access:
🏁 Script executed:
#!/bin/bash
# Find AGENT_ID definition in test.py and verify backend context
echo "=== Checking AGENT_ID definition in sdk/python/test.py ==="
head -30 examples/recipe_creator/sdk/python/test.py | grep -n "AGENT_ID"
echo -e "\n=== Full context around agent_id in backend/app.py ==="
sed -n '10,20p' examples/recipe_creator/backend/app.py
echo -e "\n=== Checking if there's an environment variable or config for AGENT_ID ==="
grep -r "AGENT_ID" examples/recipe_creator/ --include="*.py" --include="*.json" 2>/dev/null | head -20Length of output: 912
Let me check the full imports and where AGENT_ID comes from in test.py:
🏁 Script executed:
#!/bin/bash
# Check imports and AGENT_ID source in test.py
echo "=== First 50 lines of sdk/python/test.py to find imports ==="
head -50 examples/recipe_creator/sdk/python/test.py
echo -e "\n=== Verify all agent_id values in the files ==="
echo "Config file agent_id:"
grep -o '"agent_id":"[^"]*"' examples/recipe_creator/agents/runagent.config.json
echo -e "\nBackend app.py agent_id values:"
grep -o 'agent_id="[^"]*"' examples/recipe_creator/backend/app.py | sort | uniqLength of output: 1309
Fix backend agent_id mismatch in examples/recipe_creator/backend/app.py.
The test file (lines 24, 50) correctly uses 9cd7f85d-248c-4931-831a-5b4d43a01a78 matching runagent.config.json. However, backend/app.py (lines 12, 18) uses a different agent_id 7cd7f85d-248c-4931-831a-5b4d43a01a78, causing the backend to fail when called from tests. Update backend/app.py lines 12 and 18 to use the correct agent_id: 9cd7f85d-248c-4931-831a-5b4d43a01a78.
🤖 Prompt for AI Agents
In examples/recipe_creator/backend/app.py around lines 12 and 18, the hard-coded
agent_id is incorrect (uses 7cd7f85d-248c-4931-831a-5b4d43a01a78); update both
occurrences to match the test and runagent.config.json agent_id
9cd7f85d-248c-4931-831a-5b4d43a01a78 so the backend matches the test harness.
|
|
||
| while let Some(chunk_result) = stream.next().await { | ||
| match chunk_result { | ||
| Ok(chunk) => println!("{}", chunk), |
There was a problem hiding this comment.
Fix markdown formatting: multiple spaces after heading.
Line 133 contains multiple spaces after the ## heading hash. Use single space for consistent markdown formatting.
-## Features
+## FeaturesCommittable suggestion skipped: line range outside the PR's diff.
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
133-133: Multiple spaces after hash on atx style heading
(MD019, no-multiple-space-atx)
🤖 Prompt for AI Agents
In runagent-rust/runagent/README.md around line 133, the Markdown heading uses
multiple spaces after the '##' hash; change it to a single space (e.g., '##
Heading') to normalize heading formatting and ensure consistent Markdown
rendering.
| "env_vars": {}, | ||
| "agent_id": "ac29bd73-b3d3-42c8-a98f-5d7aec7ee919", | ||
| "auth_settings": { | ||
| "type": "api_key" | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
Verify new configuration fields are documented.
The addition of env_vars and auth_settings fields represents a schema evolution. Verify that:
- These fields are documented in the configuration schema docs
- The
auth_settings.typevalues and options are documented - Existing agents won't break if these fields are missing (backward compatibility)
🏁 Script executed:
#!/bin/bash
# Check if new fields are documented
rg -nP 'env_vars|auth_settings' docs/ -A 3 -B 3
# Check schema validation for these fields
rg -nP '(env_vars|auth_settings).*schema|validate.*config' --type=pyLength of output: 6562
[/run_scripts]
🏁 Script executed:
#!/bin/bash
# Check for auth_settings type options in docs
rg -nP 'auth_settings.*type|type.*auth' docs/ -A 2 -B 2
# Check schema for field requirements
rg -nP '(required|optional).*auth_settings|env_vars' --type=py -A 2 -B 2
# Look for backward compatibility handling
rg -nP 'auth_settings|env_vars' runagent/sdk/config.py -A 5 -B 5Length of output: 10707
[/run_scripts]
🏁 Script executed:
#!/bin/bash
# Find auth_settings field definition in schema
rg -nP 'auth_settings' runagent/utils/schema.py -A 3 -B 1
# Find all auth_settings type assignments to identify valid values
rg -nP '"type"\s*:\s*"(none|api_key|[^"]*)"' --type=json --type=py -B 2 -A 1 | head -50
# Check if auth_settings has validation or schema constraints
rg -nP 'class.*Config|auth_settings|AuthSettings' runagent/ --type=py -A 2 -B 1 | grep -A 5 -B 5 auth_settings | head -60Length of output: 6104
[/run_scripts]
🏁 Script executed:
#!/bin/bash
# Find auth_type variable assignments and validation
rg -nP 'auth_type\s*=' runagent/cli/commands/ -B 2 -A 2
# Check for auth validation or allowed types
rg -nP '(none|api_key|oauth|jwt)' runagent/ --type=py -C 1 | grep -i auth | head -40
# Get the full template file context
cat templates/agno/default/runagent.config.jsonLength of output: 4947
Documentation for auth_settings.type values is incomplete.
While env_vars and auth_settings fields are documented, the valid values for auth_settings.type are not enumerated. The docs show "type": "none" as a default but don't indicate that "api_key" is also supported (as shown in the template).
Add to docs/configuration/config-file.mdx or docs/explanation/introduction.mdx:
- List supported
auth_settings.typevalues:"none"and"api_key" - Document each type's configuration requirements
Backward compatibility is maintained (both fields are Optional with sensible defaults).
🤖 Prompt for AI Agents
In templates/agno/default/runagent.config.json around lines 27 to 31, the
documentation is missing an enumeration and explanation of valid
auth_settings.type values; update docs/configuration/config-file.mdx (or
docs/explanation/introduction.mdx) to list supported values "none" and "api_key"
and describe each type's configuration requirements (e.g., "none" requires no
credentials; "api_key" requires an env var or config key for the API key and how
to supply it), mark both fields optional with their sensible defaults, and add a
short example snippet and note about backward compatibility.
| # RunAgent Rust SDK from crates.io | ||
| runagent = "0.1.33" |
There was a problem hiding this comment.
🧩 Analysis chain
Good update to use the published crates.io version.
The dependency has been correctly updated to use the published RunAgent SDK from crates.io.
Verify that version 0.1.33 is the latest published version on crates.io:
🌐 Web query:
What is the latest version of the runagent crate on crates.io?
💡 Result:
The latest version on crates.io is 0.1.1. [1]
Sources:
[1] docs.rs runagent (crate page showing runagent 0.1.1).
Fix invalid dependency version: runagent 0.1.33 does not exist on crates.io.
The latest version of the runagent crate on crates.io is 0.1.1, but the Cargo.toml specifies version 0.1.33, which will cause a build failure. Update the dependency to the correct version:
runagent = "0.1.1"
🤖 Prompt for AI Agents
In test_scripts/rust/test_agno/Cargo.toml around lines 7 to 8, the dependency
version for runagent is incorrect (0.1.33 does not exist); change the version to
the correct published release by updating the runagent entry to "0.1.1" so Cargo
can resolve and build the crate.
| // let agent_id = "f9415c35-6c01-4f76-a9d5-ef2e11c08cbb"; | ||
| #[tokio::main] | ||
| async fn main() -> Result<(), Box<dyn std::error::Error>> { | ||
| let agent_id = "ac29ba73-b3d3-42c8-a98f-5d7aec7ee919"; |
There was a problem hiding this comment.
Fix agent ID typo.
The agent ID appears to have a typo: ac29ba73 should be ac29bd73 based on the configuration in templates/agno/default/runagent.config.json (line 28). This mismatch will cause the test to fail when connecting to the agent.
- let agent_id = "ac29ba73-b3d3-42c8-a98f-5d7aec7ee919";
+ let agent_id = "ac29bd73-b3d3-42c8-a98f-5d7aec7ee919";📝 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.
| let agent_id = "ac29ba73-b3d3-42c8-a98f-5d7aec7ee919"; | |
| let agent_id = "ac29bd73-b3d3-42c8-a98f-5d7aec7ee919"; |
🤖 Prompt for AI Agents
In test_scripts/rust/test_agno/src/main.rs around line 48, the hard-coded
agent_id has a typo ("ac29ba73...") that doesn't match
templates/agno/default/runagent.config.json (should be "ac29bd73..."); update
the agent_id string to exactly match the configured agent ID (replace "ac29ba73"
with "ac29bd73") so the test connects to the correct agent.
Pushed the latest rust sdk to crates io and update the docs with latest changes and so for readme
Summary by CodeRabbit
New Features
Documentation