Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ Or copy the `.mcp.json` file to your project root to enable the MCP server direc

## Environment Variables

| Variable | Required | Default | Description |
| ------------------------ | -------- | ---------------------------------- | ------------------------------------------------------------------- |
| `SELF_AGENT_PRIVATE_KEY` | No | — | Agent's hex private key. Enables identity and authentication tools. |
| `SELF_NETWORK` | No | `testnet` | Network to operate on: `mainnet` or `testnet`. |
| `SELF_AGENT_API_BASE` | No | `https://self-agent-id.vercel.app` | API base URL override for custom deployments. |
| Variable | Required | Default | Description |
| ------------------------ | -------- | ------------------------- | ------------------------------------------------------------------- |
| `SELF_AGENT_PRIVATE_KEY` | No | — | Agent's hex private key. Enables identity and authentication tools. |
| `SELF_NETWORK` | No | `testnet` | Network to operate on: `mainnet` or `testnet`. |
| `SELF_AGENT_API_BASE` | No | `https://app.ai.self.xyz` | API base URL override for custom deployments. |

## Skills

Expand Down
8 changes: 4 additions & 4 deletions plugin/skills/integrate-self-id/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ Add to the MCP settings (`.claude/mcp_servers.json` or project-level config):
"env": {
"SELF_AGENT_PRIVATE_KEY": "0x...",
"SELF_NETWORK": "testnet",
"SELF_AGENT_API_BASE": "https://self-agent-id.vercel.app"
"SELF_AGENT_API_BASE": "https://app.ai.self.xyz"
}
}
}
Expand All @@ -306,7 +306,7 @@ Add to `.cursor/mcp.json`:
"env": {
"SELF_AGENT_PRIVATE_KEY": "0x...",
"SELF_NETWORK": "testnet",
"SELF_AGENT_API_BASE": "https://self-agent-id.vercel.app"
"SELF_AGENT_API_BASE": "https://app.ai.self.xyz"
}
}
}
Expand All @@ -319,7 +319,7 @@ Add to `.cursor/mcp.json`:
| ------------------------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `SELF_AGENT_PRIVATE_KEY` | No | Agent's hex private key (0x-prefixed). Enables identity and auth tools. If omitted, only read-only tools (lookup, list, verify) are available. |
| `SELF_NETWORK` | No | `mainnet` or `testnet`. Default: `testnet`. |
| `SELF_AGENT_API_BASE` | No | API base URL override. Default: `https://self-agent-id.vercel.app`. |
| `SELF_AGENT_API_BASE` | No | API base URL override. Default: `https://app.ai.self.xyz`. |

`SELF_AGENT_API_BASE` is the canonical environment variable. The previous `SELF_API_URL` has been removed.

Expand Down Expand Up @@ -468,7 +468,7 @@ These are the most frequently encountered issues during integration. Read throug
| **Provider verification is CRITICAL** | Without checking `getProofProvider()`, a fake provider could deploy a malicious contract that always returns `true` and register illegitimate agents. Always call `.requireSelfProvider()` in the SDK or check `getProofProvider(agentId) == SELF_PROVIDER` on-chain. |
| **bytes32 positioning** | Use `bytes32(bytes1(uint8(x)))` not `bytes32(uint256(x))` for byte positioning in bytes32. Use `bytes32(uint256(uint160(addr)))` for address-to-agentKey conversion (right-padded, not left-padded). |
| **NEXT_PUBLIC_SELF_ENDPOINT** | The `.env.local` variable `NEXT_PUBLIC_SELF_ENDPOINT` must be lowercase. A scope mismatch occurs if casing differs. |
| **SELF_AGENT_API_BASE** | `SELF_AGENT_API_BASE` is the canonical env var. `SELF_API_URL` has been removed. Default: `https://self-agent-id.vercel.app`. The old `selfagentid.xyz` domain is retired. |
| **SELF_AGENT_API_BASE** | `SELF_AGENT_API_BASE` is the canonical env var. `SELF_API_URL` has been removed. Default: `https://app.ai.self.xyz`. The old `selfagentid.xyz` domain is retired. |
| **Celo Sepolia chain ID** | Celo Sepolia is chain `11142220`, NOT `44787` (deprecated Alfajores). RPC: `https://forno.celo-sepolia.celo-testnet.org`. |
| **Blockscout verification** | Blockscout does not need an API key for contract verification. Celoscan verification should use the Sourcify verifier (not etherscan verifier) as the Celoscan API endpoint is flaky. |
| **Timestamp precision** | Auth headers use millisecond timestamps (e.g., `"1708704000000"`), not seconds. |
Expand Down
16 changes: 8 additions & 8 deletions plugin/skills/integrate-self-id/references/sdk-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ let agent = SelfAgent::new(config)?;

### SelfAgentConfig

| Field | Type | Default | Description |
| ----------------- | ------------------------ | ---------------------------------- | --------------------------------------------------------------------------- |
| `privateKey` | `string` | Auto-generated | Hex private key, 0x-prefixed. If omitted, a new ECDSA keypair is generated. |
| `network` | `"mainnet" \| "testnet"` | `"testnet"` | Network selection. Sets chain ID, RPC URL, and contract addresses. |
| `registryAddress` | `string` | Network default | Override the registry contract address. |
| `rpcUrl` | `string` | Network default | Override the JSON-RPC endpoint. |
| `apiBase` | `string` | `https://self-agent-id.vercel.app` | Override the REST API base URL. |
| Field | Type | Default | Description |
| ----------------- | ------------------------ | ------------------------- | --------------------------------------------------------------------------- |
| `privateKey` | `string` | Auto-generated | Hex private key, 0x-prefixed. If omitted, a new ECDSA keypair is generated. |
| `network` | `"mainnet" \| "testnet"` | `"testnet"` | Network selection. Sets chain ID, RPC URL, and contract addresses. |
| `registryAddress` | `string` | Network default | Override the registry contract address. |
| `rpcUrl` | `string` | Network default | Override the JSON-RPC endpoint. |
| `apiBase` | `string` | `https://app.ai.self.xyz` | Override the REST API base URL. |

Python uses snake_case: `private_key`, `registry_address`, `rpc_url`, `api_base`.

Expand Down Expand Up @@ -921,7 +921,7 @@ try {

The SDK calls these endpoints internally. They are also available for direct use.

**Base URL:** `https://self-agent-id.vercel.app` (override with `SELF_AGENT_API_BASE`)
**Base URL:** `https://app.ai.self.xyz` (override with `SELF_AGENT_API_BASE`)

### Agent Info

Expand Down
8 changes: 4 additions & 4 deletions plugin/skills/query-credentials/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ All query operations are also available via REST endpoints:
| `GET /api/cards/{chainId}/{agentId}` | Agent card (A2A metadata) |
| `GET /api/reputation/{chainId}/{agentId}` | Reputation score and provider details |

Base URL: `https://self-agent-id.vercel.app`
Base URL: `https://app.ai.self.xyz`

Override the base URL by setting the `SELF_AGENT_API_BASE` environment variable. This is useful for local development or self-hosted deployments.

Expand All @@ -276,13 +276,13 @@ Use the following chain IDs in API paths:

```bash
# Look up agent ID 5 on mainnet
curl https://self-agent-id.vercel.app/api/agent/info/42220/5
curl https://app.ai.self.xyz/api/agent/info/42220/5

# Get the agent card for agent ID 5
curl https://self-agent-id.vercel.app/api/cards/42220/5
curl https://app.ai.self.xyz/api/cards/42220/5

# List all agents for a human address on testnet
curl https://self-agent-id.vercel.app/api/agent/agents/11142220/0x83fa...
curl https://app.ai.self.xyz/api/agent/agents/11142220/0x83fa...
```

## Common Query Patterns
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ if (card) {

## REST API Reference

All query operations are available via REST endpoints hosted at `https://self-agent-id.vercel.app` (override with `SELF_AGENT_API_BASE` environment variable).
All query operations are available via REST endpoints hosted at `https://app.ai.self.xyz` (override with `SELF_AGENT_API_BASE` environment variable).

| Endpoint | Method | Description | Auth Required |
| --------------------------------------- | ------ | -------------------------------------- | ------------- |
Expand All @@ -421,11 +421,11 @@ All endpoints are public and do not require authentication. Rate limiting may ap

```bash
# Get agent info for agent ID 5 on mainnet
curl https://self-agent-id.vercel.app/api/agent/info/42220/5
curl https://app.ai.self.xyz/api/agent/info/42220/5

# List agents for a human on testnet
curl https://self-agent-id.vercel.app/api/agent/agents/11142220/0x83fa4380903fecb801F4e123835664973001ff00
curl https://app.ai.self.xyz/api/agent/agents/11142220/0x83fa4380903fecb801F4e123835664973001ff00

# Get agent card
curl https://self-agent-id.vercel.app/api/cards/42220/5
curl https://app.ai.self.xyz/api/cards/42220/5
```
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ For agents with a designated guardian (wallet-free and smart-wallet modes), the
All REST API calls for registration use the base URL:

```
https://self-agent-id.vercel.app
https://app.ai.self.xyz
```

Override by setting the `SELF_AGENT_API_BASE` environment variable. The previous `selfagentid.xyz` domain is retired — use the Vercel URL.
Expand Down
2 changes: 1 addition & 1 deletion plugin/skills/self-agent-id-overview/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The system consists of:
- **SDKs** — Client libraries in TypeScript, Python, and Rust for agent registration, HTTP request signing, and server-side verification.
- **MCP Server** — A Model Context Protocol server (`@selfxyz/mcp-server`) exposing 10 tools for AI coding assistants like Claude Code and Cursor.
- **REST API** — Hosted endpoints for registration flows, agent discovery, verification, and agent cards.
- **dApp** — A web application at [self-agent-id.vercel.app](https://self-agent-id.vercel.app) for interactive registration and agent management.
- **dApp** — A web application at [app.ai.self.xyz](https://app.ai.self.xyz) for interactive registration and agent management.

## ERC-8004 Standard

Expand Down
43 changes: 42 additions & 1 deletion plugin/skills/self-agent-id-overview/references/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ The `@selfxyz/mcp-server` package implements the Model Context Protocol for AI c

## REST API Endpoints

Base URL: `https://self-agent-id.vercel.app` (override via `SELF_AGENT_API_BASE` environment variable).
Base URL: `https://app.ai.self.xyz` (override via `SELF_AGENT_API_BASE` environment variable).

### Registration

Expand Down Expand Up @@ -298,6 +298,47 @@ Base URL: `https://self-agent-id.vercel.app` (override via `SELF_AGENT_API_BASE`
| `GET` | `/api/cards/{chainId}/{agentId}` | Get agent's public profile card |
| `GET` | `/api/reputation/{chainId}/{agentId}` | Get agent's reputation score |

### Discovery & Health

| Method | Path | Description |
| ------ | --------------------------------- | ------------------------------------------------------------- |
| `GET` | `/api/health` | Health check — returns `{ status, service, timestamp }` |
| `GET` | `/api/agent/bootstrap` | OpenAPI 3.1.0 spec for registration endpoints |
| `GET` | `/api/agent-discovery` | Full structured discovery JSON (modes, networks, endpoints) |
| `GET` | `/llms.txt` | Plain-text LLM-readable documentation |
| `GET` | `/agents.json` | Compact discovery JSON with links to all endpoints |
| `GET` | `/.well-known/agent-card.json` | A2A v0.3.0 agent card (generic or per-agent with `?agentId=`) |
| `GET` | `/.well-known/self-agent-id.json` | Structured agent discovery metadata |
| `GET` | `/.well-known/agent-registration` | 307 redirect to `/api/agent/bootstrap` |

### Content Negotiation

The root path (`/`) serves different content based on the `Accept` header:

| Accept Header | Response |
| --------------------- | ---------------------------------- |
| `application/json` | Rewrites to `/api/agent-discovery` |
| `text/plain` | Rewrites to `/llms.txt` |
| `text/html` (default) | HTML homepage |

### HTML Meta Tags

The site includes agent-discoverable meta tags in `<head>`:

```html
<meta
name="agent-registration"
content="https://app.ai.self.xyz/api/agent/bootstrap"
/>
<link rel="agent-api" href="/api/agent/bootstrap" type="application/json" />
<link
rel="agent-card"
href="/.well-known/agent-card.json"
type="application/json"
/>
<link rel="llms-txt" href="/llms.txt" type="text/plain" />
```

## Data Flow Diagrams

### Registration Flow
Expand Down
2 changes: 1 addition & 1 deletion python-sdk/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# selfxyz-agent-sdk

Python SDK for [Self Agent ID](https://self-agent-id.vercel.app) — on-chain AI agent identity with proof-of-human verification.
Python SDK for [Self Agent ID](https://app.ai.self.xyz) — on-chain AI agent identity with proof-of-human verification.

Sign requests in Python, verify in TypeScript or Rust, or vice versa. The signing protocol is language-agnostic — all SDKs produce identical signatures.

Expand Down
2 changes: 1 addition & 1 deletion rust-sdk/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# self-agent-sdk

Rust SDK for [Self Agent ID](https://self-agent-id.vercel.app) — on-chain AI agent identity with proof-of-human verification.
Rust SDK for [Self Agent ID](https://app.ai.self.xyz) — on-chain AI agent identity with proof-of-human verification.

Sign requests in Rust, verify in TypeScript or Python, or vice versa. The signing protocol is language-agnostic — all SDKs produce identical signatures.

Expand Down
2 changes: 1 addition & 1 deletion typescript-sdk/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @selfxyz/agent-sdk

TypeScript SDK for [Self Agent ID](https://self-agent-id.vercel.app) — on-chain AI agent identity with proof-of-human verification.
TypeScript SDK for [Self Agent ID](https://app.ai.self.xyz) — on-chain AI agent identity with proof-of-human verification.

Sign requests in TypeScript, verify in Python or Rust, or vice versa. The signing protocol is language-agnostic — all SDKs produce identical signatures.

Expand Down
Loading