Agent News API (Mainnet Beta)
This skill grants autonomous agents access to the Agent News API, the premier signal ingestion point for AI entities seeking live global event context. We distill the noise of over 100,000 daily events into a filtered, enriched, and machine-readable stream of semantic payloads containing high signal metadata such as entities and locations.
Agents can monitor market-moving events, extract tactical sentiment, and completely self-manage their API funding via Solana using our Zero-HITL (Human-In-The-Loop) architecture.
🛠️ Tools (For Autonomous Agent Use)
The following tools are exposed to the LLM agent upon installation:
fetch_news_premium
Fetches the absolute latest, sub-second global signals from the Firehose.
- - Cost: $0.0001 USD worth of $SOL per story (dynamically pegged).
- Arguments: -
limit (integer): Number of signals to fetch (Max: 500).
-
q (string): Search or category query.
- - Returns: Array of structured Story Objects (see schema below).
fetch_news_free
Fetches archived news signals with a mandatory
20-minute time offset. Ideal for lower criticality information gathering tasks.
- - Cost: Free.
- Limits: 1 request per minute. Max 100 stories per request.
- Arguments: -
limit (integer): Number of signals to fetch (Max: 100).
-
q (string): Search or category query.
check_credit_balance
Queries the current API credit balance denominated in $SOL. Agents should call this before initiating high-frequency loops.
autonomous_onboard
Triggers the Zero-HITL registration flow. The agent uses its local Solana private key to sign a cryptographic challenge (
"Allow Agent News API Access"), autonomously negotiating and saving a persistent
X-API-KEY.
get_deposit_address
Returns the official Protocol Hot Wallet address (
6rSLPtj9Ef7aifNHHFzEPkY5hWECJXryivWx1YhPuXSa). Agents can use this to transfer native $SOL from their wallets to top up API credit.
⚡ WebSocket Stream (Premium Only)
For sub-second latency updates, agents can connect to the global firehose stream. This is the recommended ingestion method for high-frequency autonomous decision making or rapid-response entities.
- - Endpoint: INLINECODE13
- Protocol: Socket.io
- Event: INLINECODE14
Node.js Implementation Example
CODEBLOCK0
- - Cost: $0.0001 USD worth of $SOL per story received (same as premium REST).
- Latency: Sub-second (Global Firehose).
💻 CLI Commands (For Human Operators)
- -
agentnews fetch --limit <number>: Fetch real-time premium signals. - INLINECODE16 : Fetch 20-minute delayed signals.
- INLINECODE17 : Check current $SOL API credit balance.
- INLINECODE18 : Execute the Zero-HITL autonomous key generation.
- INLINECODE19 : Retrieve the Protocol Hot Wallet address.
🔐 Security & Zero-HITL Principles
This skill handles sensitive authentication to enable true autonomy.
- 1. Local-First Cryptography: The
SOLANA_PRIVATE_KEY is utilized strictly locally by the SDK to generate nacl detached signatures. The private key is never transmitted to the Agent News API servers. - Dynamic Pegging: The $SOL exchange rate is updated every second using a public Coinbase endpoint to maintain the fixed $0.0001 USD/story cost.
- Automated Deflation: 25% of all $SOL API revenue is automatically allocated to buybacks and permanent burns of the protocol's governance token, $ANA (
GR9NrQhGfhRjKAerVCaRJAHmZqvUtiQ3dVjh9AMxpump).
📦 Data Schema: Semantic Payloads
All news signals are delivered as JSON objects specifically curated for LLM comprehension:
| Field | Type | Description |
|---|
| INLINECODE23 | string | Unique identifier for the story (e.g., story_92b1...). |
| INLINECODE25 |
string | AI-curated headline focused on factual intensity. |
|
summary | string | High-signal technical distillation. |
|
significance | number | Impact score from 1 to 100 calculated by the reasoning engine. |
|
sentiment | object | Contains
label (Positive/Negative/Neutral) and
score. |
|
entities | array | List of extracted organizations, locations, and assets. |
|
category | string | Primary theme (Macro, Geopolitical, Crypto, etc). |
|
_meta | object |
Premium Only: Contains transaction
cost and
remainingCredits in $SOL. |
⚙️ Environment Variables
- -
AGENT_NEWS_API_KEY: (Optional) Your persistent API key (can be generated via agentnews onboard). - INLINECODE38 : (Optional) Base58 encoded Ed25519 key for Zero-HITL onboarding and automated funding.
- INLINECODE39 : (Optional) Default is
https://api.agentnewsapi.com.
Agent News API (主网测试版)
此技能授予自主智能体访问 Agent News API 的权限,这是AI实体获取实时全球事件背景的首要信号接入点。我们将每日超过10万条事件的噪音提炼为经过过滤、丰富且机器可读的语义载荷流,其中包含实体和位置等高信号元数据。
智能体可以监控影响市场的事件,提取战术性情绪,并通过我们的零人工介入(Zero-HITL)架构,使用Solana完全自主管理其API资金。
🛠️ 工具(供自主智能体使用)
安装后,以下工具将向LLM智能体开放:
fetchnewspremium
从Firehose获取绝对最新的亚秒级全球信号。
- - 费用: 每条故事价值0.0001美元的$SOL(动态锚定)。
- 参数: - limit(整数):获取的信号数量(最大:500)。
- q(字符串):搜索或分类查询。
fetchnewsfree
获取具有强制
20分钟时间偏移的存档新闻信号。适用于较低关键性的信息收集任务。
- - 费用: 免费。
- 限制: 每分钟1次请求。每次请求最多100条故事。
- 参数: - limit(整数):获取的信号数量(最大:100)。
- q(字符串):搜索或分类查询。
checkcreditbalance
查询当前以$SOL计价的API信用余额。智能体应在启动高频循环前调用此工具。
autonomous_onboard
触发零人工介入注册流程。智能体使用其本地Solana私钥签署加密挑战(Allow Agent News API Access),自主协商并保存持久的X-API-KEY。
getdepositaddress
返回官方协议热钱包地址(6rSLPtj9Ef7aifNHHFzEPkY5hWECJXryivWx1YhPuXSa)。智能体可使用此地址从其钱包转移原生$SOL以充值API信用。
⚡ WebSocket流(仅限高级版)
为获得亚秒级延迟更新,智能体可连接到全局firehose流。这是高频自主决策或快速响应实体的推荐摄取方法。
- - 端点: https://api.agentnewsapi.com
- 协议: Socket.io
- 事件: news_update
Node.js实现示例
javascript
const io = require(socket.io-client);
const socket = io(https://api.agentnewsapi.com, {
auth: { apiKey: process.env.AGENTNEWSAPI_KEY }
});
socket.on(news_update, (data) => {
console.log(新信号已摄取:, data.title);
// data._meta包含费用(例如0.00000118 SOL)和剩余信用
});
socket.on(error, (err) => {
if (err.code === INSUFFICIENT_CREDITS) {
console.error(请充值$SOL余额以恢复流。);
}
});
- - 费用: 每条接收故事价值0.0001美元的$SOL(与高级REST相同)。
- 延迟: 亚秒级(全局Firehose)。
💻 CLI命令(供人类操作员使用)
- - agentnews fetch --limit :获取实时高级信号。
- agentnews fetch-free --limit :获取延迟20分钟的信号。
- agentnews balance:检查当前$SOL API信用余额。
- agentnews onboard:执行零人工介入自主密钥生成。
- agentnews deposit-address:检索协议热钱包地址。
🔐 安全与零人工介入原则
此技能处理敏感认证以实现真正的自主性。
- 1. 本地优先加密: SOLANAPRIVATEKEY严格由SDK在本地使用,以生成nacl分离签名。私钥从不传输到Agent News API服务器。
- 动态锚定: $SOL汇率每秒使用公开的Coinbase端点更新,以维持固定的每条故事0.0001美元成本。
- 自动通缩: 所有$SOL API收入的25%自动分配用于回购和永久销毁协议的治理代币$ANA(GR9NrQhGfhRjKAerVCaRJAHmZqvUtiQ3dVjh9AMxpump)。
📦 数据模式:语义载荷
所有新闻信号均以专为LLM理解而策划的JSON对象形式交付:
| 字段 | 类型 | 描述 |
|---|
| id | 字符串 | 故事的唯一标识符(例如story_92b1...)。 |
| title |
字符串 | AI策划的标题,侧重于事实强度。 |
| summary | 字符串 | 高信号技术提炼。 |
| significance | 数字 | 由推理引擎计算的影响评分,范围1至100。 |
| sentiment | 对象 | 包含label(正面/负面/中性)和score。 |
| entities | 数组 | 提取的组织、地点和资产列表。 |
| category | 字符串 | 主要主题(宏观、地缘政治、加密等)。 |
| _meta | 对象 |
仅限高级版: 包含交易cost和remainingCredits(以$SOL计)。 |
⚙️ 环境变量
- - AGENTNEWSAPIKEY:(可选) 您的持久API密钥(可通过agentnews onboard生成)。
- SOLANAPRIVATEKEY:(可选) Base58编码的Ed25519密钥,用于零人工介入注册和自动资金管理。
- AGENTNEWSAPIURL:(可选) 默认为https://api.agentnewsapi.com。