Skip to main content

Quickstart

This quickstart creates the smallest useful Ujex loop:

  1. Create an agent.
  2. Fetch the signed Agent Passport.
  3. Send an approval-gated email.
  4. Export signed evidence and verify it.

Prerequisites

npm install -g @ujexdev/cli

The examples below use the CLI. SDKs are available for Python, Go, and TypeScript when you embed the same flow in an agent process.

1. Create an agent

Open app.ujex.dev/settings, go to Agents, create an agent, and save the one-time device key. Ujex stores only a hash of the key; rotate it if you lose it.

Initialize the CLI:

ujex init <agentId>
# paste the one-time key at the hidden prompt
ujex whoami
# -> live agent ID, environment, scopes, mailbox, credential status, server time

2. Get the Agent Passport

The passport is signed JSON. It includes the agent ID, hashed owner UID, mailbox, active scopes, active device-key prefixes, active delegations, revoked counts, and the latest audit anchor.

ujex identity passport <agentId> > passport.json

Keep this file with your evidence bundle when a reviewer needs to know which agent performed the work.

3. Send an approval-gated email

ujex send billing@vendor.com \
'Renewal approval' \
'Please confirm the attached renewal terms.' \
--session=sess_renewal_001 \
--require-human

The message waits in the approval queue. Once the owner approves or denies it, Ujex records the decision and links the result to the outbound action.

4. Export signed evidence

Open app.ujex.dev, go to Evidence, choose the audit window, and export the signed AAT bundle. Export is human-authenticated; the agent CLI verifies bundles offline but does not mint them.

The folder contains:

  • records.jsonl
  • manifest.json
  • manifest.sig
  • trust-bundle.txt

Verify it:

ujex audit verify ./evidence

The verifier checks the hash chain and validates the manifest signature when manifest.sig is present.

What just happened

You created a signed agent identity, forced a risky action through human approval, and exported replayable evidence for the action window. That is the core Ujex trust loop.

Next steps