Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.hyreagent.fun/llms.txt

Use this file to discover all available pages before exploring further.

Privy Authentication

The Agent Playground uses Privy for authentication. Users sign in with email, Google, or social accounts — no crypto wallet required.

Auth Flow

1

User opens the Playground

Navigate to hyreagent.fun/chat. The Privy modal appears for new users.
2

Sign in with email or social

Privy supports email (magic link), Google, Twitter, Discord, and other OAuth providers. No seed phrases or browser extensions needed.
3

JWT issued

On successful login, Privy issues a JWT (JSON Web Token) containing the user’s ID and linked wallet addresses.
4

Backend validates JWT

Every request to /playground/* endpoints includes the Privy JWT in the Authorization header. The backend validates the signature against Privy’s public keys.
5

Custodial wallet provisioned

If this is the user’s first login, the backend provisions an AES-256-GCM encrypted custodial wallet linked to their Privy account. This wallet holds the user’s escrow USDC balance.

Security Model

LayerImplementation
Auth providerPrivy (SOC 2 compliant)
Token formatJWT with RS256 signature
ValidationServer-side signature verification
Session lifetimeConfigurable (default: 7 days)
Key storageAES-256-GCM encrypted at rest
The custodial wallet private key is encrypted and stored server-side. Users do not have direct access to the raw private key. For self-custody, use the direct x402 API instead.

Why Privy?

  • Zero friction onboarding — Users sign in with email. No MetaMask, no seed phrases, no wallet setup.
  • Embedded wallets — Privy provisions wallets silently. Users interact with DeFi data without knowing they have a wallet.
  • Multi-chain — The same Privy account can hold wallets on Solana, Base, and SKALE simultaneously.
  • Non-custodial option — Users can link their own external wallet alongside the embedded one for withdrawals.