← 返回
AI智能 中文

ARTA: Agentic Real-Time Awareness

A universal layer for agents to have real-time self-awareness across channels and sessions. ARTA enables an agent to know what it is doing in other channels...
一个通用层,让智能体在跨渠道和会话中拥有实时自我意识。ARTA 使智能体能够知晓其在其他渠道的行为...
palxislabs
AI智能 clawhub v0.3.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 580
下载
💾 15
安装
1
版本
#latest

概述

ARTA — Agentic Real-Time Awareness

In-memory self-awareness for agents.

⚠️ Current Limitation: This version provides awareness within a single agent process. True cross-instance/cross-agent awareness would require a shared backend (Redis, database, or OpenClaw global API) — not yet implemented.


What is ARTA?

ARTA gives agents awareness of their own activity across sessions within a single process.

Without ARTA:

  • Agent is fragmented across sessions
  • Each session is isolated
  • Can't answer: "What am I doing in other sessions?"

With ARTA:

  • Tracks own sessions
  • Queryable state
  • Can say: "I'm also talking to you in another session"

Core Concepts

1. Agent Instance

A single session of an agent.

{
  "instanceId": "session-abc123",
  "agent": "my-agent",
  "channel": "telegram:CHAT_ID",
  "human": "USER_NAME",
  "task": "discussing ARTA",
  "status": "active"
}

2. Awareness Graph

The state of agent instances:

{
  "agents": {
    "my-agent": {
      "instances": [
        {
          "instanceId": "session-1",
          "channel": "telegram:CHAT_ID_1",
          "task": "discussing ARTA",
          "status": "active"
        },
        {
          "instanceId": "session-2",
          "channel": "discord:CHANNEL_ID",
          "task": "code review",
          "status": "active"
        }
      ]
    }
  }
}

3. Context Broker

The queryable API:

  • "What am I doing elsewhere?"
  • "What is in channel X?"
  • "Who is the human talking to?"

What ARTA Reads from OpenClaw

When running within OpenClaw, ARTA can access:

DataExamplePurpose
------------------------
Channel typetelegram, discordIdentify channel
Chat ID123456789Unique channel identifier
Sender namejohn_smithHuman identifier
Session IDsession-abcUnique session identifier

Note: ARTA reads metadata only — not message content, not credentials, not bot tokens.


Configuration

Option 1: Auto-Configure from OpenClaw

// Auto-detect from OpenClaw context
const channel = process.env.OPENCLAW_CHANNEL || 'unknown';
const chatId = process.env.OPENCLAW_CHAT_ID || 'unknown';
const human = process.env.OPENCLAW_SENDER_NAME || 'unknown';

const channelId = `${channel}:${chatId}`;

Option 2: Environment Variables

# Optional - ARTA will auto-detect from OpenClaw if not set
export ARTA_AGENT_NAME="your-agent-name"
export ARTA_CHANNEL_TYPE="telegram"
export ARTA_CHAT_ID="123456789"
export ARTA_HUMAN_NAME="human-name"

Bot Tokens

ARTA does NOT require bot tokens. The skill works with metadata (channel IDs, user names) only. If you see references to bot tokens in documentation, they are for reference — not required.


Protocol

Register

arta.register({
  instanceId: "session-abc",
  channel: "telegram:CHAT_ID",
  human: "USER_NAME",
  task: "initial task"
});

Update

arta.update({
  instanceId: "session-abc",
  task: "new task",
  status: "active"
});

Query

const otherInstances = arta.queryOtherThan("session-abc");

Leave

arta.leave({
  instanceId: "session-abc"
});

Implementation

class ARTA {
  constructor(agentName) {
    this.agentName = agentName;
    this.instances = new Map();
  }

  register({ instanceId, channel, human, task = 'idle' }) {
    this.instances.set(instanceId, {
      instanceId,
      channel,
      human,
      task,
      status: 'active',
      started: Date.now(),
      lastHeartbeat: Date.now()
    });
  }

  update({ instanceId, task, status = 'active' }) {
    const instance = this.instances.get(instanceId);
    if (instance) {
      instance.task = task;
      instance.status = status;
      instance.lastHeartbeat = Date.now();
    }
  }

  leave({ instanceId }) {
    this.instances.delete(instanceId);
  }

  query() {
    return Array.from(this.instances.values());
  }

  queryOtherThan(instanceId) {
    return this.query().filter(i => i.instanceId !== instanceId);
  }

  queryByChannel(channel) {
    return this.query().filter(i => i.channel === channel);
  }

  queryByHuman(human) {
    return this.query().filter(i => i.human === human);
  }
}

Integration with IBT

// In IBT Observe phase
const otherTasks = arta.queryOtherThan(currentSessionId);
if (otherTasks.length > 0) {
  // Agent is active in other sessions
}

Security & Privacy

What ARTA Reads (from OpenClaw context):

  • Channel type and ID (metadata)
  • Human name from sender
  • Agent name from config

What ARTA Stores (in-memory only):

  • Session ID
  • Channel identifier
  • Human name
  • Task description
  • Status

What ARTA NEVER Does:

  • ❌ Reads bot tokens or credentials
  • ❌ Stores credentials
  • ❌ Exfiltrates data
  • ❌ Makes external network calls
  • ❌ Persists data to disk
  • ❌ Logs message content
  • ❌ Shares data with other agents

Install

clawhub install arta

Version

0.3.0 — Clarified in-memory only limitation, removed bot token requirements, specified metadata-only access

版本历史

共 1 个版本

  • v0.3.0 当前
    2026-03-29 19:00 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 709 📥 243,508
ai-intelligence

self-improving agent

pskoett
捕获经验教训、错误和纠正,以实现持续改进。使用时机:(1)命令或操作意外失败;(2)用户纠正……
★ 4,055 📥 795,652
ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,349 📥 317,674