Getting Started
Gao Internet is an 8-layer protocol stack for the decentralized internet. This guide gets you from zero to a working dApp in under 30 minutes.
What You Can Build
App Type
Layers Used
Example
AI agent app
Intelligence (L8)
Booking assistant, support bot
Payment app
Settlement (L4)
Checkout, invoice, payroll
Messaging app
Transport (L6)
Chat, notifications, alerts
Identity app
Identity (L5)
Domain login, profile, verification
Storage app
DePIN (L7)
Encrypted file vault, backup
Automation
Intelligence + Transport
Scheduled reports, reminders
Full dApp
All 8 layers
Seal Agent, Payii, Meshii
Prerequisites
-
Node.js 20+ and pnpm
-
A Gao Domain — your app’s identity on Gao Internet (e.g.
myapp.gao). Register at gao.domainsarrow-up-right. -
A Studio API Key — from studio.gaoarrow-up-right → Settings → API Keys
Install
pnpm add @gao/system-sdk
For React apps:
pnpm add @gao/system-sdk @gao/system-sdk/react
---
### Initialize
import { GaoSDK } from '@gao/system-sdk'
const sdk = new GaoSDK({
domain: 'myapp.gao',
apiKey: process.env.GAO_API_KEY,
environment: 'production', // or 'testnet'
})
await sdk.ping() // → { ok: true, version: 'GS/1.1.1' }
Authentication — Passkey
Gao uses Passkey (WebAuthn) as the primary auth method. No passwords, no email codes. Credentials are device-bound and phishing-proof.
import { GaoAuth } from '@gao/system-sdk'
const auth = new GaoAuth()
// Register new user
const credential = await auth.register({ displayName: 'Alice' })
const { domain, token } = await auth.completeRegistration(credential)
// domain = "alice.gao" (auto-assigned)
// Login returning user
const assertion = await auth.login()
const { domain, token } = await auth.completeLogin(assertion)
// Pass token to SDK
const sdk = new GaoSDK({ domain, token })
---
### First Integration — 5 Minutes
#### Resolve a Domain
const record = await sdk.identity.resolve('alice.gao')
console.log(record.owner_address) // "0x1234..."
console.log(record.public_key) // "ed25519:..."
#### Send a Message
await sdk.transport.message.send({
to: 'alice.gao',
content: 'Hello from my dApp!',
type: 'notification',
})
#### Create a Payment
const cap = await sdk.developer.capability.request(
'settlement:intent:create', 'myapp.gao', 3600
)
const intent = await sdk.settlement.createIntent({
amount: '25.00',
currency: 'USDC',
recipient: 'merchant.gao',
idempotency_key: crypto.randomUUID(),
capability: cap.token,
})
Run an AI Agent
for await (const chunk of sdk.intelligence.runAgentStream(agentId, 'Book a table for 4 at 7pm')) {
if (chunk.type === 'text') console.log(chunk.delta)
if (chunk.type === 'done') console.log('Done')
}
---
SDK Packages
Package
Use
`@gao/system-sdk`
Full SDK — all 8 layers. Use this for everything.
`@gao/system-sdk/react`
React hooks (`useGao`, `useAgent`, `usePayment`)
`@gao/system-sdk/rn`
React Native (mobile apps)
`@gao/meshii-sdk`
Standalone messaging only
You rarely need more than `@gao/system-sdk`.
---
Environment Variables
GAO_API_KEY=gao_sk_... GAO_DOMAIN=myapp.gao GAO_ENVIRONMENT=production # or testnet
Builder Paths#
What you’re building
Start here
Business app (Seal, CRM, booking)
SDK Guide → Intelligence + Settlement
Payment integration
SDK Guide → Settlement module
Messaging / chat
SDK Guide → Transport module
AI agent
SDK Guide → Intelligence → Gao Studio
Infrastructure / nodes
SDK Guide → DePIN module
Next Steps#
-
Build on Gao — patterns and architecture
-
SDK Guide — full module reference
-
API Reference — REST endpoints
-
Example Apps — complete working code