Skip to main content
This walkthrough uses test:fixture-execute, a generic, credential-free capability built for local testing, evaluated against a policy named vendor-payment. That policy name is unrelated to any connector, it’s just the example policy this transaction runs against. See Quickstart for the same flow driven from the repository directly rather than an installed package; this page installs @parmana/sdk as a real dependency the way you would in your own project.
Want a server to call first? Run one locally with the Quickstart, then point the SDK at it: new ParmanaClient({ endpoint: "http://localhost:3000", apiKey: "<your-api-key>" }).

Prerequisites

  • Node.js installed (node --version)
  • A running Parmana Runtime to talk to: either your own deployment, or the local in-memory server this walkthrough starts from a clone of this repository
1

Start a local Runtime

From a clone of this repository:
Generate the local signing keys. keys/ is gitignored, so a fresh clone has none: the server signs with default, and the Execution Gateway signs its own attestations with gateway:
No AI agent action is authorized without a signed human approval, reads included (Human approval), so you also play the approver. Make an approver key:
Start the server fully locally, no external database, trusting that key (honored only with NODE_ENV=test):
Confirm it’s up:
With NODE_ENV=test, a generic, credential-free test connector (test-fixture) registers automatically, no connector credentials required for this walkthrough. Every other route, including /version, fails closed with a 401 until you send the demo bearer key in PARMANA_API_KEYS above, raw key my-secret-api-key. It is for local development only: it may use test:fixture-execute and act as demo, and its raw key is public:
See Deploy patterns for running against something other than the in-memory local server.
2

Install the SDK

In a separate project (or a new terminal, same repo):
Real, published package. npm view @parmana/sdk version confirms the current version directly from npm.
3

Sign an approval, then build and execute a Business Transaction

Create quickstart.ts. The approver signs first (on the approver’s machine in real use), then the agent sends the transaction with the approval attached:
Run it:
4

Real output

createBusinessTransaction() call this page documents (see typescript/examples/06-create-business-transaction.ts in this repository for the exact source, and typescript/test/integration/examples.integration.test.ts for the test that proves it stays runnable):
The full ExecutionTrustRecord also includes executions[0].decision (outcome: "APPROVED"), executions[0].evidence (what the connector actually did), and the signature block covered in Verify independently. Field names are camelCase here; the same record from the Python SDK uses snake_case for the same fields (see Python SDK Quickstart).

Troubleshooting

NetworkError: connect ECONNREFUSED: the Runtime isn’t running, or you’re pointed at the wrong endpoint. Confirm step 1’s curl http://localhost:3000/health succeeds first. AuthenticationError on every call: either you omitted apiKey against a server that doesn’t have PARMANA_AUTH_DISABLED=true set, or the key is wrong. The demo key above, my-secret-api-key, only works against a server started exactly as shown in step 1, with its PARMANA_API_KEYS entry. ExecutionRejectedError: Execution rejected:...: the policy evaluated your signals and declined. The message names which rule failed; check Write your first policy for how vendor-payment@2.1.0 reads its signals. A message naming humanApproved means the approval is missing, expired, already used, for another target, below the amount, or from a key the server does not trust: sign a fresh one. A 400 about a mismatched id: you built the BusinessTransaction object by hand instead of through createBusinessTransaction(). See createBusinessTransaction(), no more hand-synced ids for exactly which three id pairs the server cross-checks.

Next

TypeScript SDK Overview

The concepts behind what you just ran: transactions, decisions, proofs.

TypeScript SDK for AI Agents

Wire this exact call into LangChain.js, the Vercel AI SDK, or a server endpoint.

End-to-end: agent → Parmana → Paytm

The same flow against a real connector and real infrastructure, not the local test fixture.

Verify independently

Read back or re-verify the ExecutionTrustRecord you just created.

TypeScript SDK reference

The full error taxonomy, model types, and test suite.