Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.brickken.com/llms.txt

Use this file to discover all available pages before exploring further.

Agentic methods are ERC-8004 and agent-token operations exposed through the standard transaction flow:
  1. Call POST /prepare-transactions.
  2. Sign the returned transaction locally.
  3. Call POST /send-transactions.
  4. Poll GET /get-transaction-status.
Private keys never leave the client. These methods can be authenticated with either an x-api-key header or an x402 payment. Non-agentic methods still require x-api-key.

x402 Authentication

For x402, omit x-api-key and call the same endpoint. If payment is required, the API returns 402 Payment Required with a PAYMENT-REQUIRED response header containing a base64-encoded x402 payment request. The client signs the x402 payment locally and retries the request with one of these headers:
X-Payment: BASE64_ENCODED_X402_PAYMENT_PAYLOAD
or:
payment-signature: BASE64_ENCODED_X402_PAYMENT_PAYLOAD
When settlement succeeds, the API includes a PAYMENT-RESPONSE header. The payment rail uses USDC with EIP-3009 authorization. The exact price, payment chain, asset, and recipient must be read from PAYMENT-REQUIRED; do not hardcode them client-side.

Eligible Methods

MethodPurpose
newTokenizedAgentLegacy alias for agent registration
agentRegisterRegister an ERC-8004 agent
agentSetURIPublish the final agent URI and registration metadata
agentSetMetadataWrite one metadata key/value pair on-chain
agentSetWalletSet the operational wallet for the agent
agentGiveFeedbackSubmit reputation feedback
agentRevokeFeedbackRevoke a feedback entry
agentAppendFeedbackResponseAppend a response to a feedback thread
agentCreateTokenDeploy an ERC-20 token for the agent
agentMintTokenMint an agent token
agentBurnTokenBurn an agent token

Common Prepare Request

All methods are prepared through POST /prepare-transactions.
curl --request POST 'https://api.sandbox.brickken.com/prepare-transactions' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: YOUR_API_KEY' \
  --data '{
    "chainId": "11155111",
    "method": "agentRegister",
    "signerAddress": "0xYourWallet"
  }'
For x402, use the same JSON body but omit x-api-key. If the first response is 402, retry with X-Payment. Common fields:
FieldTypeRequiredDescription
chainIdstringYesTarget chain ID. Decimal and hex values are accepted
methodstringYesOne of the eligible method names
signerAddressstringYesWallet that signs the prepared blockchain transaction
gasLimitstring or numberNoOptional explicit gas limit
noncenumberNoOptional explicit nonce when managing nonces manually
privateRpcUrlstringNoOptional RPC override
Prepare response shape:
{
  "transactions": [
    {
      "from": "0x...",
      "to": "0x...",
      "data": "0x...",
      "nonce": 42,
      "chainId": 11155111,
      "type": 2
    }
  ],
  "txId": "0xabc123...",
  "info": {}
}
transactions can be either an object or an array depending on the method. Normalize it before signing.

Send with x402

Use POST /send-transactions after signing the prepared transaction.
curl --request POST 'https://api.sandbox.brickken.com/send-transactions' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: YOUR_API_KEY' \
  --data '{
    "txId": "0xabc123...",
    "signedTransactions": ["0xSignedRawTransaction"]
  }'
For x402, omit x-api-key and follow the same PAYMENT-REQUIRED -> X-Payment retry flow. send-transactions x402 batches must contain only x402-eligible prepared transactions, and all transactions in the batch must be on the same chain.

agentRegister

Registers a new AI agent on the ERC-8004 Identity Registry. It uploads a draft registration file to IPFS, stores a draft TokenizedAgent record, and prepares an on-chain register() transaction. Required fields:
FieldTypeDescription
methodstringMust be agentRegister
ownerEmailstringEmail of the tokenizer account that owns the agent
signerAddressstringTokenizer wallet address
namestringAgent display name
descriptionstringAgent description
imagestringAgent image URL or IPFS URI
servicesarrayNon-empty service descriptors
Optional fields:
FieldTypeDescription
supportedTruststring[]Trust capabilities declared by the agent
x402SupportbooleanWhether the agent itself supports x402 payments
activebooleanAgent active status. Defaults to true
metadataobjectArbitrary metadata stored in the registration file
aiModelNamestringStored under metadata.ai.modelName
aiModelProviderstringStored under metadata.ai.provider
tagsstring[]Discovery tags
versionstringAgent version
documentationstringDocumentation URL
sourceCodestringSource code URL
licensestringLicense identifier
agentTypestringAgent type category
registrationsarrayAdditional registry registrations
Example:
{
  "chainId": "11155111",
  "method": "agentRegister",
  "ownerEmail": "owner@example.com",
  "signerAddress": "0xYourWallet",
  "name": "Research Agent",
  "description": "An autonomous research agent",
  "image": "ipfs://QmAgentImage",
  "services": [
    {
      "name": "A2A",
      "endpoint": "https://agent.example/.well-known/agent-card.json",
      "version": "0.3.0"
    }
  ],
  "aiModelName": "gpt-4o",
  "aiModelProvider": "openai",
  "x402Support": true,
  "active": true
}
The prepare response includes info.agentUuid. Save it for later mutation calls. newTokenizedAgent is a legacy alias that uses the same request body as agentRegister.

agentSetURI

Updates the agent’s on-chain agentURI after the registration transaction has been mined. It rebuilds the registration file, injects the real on-chain agentId, uploads the final file to IPFS, and prepares setAgentURI(agentId, newURI). Required fields:
FieldTypeDescription
methodstringMust be agentSetURI
signerAddressstringMust match the stored owner wallet
agentUuid or agentIdstringStored agent reference
Optional profile override fields include name, description, image, services, metadata, aiModelName, aiModelProvider, tags, version, documentation, sourceCode, license, agentType, supportedTrust, x402Support, active, and registrations. Example:
{
  "chainId": "11155111",
  "method": "agentSetURI",
  "signerAddress": "0xOwnerWallet",
  "agentUuid": "YOUR_AGENT_UUID"
}

agentSetMetadata

Writes a single key/value pair to the ERC-8004 metadata store by preparing setMetadata(agentId, key, encodedValue). Required fields:
FieldTypeDescription
methodstringMust be agentSetMetadata
signerAddressstringMust match the stored owner wallet
agentUuid or agentIdstringStored agent reference
metadataKey or aiModelNamestringMetadata key, or shorthand for modelName
Optional fields:
FieldTypeDescription
metadataValueanyRaw value to encode. If omitted, aiModelName is used
metadataEncodingstringstring by default, or json / hex
aiModelProviderstringStored in local profile context
Example:
{
  "chainId": "11155111",
  "method": "agentSetMetadata",
  "signerAddress": "0xOwnerWallet",
  "agentUuid": "YOUR_AGENT_UUID",
  "metadataKey": "modelName",
  "metadataValue": "gpt-4o"
}

agentSetWallet

Sets the agent’s operational wallet in the ERC-8004 Identity Registry. The new wallet must sign an authorization before the owner submits the update. Required fields:
FieldTypeDescription
methodstringMust be agentSetWallet
signerAddressstringMust match the stored owner wallet
agentUuid or agentIdstringStored agent reference
newWalletstringWallet to assign as agent wallet
signaturestringHex signature from the new wallet
deadlinenumberUnix timestamp deadline for the signature
Example:
{
  "chainId": "11155111",
  "method": "agentSetWallet",
  "signerAddress": "0xOwnerWallet",
  "agentUuid": "YOUR_AGENT_UUID",
  "newWallet": "0xNewAgentWallet",
  "signature": "0xSignatureFromNewWallet",
  "deadline": 1800000000
}

agentGiveFeedback

Writes a feedback entry to the ERC-8004 Reputation Registry. Required fields:
FieldTypeDescription
methodstringMust be agentGiveFeedback
signerAddressstringReviewer wallet
agentUuid or agentIdstringTarget agent
valuestring or numberFeedback value
valueDecimalsstring or numberDecimals used to interpret value
Conditionally required:
FieldDescription
emailRequired when the API cannot infer tracking context from agentUuid
Optional fields are tag1, tag2, endpoint, feedbackURI, and feedbackHash. feedbackHash defaults to the zero hash when omitted. Example:
{
  "chainId": "11155111",
  "method": "agentGiveFeedback",
  "signerAddress": "0xReviewerWallet",
  "agentId": "7",
  "email": "reviewer@example.com",
  "value": "9500",
  "valueDecimals": 2,
  "tag1": "quality",
  "endpoint": "https://agent.example/.well-known/agent-card.json"
}

agentRevokeFeedback

Revokes a previously submitted feedback entry. Required fields:
FieldTypeDescription
methodstringMust be agentRevokeFeedback
signerAddressstringOriginal reviewer wallet
agentIdstring or numberTarget agent ID
feedbackIndexstring or numberFeedback index to revoke
emailstringEmail for local tracking
Example:
{
  "chainId": "11155111",
  "method": "agentRevokeFeedback",
  "signerAddress": "0xReviewerWallet",
  "agentId": "7",
  "feedbackIndex": 0,
  "email": "reviewer@example.com"
}

agentAppendFeedbackResponse

Appends a response to an existing feedback thread. Required fields:
FieldTypeDescription
methodstringMust be agentAppendFeedbackResponse
signerAddressstringAgent owner wallet
agentIdstring or numberTarget agent ID
clientAddressstringReviewer wallet tied to the feedback
feedbackIndexstring or numberFeedback index to update
responseURIstringURI of the off-chain response payload
emailstringEmail for local tracking
Optional field: responseHash, a 32-byte content hash. It defaults to the zero hash when omitted. Example:
{
  "chainId": "11155111",
  "method": "agentAppendFeedbackResponse",
  "signerAddress": "0xOwnerWallet",
  "agentId": "7",
  "clientAddress": "0xReviewerWallet",
  "feedbackIndex": 0,
  "responseURI": "ipfs://QmResponseCID",
  "email": "owner@example.com"
}

agentCreateToken

Deploys a new ERC-20 token for the agent through the Agent Token Factory. Required fields:
FieldTypeDescription
methodstringMust be agentCreateToken
ownerEmail or emailstringTokenizer email
signerAddressstringWallet that signs and pays gas
namestringToken name
symbolstringToken ticker, 2-11 uppercase alphanumeric characters
agentWalletstringAgent wallet that will own the token
Optional fields:
FieldTypeDescription
premintstringHuman-readable amount minted to agentWallet. Defaults to 0
decimalsnumberToken decimals, 0-255. Defaults to 18
Example:
{
  "chainId": "11155111",
  "method": "agentCreateToken",
  "ownerEmail": "owner@example.com",
  "signerAddress": "0xOwnerWallet",
  "name": "My Agent Token",
  "symbol": "MAT",
  "agentWallet": "0xAgentOperationalWallet",
  "premint": "1000000",
  "decimals": 18
}
After send-transactions succeeds, read the deployed tokenAddress from the send result.

agentMintToken

Mints additional tokens by calling mint(to, amount) on the deployed agent token. Required fields:
FieldTypeDescription
methodstringMust be agentMintToken
ownerEmail or emailstringTokenizer email
signerAddressstringMust be the configured agentWallet
tokenAddressstringDeployed ERC-20 token address
tostringRecipient wallet
amountstringHuman-readable amount to mint
Optional field: decimals, defaulting to 18. Example:
{
  "chainId": "11155111",
  "method": "agentMintToken",
  "ownerEmail": "owner@example.com",
  "signerAddress": "0xAgentOperationalWallet",
  "tokenAddress": "0xDeployedTokenAddress",
  "to": "0xRecipientAddress",
  "amount": "500",
  "decimals": 18
}

agentBurnToken

Burns tokens by calling burn(from, amount) on the deployed agent token. Required fields:
FieldTypeDescription
methodstringMust be agentBurnToken
ownerEmail or emailstringTokenizer email
signerAddressstringMust be the configured agentWallet
tokenAddressstringDeployed ERC-20 token address
fromstringAddress to burn from
amountstringHuman-readable amount to burn
Optional field: decimals, defaulting to 18. Example:
{
  "chainId": "11155111",
  "method": "agentBurnToken",
  "ownerEmail": "owner@example.com",
  "signerAddress": "0xAgentOperationalWallet",
  "tokenAddress": "0xDeployedTokenAddress",
  "from": "0xAddressToBurnFrom",
  "amount": "100",
  "decimals": 18
}

Nonce Ordering

For multi-step agent workflows, wait for each transaction to be mined before preparing the next one. Preparing multiple dependent agent transactions before the first one is mined can produce nonce conflicts. The canonical profile flow is:
  1. agentRegister
  2. Wait for the registration transaction to be mined and processed.
  3. agentSetURI
  4. Wait for the URI transaction to be mined and processed.
  5. agentSetMetadata