Inspiration

Automation tools like Zapier and n8n are powerful, but you have to build every flow node by node. AI agents go the other way: you just describe what you want, but they decide what to do at run time, which makes them hard to trust with your Slack channel or inbox. I wanted both: describe a job in plain English, then get back a workflow I can read, test, and trust to do exactly the same thing every time.

What it does

Agent Desk turns a sentence like "Every hour, check Hacker News for mentions of Linear and send me anything important on Slack. Ask me before posting if it's urgent" into a step-by-step workflow: fetch, filter, summarise, ask for approval, post.

Before building, it asks a few quick questions: where results should go, how often to run, and anything the request leaves open. You review the workflow, run a test on real data where nothing is sent, then switch it on to run on a schedule, by webhook or by hand. It works with 12 integrations, including Slack, Notion, email, GitHub, Hacker News, RSS, any web page, and web search with Tavily.

How we built it

1- Next.js 16 (App Router, server actions), React 19, TypeScript and Tailwind CSS v4, deployed on Vercel. Neon Postgres with Drizzle ORM. 2- An open model on Nebius Token Factory (DeepSeek V4 Pro) compiles the request into JSON using constrained output (response_format json_schema), with DeepSeek V4 Flash and Qwen3-235B as fallbacks. Qwen3-235B writes the AI steps inside runs. Every result is validated with Zod and checked against the integration catalog. 3- One schema per action. Each integration declares its parameters as a Zod schema. That one schema validates arguments at run time and also describes the action to the compiler, so the two can never drift apart. 4- A deterministic executor replays the saved workflow on every run. The AI writes the definition once and only writes text inside AI steps, so fetched content can't add steps or change where results are sent. 5- Web data: Tavily search when no URL is given, a built-in page reader with Jina Reader as a fallback for JavaScript-heavy pages, and a plain-code list cleaner that removes duplicates, filters by date, sorts and formats results. 6- Scheduling uses a single SQL statement (FOR UPDATE SKIP LOCKED) to claim due workflows, triggered by an external cron. 7- Security: credentials are encrypted with AES-256-GCM, bound to their owner and app. Sessions are hashed and stored server-side, passwords use scrypt, and feed and page URLs can only reach the public internet.

Challenges we ran into

1- Model availability: Gemini's free tier allows only 20 requests a day per model, and models were regularly overloaded (503), rate-limited (429) or suddenly unavailable (404). I moved to Nebius Token Factory and built ordered fallback lists per task, so a compile quietly moves to the next model instead of failing. 2- Getting open models to follow the schema: the decoder writes JSON fields in schema order and never shows the schema to the model. One field declared in a different order from my prompt's example made models drop the approval condition about half the time. Matching the order fixed it (16 out of 16 runs), and the compiler now also checks each workflow against the answers the user confirmed. 3- Scheduling on Vercel's free plan, which only allows daily cron jobs. The solution was an atomic tick endpoint driven by an external cron. 4- Real-world API quirks, such as Resend only sending from verified domains, Slack webhooks, and Notion page permissions. Each connection is now checked against the live service before it's saved, and runs are blocked until setup is complete.

Accomplishments that we're proud of

1- Every run is explainable. You can see exactly what each step received, produced and sent to the AI. 2- Safe testing. Test runs never send anything, so you can try a workflow on live data without risk. 3- Approvals from anywhere. They work from a phone through a Slack link, including editing the text before it goes out. 4- Multi-user security. One user's credentials can never be used for another user's runs, even by mistake.

What we learned

1- LLMs are excellent at writing a workflow and risky at running one. Separating authoring from execution is what makes the system trustworthy. 2- Constrained output plus strict validation turns an LLM into a dependable compiler, but only if the schema and the prompt agree on every detail. 3- For speed, the number of database round trips matters far more than the number of queries. 4- Small race windows and unchecked URLs become real bugs as soon as more than one person uses an app.

What's next for Agent Desk

1- More integrations: Google Sheets, Discord, Microsoft Teams and calendar. 2- OAuth sign-in for integrations, so users don't need to paste keys. 3- Agent personalities in AI summaries, so each agent writes in its own voice. 4- Automatic retries for failed runs, plus usage history and insights. 5- Email features: a per-user email sender, password reset and email verification. 6- A template gallery, so users can share and reuse workflows.

Built With

  • bluesky
  • dev.to
  • drizzle-orm
  • github-api
  • google-gemini
  • hacker-news-api
  • lobsters
  • neon
  • next.js
  • node.js
  • notion-api
  • open-meteo
  • postgresql
  • react
  • resend
  • rss
  • slack-api
  • tailwind-css
  • typescript
  • undici
  • vercel
  • zod
Share this project:

Updates

Submission history