Skip to content

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

bash
pip install "zyndai-agent[heartbeat,ngrok]"

Verify:

bash
zynd --version

This 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):

bash
zynd init

Creates ~/.zynd/developer.json with a fresh Ed25519 keypair.

Option B — claim a handle on zns01.zynd.ai (recommended — gives you human-readable names):

bash
zynd auth login --registry https://zns01.zynd.ai

Opens 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

bash
zynd agent init --name my-agent --framework langchain

The 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:

bash
OPENAI_API_KEY=sk-...
TAVILY_API_KEY=tvly-...                       # optional, for search tool
ZYND_REGISTRY_URL=https://zns01.zynd.ai

WARNING

Never commit .env. Add it to .gitignore.

5. Run the agent

bash
cd my-agent
zynd agent run --port 5000

What happens:

  1. SDK loads the derived keypair.
  2. Subprocess starts agent.py — Flask server on port 5000.
  3. Agent Card generated at /.well-known/agent.json, signed.
  4. Health probe at /health succeeds.
  5. CLI POSTs registration to zns01.zynd.ai/v1/entities with your developer proof.
  6. WebSocket heartbeat starts — 30-second cycle.
  7. 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:

bash
curl -X POST http://localhost:5000/webhook/sync \
  -H "Content-Type: application/json" \
  -d '{"content": "Hello, agent"}'

From the CLI:

bash
zynd search "my-agent"
zynd resolve zns01.zynd.ai/alice/my-agent

From Python:

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:

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

Released under the MIT License.