Build Your Own AI Agent for Daily Tasks: From Simple to Complex (Free Beta Download)
← Back to Home

Essay

Build Your Own AI Agent for Daily Tasks: From Simple to Complex (Free Beta Download)

Step by step from a single AI instruction to a self-planning agent that clears your daily admin. Then download the free beta, connect Claude, ChatGPT, Grok or Gemini, and build your own by drag and drop.

An AI agent is not magic. It is an AI model, a list of steps, a few tools, and a loop that passes results from one step to the next. In this guide we build one from the simplest possible version to a fully planned, code-extensible agent that handles real daily tasks. At the end you can download the free beta and build your own by dragging and dropping.

What an AI agent actually is

Strip away the hype and every agent has four parts:

  • A brain: a large language model such as Claude, ChatGPT, Grok or Gemini.
  • Steps: small, clear instructions such as "summarize this" or "find the action items".
  • Tools: things the agent can do besides writing text, such as opening an app, asking you a question or saving a file.
  • A loop: the program that runs each step, feeds its result into the next, and stops when the job is done or something goes wrong.

Chatting with an AI is one step at a time, with you copying and pasting in between. An agent does the copying and pasting for you.

Before you start: get your AI key

The agent does not include its own AI. You bring yours, so you stay in control of cost and privacy. You need an API key, a private password that lets a program talk to the AI on your behalf.

AIWhere to get a keyGood default model
Claude (Anthropic)console.anthropic.com, then API Keysclaude-sonnet-4-5
ChatGPT (OpenAI)platform.openai.com, then API keysgpt-4o-mini
Grok (xAI)console.x.ai, then API Keysgrok-3-mini
Gemini (Google)aistudio.google.com, then Get API keygemini-2.5-flash
Local (Ollama, LM Studio)No key needed, runs on your own computerllama3.1
A ChatGPT Plus, Claude Pro or Gemini subscription is not the same as API access. API usage is billed separately and pay-as-you-go. A typical daily-task run costs a fraction of a cent to a few cents. Set a monthly spending limit in your provider's console.

If you want everything to stay on your own machine, install Ollama (see my guide on setting up Ollama on a MacBook) and choose "Local / other" in the agent's settings.

Xialei Agent: free beta

One small file. No installation and no account. Download it, double-click to open it in your browser, connect your AI, and drag steps together to build your agent.

Download the beta

Works in Chrome, Edge, Firefox and Safari on Mac, Windows and Linux. Your key and workflows are saved only in your browser. You can also try it online first.

Level 1: one instruction

The simplest agent is a single step. In the beta, drag Ask AI into your workflow, write an instruction, paste your task text on the right and press Run workflow.

instruction
Turn these notes into a tidy to-do list, most urgent first:

{{input}}

{{input}} is replaced by whatever you paste into the task box. That is already useful, but it is still basically a chat.

Level 2: a chain of steps

The real gain comes from chaining. Each step gets the result of the previous one through {{previous}}, or any earlier step through {{step1}}, {{step2}} and so on. Here is the "Meeting follow-up" template that ships with the beta:

  1. Summarize the transcript in 5 bullet points ({{input}}).
  2. To-do list: pull out every action item, with owner and date ({{input}}).
  3. Draft email to the team using {{step1}} and {{step2}}.
  4. Save to file: download all three as meeting-notes.txt.

Small, focused steps give much better results than one giant prompt. Each step is easy for the AI to get right, and when something is off you can see exactly which step to fix. Drag steps to reorder them, and click Edit to change their settings.

Level 3: tools and you in the loop

Agents become genuinely helpful when they can act and when they know to ask. The beta includes three tool steps:

  • Ask me pauses the run and asks you a question. Your answer becomes {{previous}}. The "Reply to an email" template uses this: it works out what the sender wants, asks what you want to say, then writes the reply.
  • Open app or site opens a website or an app link such as mailto:, slack://, spotify:, zoommtg:// or your calendar.
  • Save to file downloads any result as a text file.

The "Ask me" step is the most underrated feature in agent design. A good agent does the busywork and checks with you on decisions.

Level 4: Autopilot, the AI plans the steps

Now flip it around: instead of you designing the steps, describe the goal and let the AI design the workflow. In the Autopilot tab, type something like:

goal
Every morning I paste my unread emails. Tell me which ones need a reply today,
draft short replies for those, and give me a one-paragraph overview.

Your AI returns a plan made of the same building blocks, which loads into the Builder for you to review, edit and run. This is the core idea behind every "autonomous" agent: plan, then act. The difference is that you approve the plan first. For safety, Autopilot never adds steps that run code.

Level 5: code it through

Every workflow is plain, readable data. Open the Code tab and you will see something like this:

json
{
  "version": 1,
  "steps": [
    { "type": "checklist", "title": "Find my tasks", "config": { "text": "{{input}}" } },
    { "type": "ai", "title": "Prioritise", "config": { "prompt": "Order by urgency:\n\n{{previous}}" } },
    { "type": "open", "title": "Open my calendar", "config": { "url": "https://calendar.google.com" } }
  ]
}

You can edit it directly, share it with a friend as a file, or ask your AI to write one for you. For anything the building blocks cannot do, there is a Run code step. It runs JavaScript with access to input, previous, steps and an ai() helper that calls your model:

javascript
const lines = previous.split('\n').filter((l) => l.startsWith('[ ]'));
const urgent = await ai('Which of these must be done today? Reply with only those lines.\n' + lines.join('\n'));
return `Today:\n${urgent}\n\nTotal open items: ${lines.length}`;

How the loop works under the hood

If you want to build your own agent from scratch, this is the heart of it. It is surprisingly small:

javascript
async function runAgent(steps, input) {
  const ctx = { input, previous: input, steps: [] };
  for (const step of steps) {
    const prompt = fill(step.template, ctx);   // swap in {{input}}, {{previous}}, {{stepN}}
    const result = step.tool
      ? await step.tool(prompt, ctx)            // open an app, ask the user, save a file...
      : await callAI(prompt);                   // Claude, ChatGPT, Grok or Gemini
    ctx.previous = result;
    ctx.steps.push(result);
  }
  return ctx.previous;
}

Everything else, such as planning, memory or scheduling, is built on top of this loop. Fully autonomous agents simply let the AI choose the next step inside the loop instead of following a fixed list.

Safety and privacy

  • Your key stays with you. It is stored in your own browser and sent only to the AI company you picked. Nothing goes through my servers.
  • Be careful with code. Only run "Run code" steps you wrote or trust. The beta warns you whenever you open a workflow that contains code.
  • Do not paste secrets. Whatever you paste is sent to your AI provider, so leave out passwords and bank details.
  • Set a spending limit in your AI provider's console, just in case.

Beta limitations

  • It runs in your browser, so it can open apps through links but cannot click buttons inside desktop apps.
  • Some browsers block pop-ups. If an app does not open, click the link shown in the results.
  • Local models through Ollama need OLLAMA_ORIGINS=* set so the browser can reach them.
  • No scheduling yet. You press Run. Scheduled runs and a desktop version are next on the list.

Start simple, then grow

Begin with a single "Ask AI" step for one annoying task you repeat every day. When it works, add a second step. Then add an "Ask me" step. Then try Autopilot. In a week you will have a small team of agents that clear your morning admin in a minute.

The beta is free and I am improving it every week. If you build a workflow you love, or hit a bug, send it to me. The best ones will ship as built-in templates.