Latchkey 談智能體平台設計:智能體是用戶,人類是客戶
Agents are our users. Humans are our customers.
Latchkey 團隊原先主要按智能體工作流程設計 CI/CD 平台,卻發現客戶看不清智能體做了甚麼、費用花在哪裏,因此補上面向人類用戶的觀察與控制介面。平台現以活動紀錄和每次執行成本呈現智能體操作,並透過分權 API keys、預算上限和一鍵批核,讓人類設定安全、成本與變更邊界。文章主張讓智能體執行工作,同時讓人類掌握情況並快速作出必要決定,避免失去信任或令每項操作都等待批核。
Building a platform for agents means building it for the humans behind them too.
When we started Latchkey, we built a CI/CD platform for agents, not humans.
CI/CD is the system that builds, tests and ships code every time it changes. We focused on how agents would do development and where CI/CD fit into that flow, and we optimized for it. We were dogfooding, building and shipping a lot, and the agent side of the product got very good.
Then customers started raising the same point. They'd run multiple agents across their pipelines and jobs. The work got done. And then they'd have no idea what had happened, or where their spend was going.
They were spending more with us than they had on GitHub Actions and self-hosted build servers. They were fine with that because of the productivity gain. But they kept telling us the same thing.
"We don't actually know what's going on."
We had built the platform for the agents. We hadn't built it for the people paying for it.
We optimized one side
Every platform that agents use has an agent control plane. It's the set of actions agents take on your platform while they work, and how those actions fit into the rest of their task. For us, that's agents running jobs, reading the results and fixing what broke.
That's the side we optimized, and it's the side most teams building for agents optimize. Agents can do human-level work, so the instinct is to take the human out of the loop and make the agent's path as fast as possible.
We used to tell ourselves this a lot. Agents are our users, but humans are our customers. Humans pay the bills, and agents drive the usage.
Both halves of that are true. We had only built for the first one. And if the friction for humans keeps growing, the humans leave. When they leave, their agents leave with them.
Taking a step back
So we stepped back and talked to more of our customers.
Before agents, a product had one user to design for. A person logged in, did the work and saw what happened as they used it. Now one person starts several agents, and the agents do the work. The person still needs to know what happened and still sets the rules, even though they aren't using the product directly anymore. That's a three-way problem between the human, their agents and your platform.
Humans come into that problem at three points. They start an agent and watch it work. They come into your platform to set things up, and the platform passes that on to their agents. And they come back after something goes wrong.
At the time, our dashboard showed standard CI/CD metrics like builds, tests, jobs and deployments. Nothing showed what agents were doing on the platform, and humans had no way to steer them.
Fixing that is a balancing act. You want agents driving the control plane, because that's where the productivity comes from. But humans still need to be in the loop for the small administrative decisions, like what an agent is allowed to touch and how much it's allowed to spend. The job is to give humans those decisions without adding friction to everything else.
Where we landed was two things. Humans need to see what their agents are doing, and they need to be able to act on it.
In our case, the agent control plane is agents running CI/CD jobs, reading the results and fixing what broke. Observability is an agent activity view with the cost of every run, and action is scoped API keys, budgets and one-click approvals.
Show them where the spend went
We're a usage-based platform. The more agents do, the more we bill the customer. So when an agent keeps running jobs that aren't working, the customer needs to know.
We asked customers what they wanted to see. Beyond builds and performance, they wanted to know what their agents were doing. Which actions they took on the platform, which jobs they pushed out, which deployments they invoked, and how much each run cost.
So we added agent activity to the dashboard. It's a god view of every agent's actions on Latchkey, with the cost attached to each run.
Spend is usually what tipped customers off. Day to day, they cared more about productivity than cost. What they needed was the audit trail.
Do they open those tabs every day? No. But if there's a one in 10,000 chance that something goes wrong, they need to be able to go back and see what happened. Knowing that data exists is what lets them trust their agents enough to keep them running.
This applies well outside CI/CD. If customers bring agents to do work on your platform, track what those agents do and show it back to the human. It doesn't have to be on the first page of your product. It has to be there. A dashboard gets you 60 to 70% of the way. The rest comes from talking to your customers.
Acting on it
Seeing what happened is only part of it. Humans also need to shape what happens next.
If you want an agent-native platform, agents have to be able to take actions. That includes everyday actions, like running jobs and doing deployments in our case. It also includes admin actions, like security and cost settings.
You don't want to hand the admin side to agents entirely. Humans need to come in at a high level and set the boundaries. For us, that came down to security, cost and performance.
Security boundaries
An agent working on your platform is acting with someone's permissions. If the human can't control what those permissions are, every agent they bring is a risk they can't size up. So the first boundary a human needs is over what each agent is allowed to do.
On Latchkey, that boundary is the API key. Each agent gets its own key, scoped to what it's allowed to do, like read, write or deploy. The human creates the key and hands it to the agent.
Because the platform is built to be run by agents, we also let you create a key that can create keys. The reason is subagents. An agent splits its work across subagents, and each one needs to run its own CI/CD. Each one needs its own key. So the parent agent becomes a supervisor. It creates a key for each subagent and hands it over so they can do their work.
That's a master-level permission, and you have to be careful with it. The human still decides which agent, if any, gets it.
Whatever your platform does, the pattern carries over. Let the human define the boundary between their agents and your platform, one agent at a time.
Financial boundaries
Most platforms agents use are priced on usage. Agents keep going until something stops them. Let them do everything with no cost limit, and they can run up a huge bill. That's a headache for the customer, and it quickly becomes yours too.
So the second boundary is money. We show what every run costs, and we flag jobs agents run that are unnecessary or could be scoped down.
Humans can set a budget for each job an agent runs, or tell their agents to set it themselves. You could add a skill that says each job can't cost more than $2. There's also a stop limit. If total spend goes over $500, every action after that is blocked.
The stop limit is the obvious one. The less obvious one is attaching cost limits to how agents use your platform, and showing that cost data back to the human.
Decisions that take one click
The third area is performance. We track the CI/CD runs agents drive on Latchkey. We pull context from the customer's code base, from the agents running CI, and from the jobs themselves. Then we look for flaky tests (tests that pass or fail at random), failed deployments, runs taking longer than usual, and places where scoped tests would do.
Each finding is a change we could make to the customer's code. The question is who gets to approve it.
My test is simple. If nobody applies this change, is the world going to end tomorrow? If not, it's a passive change. A faster pipeline or a small security improvement is good to have, but it isn't do or die. Passive changes can go to agents and humans alike. The do-or-die changes are where you want a human.
The human still sets the line. Whether an agent can approve these is a scope on its key. Leave it off, and the human becomes the approval gate.
Whatever reaches a human is a one-click decision. We show a card with the premise, the findings and the evidence. One click approves it, and the system does the work, like opening a PR with the code change. One click rejects it. When someone rejects a type of finding, the system adapts and stops sending it. Over time, those clicks passively shape the interface between the human and the platform.
Skip this, and every decision turns into a review. That's where a lot of the friction between humans and their agents comes from.
People who work with agents are already used to making fast decisions. An agent asks, you answer, and it moves on. Platforms should meet them there. No digging through logs, no analysis. One concise decision they can understand immediately and act on.
Getting the balance right
If customers bring their own agents to your platform, it's easy to build only the agent control plane. From what I see talking to other vendors, most do.
What gets skipped is the human interface. What humans need to see, and what they need to decide, on your platform or about their own agents.
It's a balancing act, and getting one side wrong breaks the other. Lean too far toward the agents, and humans lose sight of what's happening. They can't explain the bill, they can't trace what went wrong, and they stop trusting their agents enough to let them run. Lean too far toward the humans, and every action waits on an approval. The agents slow down, and the productivity that brought customers to you in the first place is gone.
What worked for us was letting agents do the work, and giving humans a clear view and a few fast decisions.
We only figured that out because customers kept asking where their money went. Agents drive the usage, but humans pay the bills. If they can't see what their agents are doing, they won't keep paying for long.
來源:DEV Community · dev.to
