{"slug": "show-hn-agentkit-sandboxing-ai-agents-with-linux-namespaces", "title": "Show HN: AgentKit – Sandboxing AI agents with Linux namespaces", "summary": "Zivora Logic Ventures released AgentKit v1.0.0, a standalone CLI and JavaScript SDK (npm package zivora-agentkit@1.0.0, binary `zai`) for building, testing and securing AI agents from the terminal, with sandboxed offline execution requiring Linux user namespaces and util-linux. AgentKit defines permitted tools, environments, tenants and approval requirements in YAML or JSON, checks model-proposed actions against host policy, and connects tools to application code, HTTP services, OpenAPI operations or MCP servers, alongside commands for evals, tracing, SBOM generation and project rollback. The release requires Node.js 22 or 24 and works with OpenAI-compatible chat endpoints, including self-hosted inference servers, configured via AGENTKIT_MODEL_ENDPOINT, AGENTKIT_MODEL_NAME and AGENTKIT_MODEL_API_KEY.", "body_md": "Build, test, secure and manage AI applications from your terminal. AgentKit is a standalone CLI and JavaScript SDK for connecting models to tools, controlling what agents can do, evaluating their behaviour and managing projects as they change.\n\n**Version 1.0.0** · [Releases](https://github.com/Zivora-Logic-Ventures/agentkit-cli/releases) · [npm package](https://www.npmjs.com/package/zivora-agentkit) · [Documentation](https://github.com/Zivora-Logic-Ventures/agentkit-cli/tree/main/docs)\n\n- Node.js 22 or 24 and npm.\n- A compatible model endpoint for live inference. The offline demonstration needs no API key or GPU.\n- Linux with user namespaces and util-linux for isolated offline execution.\n\nThe versioned npm installation command for the v1.0.0 release is:\n\n```\nnpm install --global zivora-agentkit@1.0.0\nzai --version\n```\n\nFor a source build:\n\n```\ngit clone --branch main https://github.com/Zivora-Logic-Ventures/agentkit-cli.git\ncd agentkit-cli\nnpm ci --ignore-scripts\nnpm link\nzai --version\n```\n\nWith the published package installed:\n\n```\nzai new my-agent\ncd my-agent\nnpm install --ignore-scripts\nnpm start\n```\n\nYour project includes an `agentkit.yaml` configuration file, an `agent.mjs` entry point and a record of managed files. Edit your agent's code to add application logic. AgentKit tracks managed files separately so that changes can be reviewed before they are applied.\n\nFor an offline source demonstration, run `npm run demo` from the repository.\n\nFor a PostgreSQL-backed application, use `zai new my-app --app`. The generated project includes a loopback HTTP API, authenticated job submission, database-backed queue, worker, local migration command and typed client. Follow the generated `APPLICATION.md` to configure database roles and a model.\n\n| Purpose | Commands | \n|---|---|\n| Create and extend | `new` ,`add` | \n| Develop and run | `dev` ,`run` ,`doctor` | \n| Test behaviour | `eval` ,`guard` ,`trace` | \n| Inspect and secure | `audit` ,`sbom` ,`graph` | \n| Manage project changes | `plan` ,`diff` ,`up` ,`apply` ,`fix` ,`rollback` | \n| Verify release evidence | `check` ,`status` ,`ship` | \n\nRun `zai --help` for available options and `zai --version` for the installed version. See the [command guide](https://github.com/Zivora-Logic-Ventures/agentkit-cli/blob/main/docs/CLI.md) for examples.\n\nAgentKit works with OpenAI-compatible chat endpoints, including self-hosted inference servers. Configure your model through:\n\n- `AGENTKIT_MODEL_ENDPOINT` — the endpoint URL.\n- `AGENTKIT_MODEL_NAME` — the model identifier.\n- `AGENTKIT_MODEL_API_KEY` — the provider credential, when required.\n\nDiscover available models through the SDK, set request deadlines and enable limited rate-limit retries when needed. Token and estimated cost checks use the provider's reported usage; they cannot reverse an already billed request. Keep credentials in your environment, not in source code. The included starter uses an offline demonstration when no endpoint is configured. The [invoice application](https://github.com/Zivora-Logic-Ventures/agentkit-cli/blob/main/examples/invoice-app.mjs) shows how a model can look up real database records through AgentKit's tool broker.\n\nDefine permitted tools, environments, tenants and approval requirements in YAML or JSON.\n\n```\nversion: 1\nproject: my-agent\ntools:\n  - id: echo\n    environments: [test]\n    tenants: [local]\n    approval: none\n```\n\nModels propose actions; AgentKit checks those actions against the host's policy. Tools can connect to application code, HTTP services, selected OpenAPI operations or supported MCP servers. Organization policies, signed identities and approval checks help keep access scoped to the correct application and tenant.\n\nThe SDK provides encrypted secret envelopes and key rotation. The SDK can exchange verified OIDC ID tokens for scoped identities and use a PostgreSQL-backed single-use approval store. Your application host manages sign-in, trusted issuer keys, account mapping, database connections and credentials.\n\n```\nzai doctor\nzai plan\nzai dev --plan\nzai dev --trusted-local\n```\n\nUse trusted local mode for your own code. On supported Linux hosts, `zai dev --sandbox` runs an offline agent in an isolated filesystem and network environment without silently falling back to unrestricted execution.\n\nEvaluate repeated scenarios, versioned datasets and separate holdout cases with `zai eval`, check policy cases with `zai guard` and execute controlled adversarial scenarios with `zai guard --redteam` and inspect saved run metadata with `zai trace`. The SDK records latency, token usage and scenario-level regressions. Signed run evidence connects the redacted execution graph to the source, dependencies, tools, model, policy and evaluation corpus. Export verified records to an OpenTelemetry HTTP log collector.\n\n```\nzai add tool math.sum --plan\nzai add tool math.sum\nzai diff --project .\nzai rollback --project .\n```\n\nAgentKit produces repeatable plans, records managed changes and supports recovery from interrupted operations. Use `up` and `apply` to change the SDK version. For projects with an npm lockfile, use `--resolve-lockfile` to produce a plan containing the exact npm-resolved lockfile, or supply your own resolved file. Use `fix --project . --plan` to restore missing managed files without replacing user code.\n\n```\nzai audit\nzai audit --online\nzai audit --deep\nzai sbom\n```\n\nThe audit reports JavaScript AST and source findings, license and registry integrity declarations, dependency advisory results and incomplete checks. Deep mode includes bounded Git history analysis. The online mode queries OSV with exact npm package names and versions. The SBOM command describes the components and relationships in an npm lockfile, in CycloneDX 1.6 or SPDX 2.3 format.\n\nUse `ship`, `check` or `status` with signed evidence to verify the exact release artifact. These commands verify evidence; deployment is handled by your application infrastructure.\n\n``` js\nimport {\n  createBroker,\n  createChatProvider,\n  runAgent\n} from 'zivora-agentkit';\n```\n\nThe [examples](https://github.com/Zivora-Logic-Ventures/agentkit-cli/tree/main/examples) show how to register tools, run an agent and protect sensitive operations with approvals. AgentKit does not require another Zivora product.\n\nMeasured development workloads on Linux:\n\n| Workload | p95 | \n|---|---|\n| 10,000 dependency nodes | 13.19 ms | \n| 10,000 policy decisions | 53.27 ms | \n| 10,000 guard cases | 67.40 ms | \n| 1,000-file source scan | 177.86 ms | \n| 10,000-component SBOM | 86.92 ms | \n| Capability plan, apply and rollback | 27.10 ms | \n\nReal CPU qualification using llama.cpp and Qwen2.5-1.5B-Instruct passed 10 structured inference trials and 10 database-agent trials. The measured p95 was 1.13 seconds for inference and 3.99 seconds for the database agent in the first successful run.\n\nSee the [benchmark report](https://github.com/Zivora-Logic-Ventures/agentkit-cli/blob/main/docs/BENCHMARKS.md) for hardware, raw results and later measurements. Results identify the tested source and are not a claim about every model or workload.\n\nPostgreSQL qualification also exercised 16 concurrent jobs and 32 concurrent approval claims without duplicate execution or replay. See the [benchmark report](https://github.com/Zivora-Logic-Ventures/agentkit-cli/blob/main/docs/BENCHMARKS.md).\n\nSee [architecture, supported environments and trust boundaries](https://github.com/Zivora-Logic-Ventures/agentkit-cli/blob/main/docs/ARCHITECTURE.md), including the limits of broker isolation, provider cost estimates and dependency analysis.\n\n```\nnpm ci --ignore-scripts\nnpm run check\nnpm run pack:smoke\nnpm run demo\nnpm run benchmark\n```\n\nSee the [development guide](https://github.com/Zivora-Logic-Ventures/agentkit-cli/blob/main/docs/DEVELOPMENT.md) and [release procedure](https://github.com/Zivora-Logic-Ventures/agentkit-cli/blob/main/docs/RELEASE.md). The release workflow requires npm provenance and checks the published artifact against the tested package.\n\nAgentKit is an open-source project built and maintained by [Zivora Labs](https://www.zivoralabs.xyz).\n\n- Lead maintainer: [Williams Ashibuogwu](https://github.com/wbizmo)\n- License: [MIT](https://github.com/Zivora-Logic-Ventures/agentkit-cli/blob/main/LICENSE) , copyright 2026 Zivora Labs.\n- Dependencies: [Third-party notices](https://github.com/Zivora-Logic-Ventures/agentkit-cli/blob/main/THIRD_PARTY_NOTICES.md) .\n- Security: [Security policy](https://github.com/Zivora-Logic-Ventures/agentkit-cli/blob/main/SECURITY.md) and**[williams@zivoralabs.xyz](mailto:williams@zivoralabs.xyz)** .\n\nUse, modify and distribute AgentKit under the MIT license, including for commercial applications, while retaining the copyright and license notices. See [Contributing](https://github.com/Zivora-Logic-Ventures/agentkit-cli/blob/main/CONTRIBUTING.md), [Governance](https://github.com/Zivora-Logic-Ventures/agentkit-cli/blob/main/GOVERNANCE.md) and the [Code of conduct](https://github.com/Zivora-Logic-Ventures/agentkit-cli/blob/main/CODE_OF_CONDUCT.md).", "url": "https://wpnews.pro/news/show-hn-agentkit-sandboxing-ai-agents-with-linux-namespaces", "canonical_source": "https://github.com/Zivora-Logic-Ventures/agentkit-cli", "published_at": "2026-12-02 22:22:50+00:00", "updated_at": "2026-12-02 22:47:26.784550+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "ai-safety", "agent-protocols"], "entities": ["Zivora Logic Ventures", "AgentKit", "zivora-agentkit", "Node.js", "OpenAI", "MCP"], "also_reported_by": [], "takeaway": "AgentKit v1.0.0 lets builders declare permitted tools, environments, tenants and approval requirements in YAML or JSON so model-proposed actions are checked against host policy before execution, with sandboxed offline runs requiring Linux user namespaces and util-linux.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/show-hn-agentkit-sandboxing-ai-agents-with-linux-namespaces", "markdown": "https://wpnews.pro/news/show-hn-agentkit-sandboxing-ai-agents-with-linux-namespaces.md", "text": "https://wpnews.pro/news/show-hn-agentkit-sandboxing-ai-agents-with-linux-namespaces.txt", "jsonld": "https://wpnews.pro/news/show-hn-agentkit-sandboxing-ai-agents-with-linux-namespaces.jsonld"}}