One qualified seam between your application and its agents

Agentmixer is a provider-neutral foundation for applications that give an agent a small, explicit tool surface. Its first consumer is Textbutler. The package's public contract and provider qualification are still being developed; see the qualification limits below before relying on any provider adapter.

Free and MIT licensed. Bun 1.3.14 or newer, or Node 22.13 or newer. First AgentMixer release in preparation.

const profile = createCapabilityProfile({
  id: "notes", version: 1,
  tools: [{
    name: "notes.write",
    description: "Replace the bound workspace's note.",
    inputSchema: { /* bounded schema */ },
    parseInput(input) { /* trusted parser */ },
    execute(input, context) {
      context.assertActive();
      notes.set(context.workspaceId, input);
      return { stored: true };
    },
  }],
});
const broker = createCapabilityBroker({
  profile, workspaceId: "workspace-1", runId: "run-1",
  isActive: () => hostState.active,
});
await broker.invoke("notes.write", { text: "First note." });
A host-defined capability profile: one bounded tool, bound to one workspace and one run.From the README

Explicit contracts, derived nothing.

AgentMixer supplies the execution seam: routing, custody, and a closed tool surface. Everything the agent can touch is declared by the host and bounded before the run begins.

  1. Provider adapters

    Claude SDK, Claude API, and Codex adapters sit behind one runtime interface. An adapter stays disabled until the host proves the exact runtime, tool inventory, and confinement it claims.

  2. Account custody

    Provider accounts are opaque host bindings on shared SQLite leases with generation fencing. A failed or ambiguous call retains its lease; recovery needs independent proof the old process stopped.

  3. Tool broker

    One workspace and one run get a closed set of file, public-web, and messaging operations. There is no shell, executable, or arbitrary RPC operation for a model to reach for.

  4. Model selection

    Classifier output is strictly validated and models are selected from a fresh, host-observed catalog โ€” never from a stale index or a model's own claims.

  5. Capability profiles

    Applications define their own tools with createCapabilityProfile() and bind them per workspace and run. The host supplies every descriptor, parser, and handler.

  6. Public web port

    createPublicWeb() admits bounded HTTPS GETs only: address pinning, per-redirect validation, no ambient credentials, a 15-second deadline, and a 256 KiB text cap.

One seam, three surfaces.

The runtime, the broker, and the adapters share one qualification contract. There is no agent-only path behind the declared one.

Runtime API

Route one qualified agent run with an explicit request: route, account, profile, model, effort, and limits.

import { AgentMixer } from "@hraness/agentmixer";

const mixer = new AgentMixer({ adapters, catalog });
const result = await mixer.run(request, broker);

Capability broker

Define application-owned tools and bind them to one workspace and run, with host-supplied parsers and handlers.

const broker = createCapabilityBroker({
  profile, workspaceId, runId, isActive,
});
await broker.invoke("notes.write", input);
await broker.close();

Provider adapters

Claude SDK, Claude API, and Codex adapters behind explicit runtime qualification.

The first AgentMixer release is in preparation.

What AgentMixer will not do.

AgentMixer refuses to let model output become authority, and refuses to let a lease lapse become a takeover.

Small enough to qualify.

These rules are enforced by the runtime, the broker, and their tests โ€” not by convention.

Closed and bounded
Broker inputs are serialized, copied before queuing, and capped at 256 KiB with structural limits. Unknown tools are denied; model arguments cannot replace the bound workspace, credentials, or handlers.
Qualification, not convention
Admission requires the host to prove the exact runtime, effective tool inventory, configuration isolation, and read/write confinement. A prompt, a cwd, or an expired lease proves nothing.
The application owns the product
Enrollment, message policy, memory format, and dispatch authorization stay in the host. AgentMixer owns only the execution seam โ€” messaging ports stage proposed actions and never send.

Install the package.

First AgentMixer release in preparation

AgentMixer is being prepared for its first release. Check published releases or read the documentation.

Before you install.

What is AgentMixer?

A provider-neutral TypeScript package for applications that run coding agents. It supplies the adapter interface, account-lease custody, model selection, and a scoped tool broker; the application supplies workspaces, credentials, and authorization.

Which providers does it support?

Claude through the Agent SDK and a direct API adapter, and Codex through managed account, task, and session adapters. Every adapter must pass explicit runtime qualification before it can run โ€” an unqualified adapter stays disabled.

Who uses it today?

Textbutler, the macOS message-butler daemon, is the first consumer. Its contact-confined workspace and brokered messaging are built on these contracts.

What does the broker refuse to do?

There is no shell, no arbitrary process execution, no plugin loading, and no RPC escape hatch. Messaging ports stage recipient-bound proposals and return an intent ID; only the application's dispatch boundary can send.

How is it published?

Each release is an immutable GitHub Release with a packing receipt, checksums, and signed provenance. The same archive bytes are published to npm from the tag workflow through OIDC trusted publishing.

Who made it?

Ben Guo, a musician and builder, formerly a founder and engineering leader at companies including Venmo and Stripe, now building from Puerto Rico. AgentMixer is published by Hraness under the MIT license.

Built by Ben Guo

AgentMixer is built by Ben Guo, a musician and builder, formerly a founder and engineering leader at companies including Venmo and Stripe, now building from Puerto Rico. It is published by Hraness under the MIT license.

Give the agent only the tools the host declared.

Add the package, bind one capability profile, and qualify the exact runtime before anything runs.

Free and MIT licensed. Bun 1.3.14 or newer, or Node 22.13 or newer. First AgentMixer release in preparation.