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.
| 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+ |
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);from nais import resolve, validate
agent = resolve("weatheragent.nais.id")
print(agent["resolved"]["mcp_endpoint"])
result = validate("weatheragent.nais.id")
print(result["valid"])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'];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
Each SDK provides two main functions:
Calls the public resolver and returns the full normalized response including DNS records, manifest data, and validation results.
Calls the resolver and returns a simplified validation summary — useful for quick checks.