DEV Community

Cover image for AI agents fail in four predictable ways. We built Hivelock around all four
shichifukutekx
shichifukutekx

Posted on Edited on

AI agents fail in four predictable ways. We built Hivelock around all four

Most teams that try AI agents in real work hit the same wall. The demo is impressive: the agent reads the inbox, checks the CRM and drafts the reply. Then someone asks the questions that matter in a business:

  • What happens when it gets something wrong and nobody notices?
  • What stops it from doing more than we meant?
  • What stops it from spending money in a loop overnight?
  • Who checks its work, and how would we prove what it did?

These aren't edge cases. They're the four most common ways agent projects fail: silent unreliability, acting beyond intent, runaway cost and missing oversight. We built Hivelock so that each one has a clear answer you can configure.

Hivelock is a self-hosted platform for building AI agents and workflows, connecting them to your business tools, and staying in control of every action that matters. The core is open source under AGPL-3.0.

Failure 1: Agents act beyond what you intended

An agent connected to your systems can, in principle, do anything those systems allow. Writing "please don't delete anything" in a prompt isn't a control.

In Hivelock, control sits in the platform rather than the prompt:

  • Least access. Each agent gets only the actions you choose for it. Credentials stay on the server, so the model never sees them.
  • Changes wait for a person. Reading runs freely. In chat, any action that changes data waits for approval. In workflows, you place approval steps where you need them.
  • Per-action rules. An admin can make any single action on a connection stricter: always ask, or switch it off everywhere.
  • Instructions hidden in data are ignored. If an email or document tells the agent to do something, the agent treats it as text, not as an order.
  • Reviewed MCP tools. Tools from remote MCP servers stay off until someone approves them. A tool whose definition changes is switched off again.

Failure 2: Runaway cost

Agents loop. A tool returns something unexpected, the model tries again, and again. You find out when the invoice arrives.

  • Each run has a step and token limit.
  • An agent that asks for the same step with the same details a third time is stopped before it spends more.
  • A monthly AI allowance caps what a workspace can spend. Everyone sees a warning from 80% used.
  • Usage and costs shows what each agent and workflow spends, so there are no surprises.

Failure 3: Silent unreliability

The worst failures are quiet ones. Someone tweaks an agent's instructions on Tuesday, and by Thursday it has been giving customers wrong answers for two days.

  • Agent tests let you save example questions with rules for a good answer: what it must say and what it must never say. A fixed rule judges each answer, so the model never marks its own work. During a test, every action that would change something is refused.
  • A release gate (licensed editions): when an agent with saved tests is changed, its tests start straight away. Live workflows keep off the changed version until they pass. A step that needs it stops with a plain message naming the tests that failed. Chats keep working, and an admin can choose "use it anyway", which goes into the audit log.
  • Live runs and traces show each step, tool call and decision as it happens.

Failure 4: Missing oversight

When something goes wrong you need two things fast: a way to stop it, and a record of what happened.

  • Pause all stops every workflow and chat in a workspace at once. Runs hold where they are and carry on when an admin resumes.
  • Turn off one agent when only that agent is misbehaving. It starts no chats, workflow steps or hand-offs until someone who manages agents turns it back on.
  • A tamper-evident audit log. Sign-ins, changes and approvals are recorded in a hash-chained log, so an edited record shows up.
  • Roles (viewer, operator, builder, admin, owner) decide who can chat, run, approve, build and manage.

What you can build with it

  • A visual workflow builder: drag agents, conditions, approvals and connector steps onto a canvas.
  • Custom agents: describe what you want, review the draft, and add skills and approved memory.
  • 74+ templates across 11 business areas, installed as drafts so nothing runs until you say so.
  • 26+ connectors: mail, files, databases, chat, CRM, developer tools and remote MCP servers.
  • Triggers: manual, schedule, signed webhook and incoming email.
  • Any AI model: any OpenAI-compatible server, with a fallback order. Local models work too.
  • Document search across PDF, Excel, CSV and text files, with the source named.
  • Company memory: notes every agent in a workspace reads. Agents can suggest a note, but it does nothing until a person accepts it.

Security as a default, not an upsell

Every edition, including the free one, keeps the same protections:

  • Workspace isolation with PostgreSQL row-level security
  • AES-256-GCM encryption for secrets and run data, with a key for each workspace
  • Mandatory two-step sign-in for password accounts
  • A network guard that stops connectors reaching private addresses by default
  • The tamper-evident audit log

We'd rather be honest about where we stand. Hivelock is in early access. We test it ourselves with the open-source Strix penetration testing tool, but it hasn't yet had an independent third-party penetration test and holds no certification. The known limits are written up in the developer guide.

Why self-hosted

Agents need deep access to your mail, documents, CRM and databases. Hivelock runs on your own servers, next to your data, with your choice of AI provider, including local models. A confidential mode keeps sensitive work on the providers you have cleared for it.

It's built with TypeScript, Node.js, React, PostgreSQL with pgvector, Hono, pg-boss, LangGraph and the Model Context Protocol. A Docker Compose stack includes the database, the app, a worker and Caddy for TLS.

Editions

  • Community: free and open source (AGPL-3.0). 1 workspace, 5 people, 5 agents, 10 workflows and 6 core connectors, with approvals, audit and encryption included.
  • Self-hosted Licensed: no limits, all connectors, single sign-on, agent tests and the release gate, version history and WhatsApp channels.
  • Hosted: planned, from $29 a month.

Try it

git clone https://github.com/shichifukutekx/hivelock
cd hivelock
npm install
cp .env.example .env   # fill in database, secret and admin settings
npm run db:migrate && npm run web:build
npm run platform       # and in another terminal: npm run worker
Enter fullscreen mode Exit fullscreen mode

Open http://localhost:4320, sign up with your admin address, and add an AI model under Settings.

We'd love feedback, especially from teams who have tried agents and pulled them back because of one of the four failures above. Tell us what stopped you.

Hivelock is a product of shichifukutekx.ai.


Top comments (0)