Gantry Gives Every AI Agent a Badge, a Sandbox, and a Paper Trail

A self-hosted runtime that treats agents as governed employees: scoped identity in Slack or Teams, allowlisted credentials, a fresh isolated config per run, and audit writes that retry like production data.

9 min read • View on GitHub • More from knacklabs

A wide editorial illustration of a corporate security desk in a marble lobby. A mechanical attendant behind a counter hands a laminated badge on a lanyard to a small plainly drawn robot. On the counter between them sit a single brass key on a ring and an open ledger with one line freshly inked. Behind the attendant is a wall of identical numbered pigeonholes, most empty, one being filled with a fresh folder. A second robot waits in line holding its own badge stamped with a different number. The scene illustrates Gantry's thesis that each agent run gets a scoped identity, a projected credential, an audit record, and a freshly materialized config.
Every run begins at the desk: a scoped badge, one projected key, one ledger line, and a fresh folder in the wall.
Key Takeaways

What Happens When You Give an Agent a Seat

A message lands in Slack. Somewhere in an organization, a teammate has just asked an AI agent to pull a report, check a database, or open a ticket. Before a single token is generated, Gantry has already built a disposable world for that run.

It materializes a fresh config directory at mode 0o700. It writes a settings.json at mode 0o600. It clears the skills directory so no stale skill from a previous run can leak forward. It computes two protected path sets, one for reads and one for writes, and those sets include skill files that belong to other engines, so the Claude runner cannot even peek at a Codex skill. Then it hands the runner exactly four credential keys and drops everything else.

That is the interesting part. Most agent frameworks spend their complexity budget on the model loop: graphs, roles, crews, tool schemas. Gantry spends it on the boundary around the model. It assumes the LLM call is the easy half and that the genuinely hard engineering is the paperwork: who the agent is, what it may touch, which credentials reach it, what gets written down, and how you revoke all of it.

Gantry is a self-hosted, provider-neutral runtime that treats agents as governed members of a team. You give an agent a seat in Slack, Teams, Telegram, or Discord. You grant it scoped capabilities. You watch the audit trail. And when you want it gone, you revoke it in one command. The bet is simple: governance is a runtime property, not a prompt.

From a Personal Assistant to an Employee Handbook

Gantry did not start as infrastructure. It started as a personal assistant. Ravi Kiran, VP Engineering at KnackLabs, describes building an assistant called Myclaw and watching it outgrow its original shape the moment other people needed to rely on it.

A personal assistant that has to run safely, and grow to serve a whole team, stops being a personal assistant. It becomes infrastructure.

Ravi Kiran, VP Engineering at KnackLabs · Ravi Kiran on LinkedIn

That sentence is the project's origin story in one line. A personal assistant only has to be useful. An employee has to be governable. The moment you hand an agent a seat on a team, you inherit the same obligations you have for a human teammate: identity, access, accountability, and a way to take it all back.

The README makes the same move, more bluntly. It frames the project as the runtime boundary between four things: human channels, application events and schedules, approved tools, and Postgres-backed state. And it states its ambition in a single line.

Onboard AI employees like real ones.

Gantry, Project README · knacklabs/gantry README

It is a metaphor that could have stayed a metaphor. Instead, the codebase follows it all the way down. Provisioning a seat, granting access, logging actions, revoking in one command: the README lists these as features because the metaphor demanded them.

The Adapter That Never Spawns Anything

The most elegant idea in the repo is not a feature. It is a constraint the authors imposed on themselves: the execution adapter is not allowed to launch anything.

In the Claude adapter, AnthropicClaudeAgentExecutionAdapter.prepare() returns a declarative plan. That plan describes the runner path, the runner arguments, the child environment, a patch to the runner input, and the sandbox policy. It does not fork a process. A generic launcher elsewhere in the codebase reads the plan and executes it. The adapter's only job is to decide what should happen, never to make it happen.

A top-down editorial illustration of a draftsman's table. One pair of hands draws a precise blueprint of a small machine, including a labeled rectangle, a runner path, four key-shaped sockets, and a sandbox outline. Across the room, separated by a clear vertical line, a completely different pair of hands builds the machine exactly to the blueprint. The drafting hands never touch the machine; the blueprint is the only thing that crosses the line. The scene illustrates the adapter pattern in Gantry, where prepare() produces a declarative plan and a separate generic launcher does the spawning.
The drafting hands never touch the machine. prepare() produces the plan; a separate launcher builds it. That separation is why the provider can be swapped without touching process spawning.

This is why the Claude Agent SDK is described as one adapter among several rather than as the runtime itself. It is also why the whole thing can be provider-neutral. Adapters are pure preparation steps, testable in isolation, with no side effects to mock. Process spawning lives in exactly one place, so there is exactly one place to audit it.

The receipts are in the details. Before the plan is returned, prepare() locates and verifies the runner file, throwing a reinstall-oriented error if it is missing. It computes the runner path relative to the package root and rejects any relative path that starts with .. or is absolute, which closes off a path-escape class of bug. And it projects credentials narrowly: a helper copies only four keys (ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, ANTHROPIC_API_KEY, NODE_EXTRA_CA_CERTS) from the input environment. Nothing else reaches the runner. The agent does not inherit your shell.

One Run, Start to Finish

Zoom out from the adapter and you can watch a single governed run move through the whole system. Ingress arrives from a channel, a schedule, or an SDK call. The runtime routes it to an agent identity. The adapter prepares a plan. The materializer builds a fresh config directory. Credentials are projected. The sandboxed subprocess launches. Capability is enforced. The run executes. Audit writes are committed and, if they fail, retried.

One run, eight stages. The two channels at the Enforce stage and the retry behavior at Audit are the parts you will not find in a typical agent framework.

Two beats in that sequence are genuinely novel. The first is the two-channel capability split. When skill action permissions are serialized, they travel twice: once as an environment variable (GANTRY_SKILL_ACTIONS_JSON) that the runner can read and self-report against, and once inside the host's policy patch as semantic capabilities. The duplication is deliberate. The runner knows what it may do, and the host independently enforces it. A compromised or confused runner cannot simply assert new permissions, because the host is not reading the runner's word for it.

The second is audit as a correctness constraint rather than a side effect. Audit writes are retried and fallback-scoped, so usage and cost records are not silently lost when a write fails. In most systems, the audit log is best-effort telemetry. In Gantry, it is closer to a ledger entry: a row that has to exist.

Where Gantry Sits

These projects are not competitors in a single race. They occupy layers. You can build an agent with CrewAI or AutoGen and still need a boundary like Gantry to run it for a team. The clearest evidence is that Capcom, an agent-fleet operations control plane, says it connects to Gantry and LangGraph. They are complements, not substitutes.

ProjectPrimary jobGovernance modelDurable stateChannel-native
GantryOperational runtime and governance boundaryCapability grants, approvals, credential brokering, auditPostgres for settings, credentials, memory, jobs, auditYes (Slack, Teams, Telegram, Discord, SDK)
LangGraphGraph-based agent workflow authoringFramework-level tool definitions and checkpointsCheckpointer backendsNo
CrewAIRole and crew orchestration in PythonFramework-level roles and tasksApplication-managedNo
Microsoft AutoGenConversational multi-agent compositionFramework-level agent configurationApplication-managedNo
DifyVisual LLM app and workflow builderPlatform-level app permissionsPlatform databaseWeb UI
OpenHandsSoftware-engineering agent platformExecution-environment sandboxingTask-scopedNo

Two adjacent tools are worth naming even though they are not in the table. LangSmith is observability and evaluation, which is a different job from permission enforcement and credential brokering. And OpenClaw, the personal-assistant project that Kiran cites as his precursor, is a narrative ancestor: the sources do not establish shared code, only a shared trajectory.

The Honest Read

Gantry is very young. The repository snapshot shows a small star count, dozens of open issues, and an MIT license, and the README says the project is still being prepared as an open source release and is not yet published to npm. If you are choosing a runtime today, that maturity gap is real and you should price it in.

The counterweight is that the commit history is much deeper than the repository age suggests, and the internal discipline is unusual for a project this new. The .factory/ directory holds roughly ninety fix records and a set of named stories, each with its own task files. More striking, apps/core/AGENTS.md maps user-visible behaviors to the exact tests that pin them, and it documents accepted residual risks rather than pretending they do not exist. That is the kind of bookkeeping most projects skip until they have paying customers.

The trade-off is portability. Gantry's opinionated stack (Node 24, Postgres, pg-boss, channel adapters, its own control API) buys real governance at the cost of fitting neatly into every environment. You are adopting a boundary, not a library. For a team that has already decided agents need seats, credentials, and a paper trail, that is the point.