Inspiration
Booking a multi-day international trip takes 4–8 hours of manual work across 6+ disconnected platforms. Every step — finding flights, comparing hotels, tracking budget, coordinating dates — requires human judgment. When something fails (a sold-out hotel, a missed connection), you start over. We asked: what if an AI could own the entire workflow, not just suggest options?
What it does
OpenWorld is an autonomous AI workflow execution system. You write a trip.md policy file defining your destination, budget, and preferences. A pipeline of 9 specialized AI agents — powered by Qwen AI on Alibaba Cloud — executes the full workflow end-to-end: parsing intent, planning an itinerary, searching real flights and hotels via SerpAPI, enforcing budget constraints, requesting human approval before committing spend, recovering from failures automatically, and generating a full Markdown travel report stored in Alibaba OSS. Every agent logs to Alibaba SLS in real time. The React frontend streams live agent activity, shows an animated pipeline graph, and renders the final AI-generated report.
How we built it
Backend: Rust + Axum running on Alibaba Function Compute as a linux/amd64 Docker container. The orchestrator is an async state machine (tokio::spawn) driving 9 agents through states: created → planning → searching → verifying_budget → awaiting_approval → reserving → recovering → finalising → complete. Agents communicate via typed Rust structs. The human approval gate uses a tokio::sync::oneshot channel to pause the pipeline mid-execution — not polling.
Qwen integration: Two calling patterns — single-turn infer() for structured JSON output, and two-turn think_then_answer() (ReAct-style) for the SearchAgent where the model reasons over raw SerpAPI results before committing to ranked selections.
Frontend: React 18 + TypeScript + Vite. useSession hook polls the API every 1.5s. PipelineGraph derives each node's state from live log analysis. ApprovalGate renders the budget breakdown and approve/reject controls. TripResult renders the AI report with react-markdown + remark-gfm.
Alibaba Cloud: Qwen AI (qwen3.7-max), OSS for report storage, SLS for activity logs, Function Compute for serverless deployment.
Challenges we ran into
- Cross-compilation from macOS to Linux: The Rust binary needs to run on Alibaba FC's
linux/amd64environment. We solved this with a multi-stage Docker build usingrust:1.86-slim-bookworm, hitting a Rust edition2024 compatibility error before bumping the version. - Mid-pipeline human approval: Pausing an async Rust pipeline to wait for an HTTP decision required using
tokio::sync::oneshotchannels — not a standard pattern. Getting the frontend to correctly reflectawaiting_approvalstate while the pipeline is suspended took careful state machine design. - Qwen structured output: Getting
qwen3.7-maxto reliably output valid JSON (not wrapped in markdown code blocks) required explicit prompt engineering and post-processing. - Real-time log streaming: Broadcasting agent logs to multiple HTTP clients simultaneously without blocking the pipeline required
tokio::sync::broadcastchannels with careful subscriber lifecycle management.
Accomplishments that we're proud of
- A fully working 9-agent autonomous pipeline that executes a real travel workflow end-to-end in production on Alibaba Cloud
- The human-in-the-loop approval gate as a first-class architectural primitive — not a UI workaround
- Two-turn ReAct-style Qwen reasoning in the SearchAgent, producing significantly better flight/hotel selection than single-turn prompting
- A real-time animated pipeline graph in the frontend that derives node states from live log stream analysis — no explicit state events needed
- HMAC-SHA256 execution proof on every completed workflow — cryptographically verifiable that the artifact was produced by the operator key
What we learned
- Qwen3.7-max is highly capable at structured JSON output when prompted correctly, and the two-turn ReAct pattern dramatically improves result quality for ranking tasks
- Alibaba Function Compute's custom container runtime is extremely flexible — any language, any binary, 300s timeout handles long-running agent pipelines
- Building a typed AI pipeline in Rust forces you to define agent contracts explicitly, which eliminates an entire class of prompt injection and hallucination bugs that untyped pipelines suffer from
tokio::sync::oneshotis the right primitive for human-in-the-loop patterns in async Rust — it's clean, cancellation-safe, and exactly models "wait for one decision"
What's next for OPENWORLD
- Multi-domain workflows — the
trip.mdpolicy format is domain-agnostic. Next: expense reports, procurement workflows, event planning - Streaming WebSocket — replace polling with live WebSocket push for sub-second pipeline visibility
- Agent memory across sessions — persistent vector memory so agents learn from previous workflows
- Browser automation — full end-to-end reservation via headless browser rather than API simulation
- Policy marketplace — share and fork workflow policies as open-source YAML templates
Built With
- oss
- qwen
- rust
- typescript
Log in or sign up for Devpost to join the conversation.