Inspiration
Support inboxes are full of ambiguous, underspecified requests like "fix it pls", access asks, and policy questions. Most AI demos stop at chat, but real support operations need an agent that can interpret messy input, plan actions across systems, and know when to pause for a human. I built Clearance to show what an autopilot support agent should look like in the real world: tool-using, policy-aware, and human-gated.
What it does
Clearance is an IT support autopilot agent for real email. A customer sends a message to an AgentMail inbox, my backend receives it, and Qwen on DashScope analyzes the request, identifies intent and urgency, and creates an execution plan. Safe actions can run automatically, such as knowledge search, user lookup, ticket creation, ticket updates, and thread labeling. Risky actions, especially access-related ones, are held for human approval. Outbound replies are also routed through draft review before being sent.
This gives support teams a workflow that is faster than manual triage, but safer than a fully autonomous chatbot.
How I built it
I built the frontend in Next.js and deployed it on Vercel. The API and worker run on Alibaba Cloud Simple Application Server in Singapore. I used Fastify for the API, Supabase Postgres plus pgvector for persistence and retrieval, DashScope / Qwen for analysis, planning, drafting, and embeddings, Alibaba OSS for storing uploaded knowledge files, and AgentMail for inbound and outbound email handling.
The flow works like this:
- A team provisions an inbox and uploads knowledge documents.
- A customer sends an email to the AgentMail inbox.
- AgentMail triggers my backend on Alibaba Cloud.
- The worker uses Qwen to analyze the message and generate a tool plan.
- The plan executes through tools like knowledge search, ticket actions, and user lookup.
- Human approval is required for sensitive actions.
- The system creates a draft reply, which can be reviewed before sending.
- Every step is logged in the UI for auditability.
Challenges I ran into
One major challenge was making the system feel like a real agent instead of a scripted workflow. That meant handling ambiguous input, chaining external tools, and keeping the state auditable. Another challenge was separating safe actions from risky ones so I could introduce meaningful human-in-the-loop checkpoints. I also had to make the deployment production-shaped for the hackathon by running the backend on Alibaba Cloud, integrating OSS for knowledge file storage, and ensuring the email and worker flow behaved reliably end to end.
Accomplishments that I'm proud of
I'm proud that Clearance is not just a chat demo. It uses a real inbox, a real worker loop, retrieval with citations, external tools, approval gates, draft review, and a deployed stack across Vercel, Alibaba Cloud, Supabase, DashScope, OSS, and AgentMail. I'm also proud that the system keeps an execution trail so operators can see what the agent did, why it did it, and where human approval was required.
What I learned
I learned that useful agents need boundaries as much as capabilities. Planning and tool use are powerful, but trust comes from clear policies, audit logs, and human checkpoints. I also learned how to combine Qwen planning with a practical backend architecture that can receive webhooks, run jobs asynchronously, retrieve knowledge, and support operator review.
What's next for Clearance
Next I want to deepen policy controls, improve routing and confidence thresholds, support more production integrations beyond mocks, expand approval workflows, and make the operator experience even better with richer analytics and review tools. The long-term vision is a dependable support autopilot that can resolve more issues safely while keeping humans fully in control of sensitive actions.
Built With
- agentmail
- alibaba-cloud-simple-application-server
- alibaba-oss
- dashscope
- docker
- fastify
- github
- github-jobs
- next.js
- pgvector
- postgresql
- qwen
- react
- supabase
- typescript
- vercel
Log in or sign up for Devpost to join the conversation.