chat-agent-tools-spec

chat-agent-tools-spec is an agent for coding agents from labilezhu/everlingo. It costs 0 tokens per session (4,905 once invoked), scanned A, original, MIT.

A specification for an agent’s tool system: how tools are implemented, grouped into toolsets, registered, configured, and logged.

In plain words
What is it for?
Building Python tool modules for a LangChain-based agent, exposing a complete tool list, and logging tool parameters and results.
Why use it?
It defines consistent rules for connecting an AI agent to functions and recording each tool call for debugging.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/labilezhu/everlingo/chat-agent-tools-spec
Clone the repo
git clone --depth 1 https://github.com/labilezhu/everlingo

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for chat-agent-tools-spec

README.md
[![agentmods](https://agentmods.dev/badge/agents/labilezhu/everlingo/chat-agent-tools-spec.svg)](https://agentmods.dev/agents/labilezhu/everlingo/chat-agent-tools-spec)
Your own site
<a href="https://agentmods.dev/agents/labilezhu/everlingo/chat-agent-tools-spec"><img src="https://agentmods.dev/badge/agents/labilezhu/everlingo/chat-agent-tools-spec.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,905 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.04905
Opus 5 $0.00000 $0.02452
Sonnet 5 $0.00000 $0.00981
Haiku 4.5 $0.00000 $0.00490

Measured 5d ago against content hash c754bb44dee1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

chat-agent-tools-spec scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/impl-spec/agents/chat-agent-tools-spec.md · 322 lines

How it starts

The opening of the file, as written. The whole thing — 322 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Tools

langchain tool 实现

langchain tools 的写法:

@tool("$toolset_$function_name:")  # 即加入 toolset name 作为前缀
def search(query: str) -> str:
    """Search the web for information."""
    return f"Results for: {query}"

每个 toolset 应该对应一个独立的 python 文件。文件应该放于 /src/everlingo/tools 目录。如 /src/everlingo/tools/conf_manager.py

/src/everlingo/tools/tools.py 应该是一个可以获取所有 tools 的注册表。为 langchain agent 提供总的 tools 列表。

def get_tools() -> list:
       return [x,y,z]
   return []

tools 调用日志

每个 tool 的调用,均需要记录日志。logging level 为 debug。内容和格式如下:

tool_name: xyz , parameters: argName1=argValue1,... , return: xyz
  • loggereverlingo.toolssrc/everlingo/tools/__init__.pylog_tool_call 装饰器),经 everlingo 父 logger propagate 到 gateway 进程的 FileHandler,写入 $workspace/logs/everlingo.log
  • 默认 level:依赖 sys_setting.logging_setting.log_level,默认 debug;用户可在 everlingo.yaml 调高到 info/warn/error,此时 debug 日志被过滤(行为预期,非 bug)。
  • 装饰器位置src/everlingo/tools/__init__.py:log_tool_call,应应用于所有 toolset 工具的每个公开函数。voice_speak 为工厂函数 make_voice_speak_tool 生成的 inner function,同样需 @log_tool_call("voice_speak")

Toolsets(工具集)

以下包括多个 toolset(工具集)。

toolset → 后端依赖映射图([MCP] = 经 Vault MCP Server 进程间调用;[进程内] = gateway 进程内直接调用):

vars: {
  d2-config: {
    layout-engine: elk
    theme-id: 4
    dark-theme-id: 200
  }
}

direction: down

ca: "Chat Agent\nLLM 工具调用循环"

tools: "toolsets(src/everlingo/tools/,@log_tool_call 全量装饰)" {
  conf_manager: "conf_manager\nget_schema / get_config(只读)"
  clock_t: "clock\nget_datetime"
  user_doc: "user_doc\nuser_doc_get / user_doc_set"
  voice: "voice\nvoice_speak(立即返回 voice scheduled)"
  vault_mcp: "vault_mcp\nsearch / read / ls / find / grep(只读 ×5)"
  rme: "request_memory_extraction\ndrafts 累积,立即返回"
  mwa: "memory_writer_action\ndelete / edit(阻塞等待)"
  csiv: "copy_session_image_to_vault\n返回 markdown 相对路径"
}

yaml: "everlingo.yaml\neverlingo.example.yaml" { shape: page }
sysclock: "系统时钟(Shanghai timezone)"
usermd: "memory/USER.md(workspace 下)" { shape: page }
tts: "EdgeTTSProvider\nedge-tts 合成 mp3" { shape: cloud }
sound: "channel.send_sound\n后台线程 fire-and-forget"
mcpsrv: "Vault MCP Server\nIndexer 进程 FastMCP\nStreamable HTTP"
queue: "MemoryWriterAgent 队列" { shape: cylinder }
wact: "Writer execute_action_async\ndaemon thread 串行"
imgstore: "ImageStore" { shape: cylinder }
assets: "vault {md}.assets/ 目录\nEXIF/PNG 溯源元数据" { shape: cylinder }
logfile: "logs/everlingo.log(workspace 下)" { shape: page }

ca -> tools: "LLM 按意图选择工具"

tools.conf_manager -> yaml: "[进程内] 只读读取"
tools.clock_t -> sysclock: "[进程内] now()"
tools.user_doc -> usermd: "[进程内] 读 / 整体覆盖写\n成功后 bump_prompt_version"
tools.voice -> tts: "[进程内] synthesize(text, fmt=mp3)"
tts -> sound: "[进程内] 异步调度发送语音"
tools.vault_mcp -> mcpsrv: "[MCP] 长连接 Stream\nCHAT_AGENT_WANTED_TOOLS 子集" { style.stroke: "#4C9EF0"; style.stroke-width: 2 }
tools.rme -> queue: "[进程内] invoke() 末尾统一入队(异步)"
tools.mwa -> wact: "[进程内] 同步 Future 回传(30s 超时)"
tools.csiv -> imgstore: "[进程内] read_bytes(src_sha)"
imgstore -> assets: "save_vault_image 写入\n显式 src_resource_sha256"
tools -> logfile: "[进程内] debug 调用日志"

Read the full file on GitHub · 322 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 322 lines · 0 tokens per session scan A c754bb44dee1

Subscribe to this mod's changes

chat-agent-tools-spec is an agent published in the GitHub repository labilezhu/everlingo (12 stars, last pushed 11d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 4,905 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.