AbsoluteJS

Agent

@absolutejs/agentv0.25.0betaAI

The production-grade, provider-neutral agent stack for AbsoluteJS: auth, actions, runtime, sandboxing, trust, memory, inbox, discovery, MCP, A2A, policy, wallet limits, controls, and conformance.

#Installation

BASH
bun add @absolutejs/agent

#Runnable governed action

Runnable

Exercise one exact action through the facade-owned Agency subpath with memory storage and no credentials. allowAllPolicy is appropriate only for this local proof.

bun add @absolutejs/agent
TS
import {
  allowAllPolicy,
  createAgency,
  createMemoryAgencyStore
} from '@absolutejs/agent/actions';

const agency = createAgency({
  policy: allowAllPolicy(),
  store: createMemoryAgencyStore()
});

const { action, decision } = await agency.request({
  action: 'write_fixture',
  actor: { agentId: 'local-agent', scopes: ['fixture:write'], userId: 'user-1' },
  effects: ['write'],
  input: { value: 42 },
  resource: { id: 'fixture-1', type: 'fixture' }
});

if (decision.kind !== 'allow') throw new Error('expected local allow');
const lease = await agency.issueLease(action.actionId);
const executed = await agency.execute({
  executor: 'local-fixture',
  leaseId: lease.leaseId,
  run: async () => ({ stored: true, value: 42 })
});

console.log(executed.receipt.status);
Proof of success
The script prints the successful receipt status. Reusing the single-use lease fails instead of repeating the effect.

#Capabilities

Overview

The production-grade, provider-neutral agent stack for AbsoluteJS.

This is the cohesive entry point, not another agent runtime. Each engine remains independently installable and replaceable; this package provides one documented golden path, typed subpath exports, production-readiness checks, and an AbsoluteJS manifest that lets coding agents discover the whole stack.

The facade is the single Agency runtime owner. A2A, MCP, Agent Control, Wallet, and other extensions declare Agency as a required peer, externalize it from their builds, and test a conservative compatibility window. The facade installs the matching real Agency dependency, so one application cannot silently create parallel action types or ledgers.

Stable subpaths

@absolutejs/agent/auth — native auth.md registration, ID-JAG, scoped delegation

@absolutejs/agent/actions — terminal approvals/rejections, leases, receipts,

kill switches, handoffs

Show 10 more

@absolutejs/agent/runtime — durable runs, checkpoints, budgets, effects

@absolutejs/agent/sandbox — deny-by-default HTTP, filesystem, and process grants

@absolutejs/agent/trust — provenance, taint propagation, safe context and sinks

@absolutejs/agent/memory — scoped, authorized, erasable durable memory

@absolutejs/agent/inbox — verified webhooks, schedules, retries, dead letters

@absolutejs/agent/discovery — signed well-known documents, cards, text, sitemaps, registry

@absolutejs/agent/execution — certified tenant adapter installations, transactional outbox, retries, signed provider evidence ingestion, reconciliation, compensation

@absolutejs/agent/mcp, /a2a, /arazzo, and /webmcp — open interoperability, workflow, and browser transports

@absolutejs/agent/policy — versioned policy and AuthZEN adapters

@absolutejs/agent/wallet — reservations, idempotent settlement, spending policy

One authenticated delegation

createAuthAgencyDelegationAuthority() bridges the delegation already verified by Absolute Auth directly into Agency. Put an authAgencyAuthorizationDetail() in the Auth grant to bind its audience, canonical actions, effects, resource types, and optional resource IDs. Agency then re-reads that same grant before an action request, lease, and execution; there is no second grant ID or shadow state to synchronize.

Outcomes

What you can build

A cohesive agent stack

Assemble independently replaceable agent engines behind one typed facade with stable subpaths and an AbsoluteJS manifest.

Open interoperability

Use standard MCP, A2A, OAuth, auth.md, AuthZEN, Arazzo, and WebMCP surfaces without introducing an Absolute-only wire protocol.

Hardening checklist

Production guidance

One governed runtimeKeep one Agency runtime owner and one compatible action contract. Configure every production-readiness capability explicitly and fail deployment when a required concern is absent.

Follow in order

Troubleshooting path

1
A stack is incomplete
Run assertProductionReady() against the assembled stack. It identifies missing durability, authorization, sandbox, trust, memory, inbox, execution, policy, wallet, and control-plane concerns before traffic arrives.

#@absolutejs/agent quick start

Partial snippet

# @absolutejs/agent

TS
import { assertProductionReady, defineAgentStack } from "@absolutejs/agent";
import { createAgentRuntime } from "@absolutejs/agent/runtime";
import { createAgency } from "@absolutejs/agent/actions";

const stack = defineAgentStack([
  { capability: "durability", instance: runtime, name: "runtime" },
  { capability: "authorization", instance: agency, name: "actions" },
] as const);

await assertProductionReady(stack); // fails until every production concern is wired

#Public entry points

Supported entry points declared by this project’s package manifest. Internal dist paths are not part of the package contract.

Public package entry point declared in package.json.

@absolutejs/agent@absolutejs/agent/a2a@absolutejs/agent/actions@absolutejs/agent/auth@absolutejs/agent/arazzo@absolutejs/agent/conformance@absolutejs/agent/commerce@absolutejs/agent/control@absolutejs/agent/discovery@absolutejs/agent/execution@absolutejs/agent/inbox@absolutejs/agent/mcp@absolutejs/agent/memory@absolutejs/agent/policy@absolutejs/agent/runtime@absolutejs/agent/sandbox@absolutejs/agent/trust@absolutejs/agent/wallet@absolutejs/agent/webmcp@absolutejs/agent/manifest@absolutejs/agent/manifest.json@absolutejs/agent/migrations

#Package commands

Scripts declared by this project’s package manifest.

bun run buildrm -rf dist && bun build src/*.ts --outdir dist --root src --target=bun --sourcemap --external '@absolutejs/*' --external '@absolutejs/execution' --external '@sinclair/typebox' --external drizzle-orm --external 'drizzle-orm/*' && tsc -p tsconfig.build.json && absolute-manifest emit
bun run check:packagebun run typecheck && bun run test && bun run verify-package && bun run build && bun run verify-package --artifacts
bun run formatprettier --write "./**/*.{ts,json,md,yml}"
bun run testbun test
bun run typechecktsc --noEmit

#API reference

Search the declarations exported by the current package type files. Expand a symbol to inspect its source-backed signature.

8 symbols
AGENT_STACK_PACKAGESvaluePermalink
TS
const AGENT_STACK_PACKAGES: {
    readonly a2a: "@absolutejs/a2a";
    readonly actions: "@absolutejs/agency";
    readonly auth: "@absolutejs/auth";
    readonly conformance: "@absolutejs/agent-conformance";
    readonly commerce: "@absolutejs/agent/commerce";
    readonly control: "@absolutejs/agent-control";
    readonly discovery: "@absolutejs/agent-discovery";
    readonly execution: "@absolutejs/execution";
    readonly inbox: "@absolutejs/agent-inbox";
    readonly mcp: "@absolutejs/mcp";
    readonly memory: "@absolutejs/agent-memory";
    readonly policy: "@absolutejs/policy";
    readonly runtime: "@absolutejs/agent-runtime";
    readonly sandbox: "@absolutejs/agent-sandbox";
    readonly trust: "@absolutejs/agent-trust";
    readonly wallet: "@absolutejs/wallet";
};
Exported from @absolutejs/agent
Use this API in an outcome:Govern an AI agent

Continue toward an outcome

These playbooks show where this package fits, how to verify the combined system, and what changes before production.