Skip to content

nais-standard/clients

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

NAIS Clients (SDKs)

Official SDK implementations for resolving and validating NAIS agent identities.

Each SDK wraps the public resolver at resolver.nais.id and provides a clean interface for agent discovery.

Available SDKs

Language Directory Package Requirements
JavaScript/TypeScript js/ @nais/sdk Node.js 18+
Python python/ nais-sdk Python 3.8+
PHP php/ nais/sdk PHP 7.4+

Quick Examples

JavaScript

import { resolve, validate } from '@nais/sdk';

const agent = await resolve('weatheragent.nais.id');
console.log(agent.resolved.mcp_endpoint);

const result = await validate('weatheragent.nais.id');
console.log(result.valid);

Python

from nais import resolve, validate

agent = resolve("weatheragent.nais.id")
print(agent["resolved"]["mcp_endpoint"])

result = validate("weatheragent.nais.id")
print(result["valid"])

PHP

use Nais\Sdk\Resolver;

$resolver = new Resolver();
$agent = $resolver->resolve('weatheragent.nais.id');
echo $agent['resolved']['mcp_endpoint'];

$result = $resolver->validate('weatheragent.nais.id');
echo $result['valid'];

Structure

js/
├── src/index.js       # SDK source
├── package.json       # npm config
└── README.md

python/
├── nais/__init__.py   # SDK source
├── pyproject.toml     # PyPI config
└── README.md

php/
├── src/Nais/Resolver.php  # SDK source
├── composer.json          # Packagist config
└── README.md

API

Each SDK provides two main functions:

resolve(domain)

Calls the public resolver and returns the full normalized response including DNS records, manifest data, and validation results.

validate(domain)

Calls the resolver and returns a simplified validation summary — useful for quick checks.

Related

  • resolver — The resolver these SDKs call
  • spec — Protocol specification
  • examples — Demo agents to test against

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors