AIFeed

Show HN: AgentKit – Sandboxing AI agents with Linux namespaces

Original text(via HN AI)

AgentKit CLI

GitHub release
GitHub release

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.

Version 1.0.0 · Releases · npm package · Documentation

Requirements

  • Node.js 22 or 24 and npm.
  • A compatible model endpoint for live inference. The offline demonstration needs no API key or GPU.
  • Linux with user namespaces and util-linux for isolated offline execution.

Install

The versioned npm installation command for the v1.0.0 release is:


        npm install --global [email protected]
zai --version
      

For a source build:


        git clone --branch main https://github.com/Zivora-Logic-Ventures/agentkit-cli.git
cd agentkit-cli
npm ci --ignore-scripts
npm link
zai --version
      

Quick start

With the published package installed:


        zai new my-agent
cd my-agent
npm install --ignore-scripts
npm start
      

Your 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.

For an offline source demonstration, run npm run demo from the repository.

For 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.

Command reference

PurposeCommands
Create and extendnew , add
Develop and rundev , run , doctor
Test behavioureval , guard , trace
Inspect and secureaudit , sbom , graph
Manage project changesplan , diff , up , apply , fix , rollback
Verify release evidencecheck , status , ship

Run zai --help for available options and zai --version for the installed version. See the command guide for examples.

Connect a model

AgentKit works with OpenAI-compatible chat endpoints, including self-hosted inference servers. Configure your model through:

  • AGENTKIT_MODEL_ENDPOINT — the endpoint URL.
  • AGENTKIT_MODEL_NAME — the model identifier.
  • AGENTKIT_MODEL_API_KEY — the provider credential, when required.

Discover 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 shows how a model can look up real database records through AgentKit's tool broker.

Control what agents can do

Define permitted tools, environments, tenants and approval requirements in YAML or JSON.


        version: 1
project: my-agent
tools:
  - id: echo
    environments: [test]
    tenants: [local]
    approval: none
      

Models 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.

The 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.

Develop and evaluate


        zai doctor
zai plan
zai dev --plan
zai dev --trusted-local
      

Use 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.

Evaluate 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.

Manage project changes


        zai add tool math.sum --plan
zai add tool math.sum
zai diff --project .
zai rollback --project .
      

AgentKit 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.

Review security and release evidence


        zai audit
zai audit --online
zai audit --deep
zai sbom
      

The 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.

Use ship, check or status with signed evidence to verify the exact release artifact. These commands verify evidence; deployment is handled by your application infrastructure.

SDK


        import {
  createBroker,
  createChatProvider,
  runAgent
} from 'zivora-agentkit';
      

The examples show how to register tools, run an agent and protect sensitive operations with approvals. AgentKit does not require another Zivora product.

Benchmarks

Measured development workloads on Linux:

Workloadp95
10,000 dependency nodes13.19 ms
10,000 policy decisions53.27 ms
10,000 guard cases67.40 ms
1,000-file source scan177.86 ms
10,000-component SBOM86.92 ms
Capability plan, apply and rollback27.10 ms

Real 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.

See the benchmark report for hardware, raw results and later measurements. Results identify the tested source and are not a claim about every model or workload.

PostgreSQL qualification also exercised 16 concurrent jobs and 32 concurrent approval claims without duplicate execution or replay. See the benchmark report.

Architecture and compatibility

See architecture, supported environments and trust boundaries, including the limits of broker isolation, provider cost estimates and dependency analysis.

Development


        npm ci --ignore-scripts
npm run check
npm run pack:smoke
npm run demo
npm run benchmark
      

See the development guide and release procedure. The release workflow requires npm provenance and checks the published artifact against the tested package.

Maintainers and licensing

AgentKit is an open-source project built and maintained by Zivora Labs.

  • Lead maintainer: Williams Ashibuogwu
  • License: MIT, copyright 2026 Zivora Labs.
  • Dependencies: Third-party notices.

Use, modify and distribute AgentKit under the MIT license, including for commercial applications, while retaining the copyright and license notices. See Contributing, Governance and the Code of conduct.

The text above was extracted automatically from the source page and may miss images, tables or code blocks. The original is authoritative.

Published by HN AI
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗