Quickstart

Quickstart

Issue your first agent wallet and run a policy-controlled spend in under 5 minutes.

Runtime

Note
You need a Nomiqon API key. Request early access at nomiqon.com.

1 — Install

Nomiqon ships native SDKs for TypeScript/JavaScript and Python. Use the runtime selector above — all examples below update with your selection.

bashnomiqon.com
npm install @nomiqon/sdk

2 — Initialise the client

typescriptnomiqon.com
import { Nomiqon } from "@nomiqon/sdk";

const nomiqon = new Nomiqon({
  apiKey: process.env.NOMIQON_API_KEY!, // sk_live_...
  // Optional: override the base URL for self-hosted deployments
  // baseUrl: "https://api.your-host.com/v1",
});

3 — Create an agent

typescriptnomiqon.com
const agent = await nomiqon.agents.create({
  name: "research-agent-01",
  policy: {
    dailyCap:  "10.00",              // USDC per calendar day
    totalCap:  "200.00",             // lifetime ceiling
    allowlist: [
      "api.openai.com",
      "api.anthropic.com",
      "api.pinecone.io",
    ],
  },
});

// ag_01jx5k8r2z...
console.log("Agent ID:", agent.id);

// 6Tzt5NDqv8K3rBmPpzW7J...VovJn (Solana public key)
console.log("Wallet:", agent.wallet.address);

4 — Fund the wallet

Transfer USDC (SPL Token) to agent.wallet.address on Solana mainnet.

bashnomiqon.com
# Using the Solana CLI
spl-token transfer \
  --url mainnet-beta \
  EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v \   # USDC mint
  10 \
  <agent.wallet.address>

5 — Attach agent headers and call an API

typescriptnomiqon.com
const headers = await nomiqon.agents.getSpendHeaders(agent.id);
// {
//   "x-nomiqon-agent-id": "ag_01jx...",
//   "x-nomiqon-spend-token": "spt_eyJ...",   // short-lived JWT
// }

// Pass headers to any outbound fetch — Nomiqon intercepts the spend token
const chat = await fetch("https://api.openai.com/v1/chat/completions", {
  method: "POST",
  headers: {
    ...headers,
    Authorization: `Bearer ${process.env.OPENAI_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ model: "gpt-4o", messages: [{ role: "user", content: "Hello" }] }),
});
Tip
If a spend would breach a cap or hit a blocked domain, Nomiqon returns 402 policy_cap_exceeded or 403 policy_domain_blocked before the request ever leaves your network. Your agent code should handle these errors explicitly.

6 — View the transaction

typescriptnomiqon.com
const txns = await nomiqon.transactions.list({ agentId: agent.id, limit: 10 });
txns.data.forEach(t => {
  console.log(`${t.id}  ${t.amount} USDC → ${t.recipient}  [${t.status}]`);
});
Quickstart — Nomiqon Docs