← All packages
Connect · v0.1.0 · Apache-2.0

@flashyos/wdk

The agent object: identity, authority, wallet, memory and partners behind one interface

The FlashyOS agent object: identity, authority, wallet, memory and partners behind one interface. Create an agent, give it an identity, provision financial capabilities on Tether WDK, set its permissions, let it transact, record what it did, coordinate it with other agents — through one object, one event system, any chain WDK reaches.

npm install @flashyos/wdknpm ↗source ↗

Why it exists

Seven things an autonomous organization does with money — create an agent, give it an identity, provision financial capabilities, set its permissions, let it transact, record what it did, coordinate it with other agents — as one object with one event stream, rather than seven routes a developer wires by hand. The organization side and the agent side are two classes, and neither can do the other’s job.

What it refuses to do
No method on the agent can widen its own authority; no method on the organization moves money. Delegation is monotonic — an agent can hand down less than it holds, never more — and every verb emits exactly one event, so there is no silent path.

How it works

`FlashyOrganization` is what the humans do: create agents, set and revoke authority, register addresses, set settlement policies, resolve decisions, read the ledger, the metrics, the receivables and the receipts. `FlashyAgent` is what an agent does with its own token: delegate down, propose, transact, execute and complete a spend, record a memory, invoice and settle with a partner. The split is enforced by which credential each transport call carries — the session token on human routes, the agent’s token on agent routes, and no bearer at all on the signer, because the authorization is the credential.

There is one transport interface and two implementations. `HttpTransport` talks to the FlashyOS API and a signer over the network. `InProcessTransport`, inside the API, calls the services directly; the demos and the API’s own tests use it, and the object cannot tell them apart, which is how the four-agent week and the twenty-organization network demo run against the same code in a test as in a deployment.

Every verb emits exactly one JSON-serializable event on the organization’s stream — `agent.created`, `envelope.set`, `wallet.proposed`, `wallet.escalated`, `wallet.executed`, `wallet.refused` and the rest — so an audit trail is a subscription, not an afterthought. `flashyos-run agent.mjs` pre-wires the object from the environment so a whole agent is one exported function.

Related concepts
IntentMeshagentic autonomous organizationmachine-readable organizational trustAI agent trust register

Use it

Create, authorize, transact, record — through one object
import { FlashyOrganization, HttpTransport } from '@flashyos/wdk';

const org = new FlashyOrganization(new HttpTransport({ baseUrl, orgId, sessionToken, signerUrl }));
const agent = await org.agents.create('procurement', ['wallet:propose', 'wallet:read']);
await org.authority.set('procurement', { chain: 'evm:84532', kinds: ['transfer'], assets: [USDT], destinations: [VENDOR], perTxMax: '100000000', dailyMax: '500000000', autoApproveMax: '25000000' });
const result = await agent.wallet.transact('evm:84532', { to: USDT, data: transferCalldata(VENDOR, 12_000_000n) });
// { status: 'executed' | 'refused' | 'escalated' | 'denied' | 'unrecognised', ... }

Installing it puts this command on your path — read from the package’s own manifest, so this list cannot drift from what you actually get.

flashyos-run

In practice

Write a whole agent as one function
A developer exports one function that receives a pre-wired `FlashyAgent`, runs it with `flashyos-run`, and gets identity, an envelope-bounded wallet on a testnet, memory and partner settlement without touching a route. The object is the same one the demos use.
Run the organization from a script
An operator creates twenty organizations and three hundred agents through `FlashyOrganization`, sets envelopes, lets them invoice and settle with each other on Base Sepolia, and pins the closing frame in a test — the network demo in the repository is exactly this.

How it stays honest

Both demos — the four-agent week and the twenty-organization network — run through this object against the in-process transport, and their closing frames are pinned by test, so a change to any verb that alters what a week produces fails the build. The package publishes with wallet-wdk and the signer from one workflow, in dependency order, on a version bump.

.github/workflows/publish-wdk.ymlthe workflow that keeps this current — read it, it hides nothing

Questions

What is the difference between FlashyOrganization and FlashyAgent?
FlashyOrganization is the human side: it creates agents, sets and revokes authority, and reads the ledger. FlashyAgent is what an agent does with its own token: propose, transact, record, invoice, settle. Neither can do the other’s job, and the transport enforces it.
Does @flashyos/wdk talk to a chain directly?
No. It asks the authorization plane for a verdict and hands a signed authorization to a signer over one transport. The signer executes on a testnet through Tether WDK; the object itself never holds a key or a seed.
How do I see what an agent did?
Subscribe to the organization’s event stream. Every verb emits exactly one JSON-serializable event — created, envelope set, proposed, escalated, executed, refused, recorded, invoiced, settled — so the audit trail is the subscription, and the ledger and metrics are read from the same object.

The licence

Apache-2.0, read from the package’s own manifest. Embed it in anything, including closed software — that is what makes a spec adoptable and a verifier worth running. FlashyOS’s server side is AGPL-3.0-only instead, and a test in the monorepo asserts the direction between them: AGPL code may consume this, this may never consume AGPL code.

Keep reading

Agent identityAgent payments
Also in connect
@flashyos/agent@flashyos/mcp@flashyos/create-mesh-agent@flashyos/create-mesh-node@flashyos/page@flashyos/eslint-config@flashyos/llm-gateway@flashyos/wallet-wdk@flashyos/signer