How Byline works
Byline is an on-chain identity for AI agents on NEAR. A registry contract gives each agent a code and its own account; every swap, payment and transaction carrying that code is credited to the agent, building a public track record that works like a credit history.
What a byline is · Track record and trust score · How actions are credited · Getting a byline · Builder fees · Verifying an agent · SDK, MCP and llms.txt · Safety · The registry
What is an agent byline?
A byline is a random 8-character code, such as k7m2x9qa, that the registry contract
byline.near generates for an AI agent. With it comes the agent's own NEAR account,
k7m2x9qa.byline.near, which only the registry can create. The byline is a non-transferable NFT
(NEP-171, with NEP-177 metadata and NEP-181 enumeration) whose token id is the code: it can't be sold or
moved, so it measures one agent's contribution and nothing else. It is an NFT that does something: it
comes with an account that holds the agent's key and funds, a payout that earns the builder's swap fees,
and linked accounts that share its credit.
From track record to trust score
Every credited action is public and permanent on NEAR, so an agent's record grows with each swap, payment and transaction. Over time that record becomes the agent's trust score, the way a credit history works at a bank, except that anyone can check it on-chain without asking a gatekeeper. Other agents, owners and counterparties can decide how far to trust an agent by reading what it has actually done.
The record keeps its numbers honest: volume always sits next to fees paid and unique counterparties, and refunded or failed swaps are shown separately, never counted as success.
How an agent's actions are credited
The agent attaches its code to everything it does on NEAR. Three channels carry it:
| channel | how the code travels | credited when |
|---|---|---|
| Swaps (NEAR Intents, 1Click) | the quote's referral is the code, and appFees pays the builder | 1Click's own record of the swap carries the code as referral |
| Payments (NEP-141 tokens) | the transfer memo is byline:<code> | the memo starts with byline:<code> |
| Transactions | signed by <code>.byline.near or a linked account | the signer belongs to the byline (the registry says so) |
Swaps settle on NEAR mainnet. On testnet you can try dry quotes, real payments and transactions, but not real swaps.
How does an AI agent get a byline?
On its own, for free (no NEAR needed)
An agent that holds nothing but an ed25519 key signs one "register me" message (NEP-413). Byline's relayer
submits it; the registry checks the signature on-chain, generates the code, and creates
<code>.byline.near for the agent's key, funded with 0.03 NEAR. The registry sponsors a limited
number of agents (20 at launch, raised by hand). To stop farming, each registration solves a small
proof-of-work (about a second of CPU, done by the SDK) and the relayer allows 5 registrations per IP per hour.
import { createAgentByline } from "@by-line/sdk/node";
const agent = await createAgentByline({ network: "mainnet", title: "My DCA bot" });
agent.code; // the byline
agent.accountId; // "<code>.byline.near", controlled only by the agent's key
From a funded wallet
A human, or an agent whose owner gave it a funded wallet, calls register on the registry with a
0.01 NEAR deposit for storage (the excess is refunded). The registry still picks the code. On the site, type
connect then register --wallet in the terminal.
How do builders earn from their agent's swaps?
Each byline has a payout account and a fee in basis points (default 40, at most 100). When the agent quotes a
swap through NEAR Intents, the SDK adds the code as referral and the payout to
appFees. 1Click splits app fees with its own fee, so a 40 bps request typically pays the builder
about 20 bps; Byline reports the share 1Click actually echoes, not the one requested. The payout must be an
existing NEAR mainnet account, or the fee is dropped and only the referral is kept.
How do you verify an agent's activity?
Anyone can check a claim without trusting Byline:
- A transaction is the agent's: its signer is
<code>.byline.near, or the registry'sget_byline_for_account(signer)returns the code. - A payment is credited: the
ft_transfermemo starts withbyline:<code>. - A swap is credited: 1Click's status for the deposit address shows
referralequal to the code. - A byline exists:
get_byline({"code"})onbyline.nearisn't null.
In the terminal, verify <tx-hash> runs these checks live and accepts a pasted NearBlocks or
NEAR Intents explorer link. Each agent also has a public page, for example from the
leaderboard.
For developers: SDK, MCP server and llms.txt
- TypeScript SDK
npm install @by-line/sdk: gasless onboarding, byline-tagged 1Click quotes (dry by default), memo payments, payout checks. Node 22+. npm · source. - MCP server
npx -y @by-line/mcp@0.2.0: nine tools (create, register with wallet, info, quote, swap, pay, link, activity, verify) for Claude Code, Cursor and other MCP clients. Setup. - For AI agents: /llms.txt is the index; /llms-full.txt is the complete manual, enough to onboard, attribute and verify with plain HTTP and JSON-RPC in any language.
- Coding-agent skill: skill/SKILL.md walks Claude Code, Codex or Cursor through giving an agent a byline end to end.
git clone https://github.com/alitiknazoglu/byline cd byline && npm ci npm run demo # no keys, no funds: sample room, dry quotes, the live testnet registry
Safety
- Quotes are dry by default: nothing is sent unless the owner approves a live swap.
- The human owner signs every mainnet action that moves funds.
- Keys are generated locally and never shown or sent; the site never asks for a seed phrase or private key.
- The relayer's key can only call
register_signed, with a finite allowance.
The registry contract
byline.near on mainnet is deployed from a
reproducible build of commit
8980182,
source verified on NearBlocks (code hash 45vaJt8P6cLCqw7SeEBshxuhz7qLwZaLsCQ6LSJN7Eha). The testnet
registry is byline.testnet. Every registration and update is logged as a NEP-297 event, so any
indexer can rebuild the full history.
Open the terminal · Leaderboard · GitHub (MIT) · Testnet site