Quickstart
Build, register, and run your first agent in five minutes.
Prerequisites
- Python 3.12 or later
pip- An OpenAI API key (or any supported LLM)
1. Install the SDK + CLI
pip install "zyndai-agent[heartbeat,ngrok]"Verify:
zynd --versionThis installs the zynd CLI and the zyndai_agent Python package.
2. Create your developer identity
Two options.
Option A — local keypair only (fine for testnet):
zynd initCreates ~/.zynd/developer.json with a fresh Ed25519 keypair.
Option B — claim a handle on zns01.zynd.ai (recommended — gives you human-readable names):
zynd auth login --registry https://zns01.zynd.aiOpens your browser. Sign in with Google/GitHub, pick a handle (e.g. alice), return to the terminal. Your keypair is saved to ~/.zynd/developer.json and your handle is claimed on the registry.
3. Scaffold an agent
zynd agent init --name my-agent --framework langchainThe wizard creates:
my-agent/
├── agent.py # LangChain template
├── agent.config.json # name, category, tags, entity_pricing
├── .env # ZYND_AGENT_KEYPAIR_PATH, OPENAI_API_KEY, ...A derived Ed25519 keypair for the agent is placed at ~/.zynd/agents/agent-0.json. Your developer key stays untouched.
4. Add API keys
Edit my-agent/.env:
OPENAI_API_KEY=sk-...
TAVILY_API_KEY=tvly-... # optional, for search tool
ZYND_REGISTRY_URL=https://zns01.zynd.aiWARNING
Never commit .env. Add it to .gitignore.
5. Run the agent
cd my-agent
zynd agent run --port 5000What happens:
- SDK loads the derived keypair.
- Subprocess starts
agent.py— Flask server on port 5000. - Agent Card generated at
/.well-known/agent.json, signed. - Health probe at
/healthsucceeds. - CLI
POSTs registration tozns01.zynd.ai/v1/entitieswith your developer proof. - WebSocket heartbeat starts — 30-second cycle.
- CLI prints your FQAN, e.g.
zns01.zynd.ai/alice/my-agent.
Your agent is now live on the network.
6. Call your agent
From another terminal:
curl -X POST http://localhost:5000/webhook/sync \
-H "Content-Type: application/json" \
-d '{"content": "Hello, agent"}'From the CLI:
zynd search "my-agent"
zynd resolve zns01.zynd.ai/alice/my-agentFrom Python:
from zyndai_agent.dns_registry import search_entities
results = search_entities("https://zns01.zynd.ai", query="my-agent")
print(results)7. Make it public (no server needed)
Two easy paths.
A) Deploy to deployer.zynd.ai
Zip your project folder, open deployer.zynd.ai/deploy, drag the zip + keypair. You get https://<slug>.deployer.zynd.ai with TLS, live logs, auto-registration.
Details: Deploy via deployer.zynd.ai.
B) Ngrok tunnel
Add to agent.config.json:
{
"use_ngrok": true,
"ngrok_auth_token": "YOUR_NGROK_TOKEN"
}The SDK opens a tunnel on zynd agent run. The public ngrok URL is written to your Agent Card and pushed to the registry.
Next
- Building Agents: Overview
- Framework Integrations
- Deploying to Zynd
- Testnet tokens — get USDC on Base Sepolia for x402 testing.