https://github.com/sunilp/aip-node
AIP TypeScript SDK: verifiable agent identity for MCP and A2A. Ed25519 tokens, delegation chains, capability enforcement.
https://github.com/sunilp/aip-node
a2a agent-identity ai-agents ai-security authentication biscuit delegation ed25519 identity-protocol jwt mcp model-context-protocol typescript
Last synced: 23 days ago
JSON representation
AIP TypeScript SDK: verifiable agent identity for MCP and A2A. Ed25519 tokens, delegation chains, capability enforcement.
- Host: GitHub
- URL: https://github.com/sunilp/aip-node
- Owner: sunilp
- License: other
- Created: 2026-04-25T05:16:49.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-04-25T06:20:25.000Z (2 months ago)
- Last Synced: 2026-04-26T01:10:19.257Z (2 months ago)
- Topics: a2a, agent-identity, ai-agents, ai-security, authentication, biscuit, delegation, ed25519, identity-protocol, jwt, mcp, model-context-protocol, typescript
- Language: TypeScript
- Homepage: https://sunilprakash.com/aip/
- Size: 81.1 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# AIP TypeScript SDK
TypeScript implementation of the [Agent Identity Protocol (AIP)](https://github.com/sunilp/aip) for verifiable, delegable AI agent identity.
Full spec implementation including features not yet available in the Python SDK: DNS-based identity resolution, completion blocks for provenance, HTTP binding, and A2A binding.
## Packages
| Package | Description |
|---------|-------------|
| [`@aip-sdk/core`](packages/core) | Ed25519 identity, key management, identity documents, DNS resolution, completion blocks |
| [`@aip-sdk/token`](packages/token) | Compact (JWT+EdDSA) and chained (Biscuit+Datalog) tokens |
| [`@aip-sdk/mcp`](packages/mcp) | MCP proxy middleware, audit, token verification, HTTP binding |
| [`@aip-sdk/agents`](packages/agents) | Framework adapters (LangChain.js, Vercel AI SDK), A2A binding |
## Quick Start
```bash
npm install @aip-sdk/core @aip-sdk/token
```
```typescript
import { KeyPair } from "@aip-sdk/core";
import { CompactToken } from "@aip-sdk/token";
// Generate identity
const keypair = await KeyPair.generate();
const aipId = `aip:key:ed25519:${keypair.publicKeyMultibase()}`;
// Issue token
const token = await CompactToken.create(
{
iss: aipId,
sub: "aip:key:ed25519:zAgent1",
scope: ["tool:search"],
max_depth: 0,
iat: Math.floor(Date.now() / 1000),
exp: Math.floor(Date.now() / 1000) + 3600,
},
keypair
);
// Verify token
const verified = await CompactToken.verify(token, keypair.publicKeyBytes());
console.log("Verified:", verified.claims.scope);
```
## MCP Proxy
Protect MCP servers with token verification:
```typescript
import { AipProxy, ProxyConfig } from "@aip-sdk/mcp";
const config = new ProxyConfig({
upstream: "http://localhost:3000",
port: 8080,
trustKeys: ["z6MkhaXgBZDvotDkL5LQ..."],
});
const proxy = new AipProxy(config);
proxy.serveForever();
```
## Agent Framework Integration
### LangChain.js
```typescript
import { AIPLangChainPlugin } from "@aip-sdk/agents";
const plugin = new AIPLangChainPlugin();
await plugin.register(agentExecutor, "search-agent");
const headers = await plugin.getToolCallHeaders("search-agent");
// { "X-AIP-Token": "eyJ..." }
```
### Vercel AI SDK
```typescript
import { AIPVercelAIPlugin } from "@aip-sdk/agents";
const plugin = new AIPVercelAIPlugin();
await plugin.register("assistant", ["search", "calculate"]);
const headers = await plugin.getToolCallHeaders("assistant");
```
## Protocol
- Paper: [arXiv:2603.24775](https://arxiv.org/abs/2603.24775)
- IETF: [draft-prakash-aip-00](https://datatracker.ietf.org/doc/draft-prakash-aip/)
- Spec: [sunilprakash.com/aip/](https://sunilprakash.com/aip/)
- Python SDK: [agent-identity-protocol on PyPI](https://pypi.org/project/agent-identity-protocol/)
## License
Apache 2.0