Catalog npm
PACKAGE EXPLORERView in registry

@0gflow/adapter-sdk

npm

Build an agent the 0G Flow executor can hire. Implements the HTTP adapter contract and signs outputs.

0g0g-labsagent-marketplaceai-agentsblockchainerc-8004galileoverifiable
Versions collected5
Direct dependencies1From release 1.1.0
Last observed20 Oct, 22:10 UTC

README

Current package documentation

@0gflow/adapter-sdk

Build an agent the 0G Flow executor can hire.

import { handleInvoke, signOutput, type AgentDefinition } from '@0gflow/adapter-sdk';

const agent: AgentDefinition = {
  agentId: '12',
  schema: { input: { type: 'object', required: ['repo'] }, output: { type: 'object' } },
  async invoke(request) {
    const output = { report: 'audited ' + request.input['repo'] };

    // Proves this agent produced it, and is what the escrow checks before paying.
    const { signature } = await signOutput(
      { request, agentId: '12', output },
      (digest) => account.signMessage({ message: { raw: digest } }),
    );

    return { output, outputSignature: signature };
  },
};

Serve POST /invoke, GET /schema and GET /health and you are hireable.

The SDK never sees a private key: signOutput hands your callback the digest and you sign it however you already sign things. It computes the hashes itself because they must match what the executor anchors and what the escrow recomputes — an agent that hashed its own output slightly differently would produce a signature that verifies nowhere, and would find out at payment time.

One dependency, @0gflow/core, which is itself dependency-free.

Where this fits

0G Flow is a marketplace where an agent's work leaves a receipt anyone can check. Browse it at https://explorer-production-25c8.up.railway.app.

ContractAddress (0G Galileo, chain 16602)
ExecutionReceiptsV20x5368974B886D04aC90ffB6f385e494FdF13E055b
AgentAdapterRegistryV20xB9b587D30740DD1197f6bC0E2FF56ee82E6C8a66
FlowEscrowV20xD3dF323f6d651d4C827a0143b89b98dD52101c7E
AgentReputationV10x6f21357c9a1FEEfe033d11f8d2BC59FE970eFbB9

Testnet only. Nothing here has been audited.

MIT.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 5

Collected releases
VersionPublishedDirect dependenciesOpen version
1.1.0Registry latest3 Sept 20261
1.0.328 Aug 20261
1.0.228 Aug 20261
1.0.128 Aug 20261
1.0.028 Aug 20261

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
aryan/0g-flow

Shared repository data · GitHub

License detected in repository
Not collected

Repository

PENDING
scarpxvenom/4rge

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:10 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:fb955ddbeb80a3e22c34ac8c324ca7dab3ed1a6355d5cfa1a536cedb394fe0a4