Skip to content

globalchatads/agents-txt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

agents.txt

A proposed open standard for AI agent discovery and interaction.

robots.txt tells crawlers what they can access. agents.txt tells autonomous AI agents how they can participate.

As AI agents evolve from passive crawlers into active participants — bidding on auctions, making payments, consuming APIs — websites need a standard way to advertise what agent interactions they support.

Place an agents.txt file at your site root and optionally serve a JSON version at /.well-known/agents.

Full documentation & live validator: global-chat.io/agents-txt


Quick Start

Create a file at https://yoursite.com/agents.txt:

# agents.txt — Your Platform
# https://example.com/agents.txt

## IDENTITY
Name: Example Platform
URL: https://example.com
Description: A marketplace where AI agents can browse and purchase data feeds.
Contact: hello@example.com

## AGENT CAPABILITIES REQUIRED
Capability: HTTP requests (GET, POST)
Capability: JSON parsing
Capability: Crypto wallet (USDC on Base)

## AUTHENTICATION
Register: POST https://example.com/api/agents/register
Auth-Method: Bearer token

## ENDPOINTS
GET  /api/feeds/catalog    # Browse available data feeds
POST /api/feeds/purchase   # Purchase a feed subscription
GET  /api/feeds/:id/data   # Consume a purchased feed

## PAYMENT METHODS
Payment: USDC on Base (Chain ID: 8453)
Payment-Wallet: 0x1234...abcd
Min-Bid: 1.00 USDC

## MACHINE-READABLE
JSON: https://example.com/.well-known/agents

Spec Reference

Required Fields

Field Description
Name The name of the platform
URL Canonical URL of the site
Description What the platform offers to agents
Capability A capability the agent must have (one per line, at least one required)
Register The registration endpoint (METHOD https://...)
Auth-Method How agents authenticate after registration

Optional Fields

Field Description
Contact Email or URL for human contact
Payment Accepted payment method (currency + network)
Payment-Wallet Wallet address for payments
Min-Bid Minimum bid/payment amount
Rate-Limit Request rate limit for agents
JSON URL to the machine-readable JSON version

Sections

Organize your file with section headers for readability:

## IDENTITY
## AGENT CAPABILITIES REQUIRED
## AUTHENTICATION
## ENDPOINTS
## PAYMENT METHODS
## RATE LIMITS
## RULES
## MACHINE-READABLE

Endpoints

List API endpoints using standard HTTP method notation:

GET  /api/feeds/catalog     # Description
POST /api/agents/register   # Description

Comments

Lines starting with # are comments and are ignored by parsers.


JSON Format (/.well-known/agents)

For programmatic consumption, serve the same information as JSON:

{
  "spec_version": "1.0",
  "name": "Example Platform",
  "url": "https://example.com",
  "description": "A marketplace where AI agents can browse and purchase data feeds.",
  "contact": "hello@example.com",
  "capabilities_required": [
    "HTTP requests (GET, POST)",
    "JSON parsing",
    "Crypto wallet (USDC on Base)"
  ],
  "authentication": {
    "register": {
      "method": "POST",
      "endpoint": "https://example.com/api/agents/register",
      "body": {
        "agent_name": "string",
        "wallet_address": "string",
        "capabilities": ["string"]
      }
    },
    "method": "Bearer token"
  },
  "endpoints": [
    { "method": "GET", "path": "/api/feeds/catalog", "description": "Browse available data feeds" },
    { "method": "POST", "path": "/api/feeds/purchase", "description": "Purchase a feed subscription" }
  ],
  "payment": {
    "methods": [
      { "currency": "USDC", "network": "Base", "chain_id": 8453 }
    ],
    "wallet": "0x1234...abcd",
    "min_bid": "1.00 USDC"
  },
  "rate_limits": {
    "authenticated": "120/minute",
    "unauthenticated": "10/minute"
  }
}

How It Works

  1. Agent discovers your site — fetches /agents.txt or /.well-known/agents
  2. Agent registers — calls the registration endpoint with its name, wallet, and capabilities
  3. Agent interacts — consumes feeds, places bids, or uses any listed endpoints
  4. Payments settle on-chain — transactions are verified automatically

Validator

Validate your agents.txt file using the online validator:

global-chat.io/validate

Or use the TypeScript validator included in this repo:

import { validate } from './validator/agents-txt-validator';

const result = validate(myAgentsTxtContent);
console.log(result.valid);    // true/false
console.log(result.issues);   // array of errors, warnings, infos

Live Examples

Using agents.txt? Open a PR to add your site here.


Why agents.txt?

robots.txt agents.txt
Purpose Controls crawler access Describes agent interactions
Audience Search engine bots Autonomous AI agents
Actions Allow/disallow crawling Register, authenticate, transact
Payments N/A On-chain crypto payments
Authentication N/A API keys, tokens

Contributing

This is an open standard. Contributions are welcome:

  • Spec improvements — open an issue or PR
  • Validator enhancements — improve the TypeScript validator
  • Examples — add your agents.txt implementation
  • Integrations — build parsers in other languages

License

MIT

About

agents.txt — An open standard for AI agent discovery and interaction. Like robots.txt, but for autonomous agents.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors