Skip to content
MiraiTech
All work

Case study · AI

Executive assistant agent

A personal agent for busy executives, in the style of OpenClaw. It takes requests from Slack or SMS, breaks them into steps, and hands each step to a sub-agent for calendars, travel, messages, code or the CRM. Anything that spends money or changes code waits for a person to approve it.

Year
2026
Duration
3 months
Type
AI
Status
In production
Executive assistant agent, main screen

Results

  • 7 specialized sub-agents
  • Approval step for risky actions
  • About $75k a year of assistant time saved per client

The problem

Executives spend 3+ hours a day on coordination: scheduling meetings, triaging email, updating the CRM. Tools like Zapier run simple if-then rules. They break down when a request needs judgment or touches several apps.

What we built

We built a multi-agent system on LangGraph's supervisor pattern. A central orchestrator reads the request, splits it into sub-tasks and hands them to 7 specialized agents that run in parallel. User preferences are kept in pgvector, so the agent remembers them between sessions. Risky actions, such as a payment over $500 or a code change, wait until the user approves them.

Supervisor with 7 sub-agents
A LangGraph supervisor splits each request into tasks and runs 7 sub-agents in parallel: Calendar, Transport, Communication, Code, CRM, Research and Admin.
Approval before risky actions
Payments over $500, code pushes and outgoing messages wait for the user to confirm. The thresholds are configurable.
Preference memory
Choices such as Zoom or Meet, United or Delta, and usual meeting times are stored in pgvector and applied to later requests.
Live workflow view
A live DAG shows each agent's state, its logs and any pending approvals while a request runs.
Service integrations
The agents call Slack, Google Calendar, GitHub, Twilio SMS and Uber directly. The user talks to all of them through one natural-language interface.

How it works

A supervisor agent with specialized sub-agents, approval gates for risky actions and a persistent memory store.

  1. 01

    Input

    Voice or text → intent classification with Claude Sonnet 4

  2. 02

    Task planning

    LangGraph supervisor splits the request into sub-tasks with a dependency graph

  3. 03

    Agent dispatch

    CalendarAgent, TransportAgent, CommunicationAgent, CodeAgent and CRMAgent run in parallel

  4. 04

    Approval gate

    User approval required for risky actions ($500+, code changes, external messages)

  5. 05

    Execution

    Approved tasks call Google Calendar, Uber, Twilio and GitHub

  6. 06

    Confirmation

    Results collected → Slack message, dashboard update and SMS confirmation

Screens

Executive assistant agent, screen 1
1 / 2

Decisions

LangGraph 0.2.5AI / ML
We needed tight control over agent transitions and approval gates, and LangGraph models the workflow as an explicit state machine. CrewAI's implicit delegation made complex workflows very hard to debug.
Claude Sonnet 4AI / ML
We use it as the planning model because it follows instructions closely and its structured output is reliable. In our multi-step planning tests, GPT-4o hallucinated tool calls 15% more often.
Neon Postgres + pgvectorData
At under 100k vectors, serverless Postgres cost less than Pinecone. Keeping the vectors in SQL made preference queries simple and left one less service to run.
Next.js 15 App RouterFrontend
Server Components cut the dashboard's client-side JS by 40%. Server Actions stream the execution logs, so we did not need a separate WebSocket server.

What went wrong

Deadlocks between agents

Problem
When two sub-agents needed the same state, for example CalendarAgent and TransportAgent both waiting on the appointment time, they could deadlock, and 23% of multi-step requests timed out.
Fix
We switched to message passing with immutable state snapshots. Each agent reads a frozen snapshot and writes to a merge queue. The supervisor resolves conflicts by priority: calendar first, then transport, then notifications.
Result
No deadlocks in production. Average coordination latency fell from 8s to 2.3s.

Malformed tool calls

Problem
Claude sometimes produced bad tool call arguments, such as a wrong date format or a missing required field. In early testing, 12% of requests failed at the API.
Fix
We added PydanticAI validation between the model output and the API call. An invalid call goes back to the model with the error and the schema, and the model corrects it. After 2 retries, a person takes over.
Result
Tool call success went from 88% to 99.2%. Retries add 400ms on average.

Team and stack

Hiroshi designed the agent graph and built the Next.js dashboard. Kenta built the 7 sub-agents and their API integrations. Hiroki built the pgvector memory layer and the production infrastructure.

  • LangGraph
  • Claude Sonnet 4
  • Gemini 2.5 Pro
  • Next.js 15
  • Neon Postgres
  • pgvector
  • Slack API
  • Twilio