agents-config

A reference for configuring software agents: programs that use a language model, tools and instructions to perform tasks. It explains how saved settings become the fields shown in an agent's configuration page and how those settings affect a run.

In plain words
What is it for?
Use it when adding or changing agent settings such as the model, instructions, tools, knowledge sources, connected services, skills, permissions and conversation summarisation.
Why use it?
It gives developers one place to understand which settings control an agent and how the configuration page is generated. This reduces the risk of maintaining mismatched settings in the front end and back end.

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/xerrors/yuxi/agents-config
Clone the repo
git clone --depth 1 https://github.com/xerrors/Yuxi
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 1,137 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 $0.00000 $0.01137
Opus 5 $0.00000 $0.00568
Sonnet 5 $0.00000 $0.00227
Haiku 4.5 $0.00000 $0.00114

Measured yesterday against content hash 504f2e22981e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agents-config 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 yesterday.

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/agents/agents-config.md · 101 lines

How it starts

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

配置智能体

本页是智能体配置参考,说明页面上的字段如何进入一次运行。新增智能体后端的代码结构见开发智能体后端;只使用现成智能体时,从快速开始开始。

配置模型

对象 负责什么
Agent 数据库中的智能体资源,保存名称、slug、共享范围和持久化配置
BaseAgent 代码中的后端类型,声明 context_schemaget_graph()
BaseContext 配置字段和运行时输入的 Schema
config_json.context 当前 Agent 保存的配置值
Graph / middleware 根据 Context 组合模型、工具、文件和扩展能力

内置 ChatbotAgent 用于普通对话,SubAgentBackend 用于被主智能体委派的任务。子智能体的配置入口与普通智能体相同。

配置页面从哪里来

BaseContext 的 dataclass 字段和 metadata 会生成配置项描述,前端不再维护一份独立字段清单:

Context 字段
  → get_configurable_items()
  → Agent 详情接口
  → AgentRuntimeConfigForm
  → config_json.context

metadata 可以定义展示名称、说明、控件类型、选项和角色权限。运行期 ID、owner 和内部派生值应隐藏,不作为用户配置。

基础字段

字段 作用
system_prompt 智能体角色和行为说明
model 主模型;留空时使用系统默认模型
tool_approval_mode defaultalways_trust;仅管理员可配置
tools 可使用的内置工具
knowledges 可检索的知识库范围
mcps 可使用的已启用 MCP 服务器
skills 可见并可激活的 Skill
preload_skills 从首轮请求加载完整说明和依赖的 Skill 子集
summary_thresholdsummary_keep_messages 上下文压缩阈值和保留消息数
summary_promptsummary_tool_result_token_limitsummary_l2_trigger_ratio 摘要提示词、工具结果预览上限和 L2 触发比例
max_execution_stepsmodel_retry_times 单次运行步数和模型重试次数

资源选择语义

toolsknowledgesmcpsskills 未配置时,运行时使用当前用户可访问的全部资源;显式保存空列表表示不启用该类资源;显式填写列表则只使用列表中仍然可访问的资源。

ChatBotContext.subagents 未配置或保存空列表时,使用当前用户可见的全部子智能体;显式选择后才收窄范围。子智能体不能继续调用下一层子智能体。

这些字段只会缩小当前用户已经拥有的权限。LITE 模式会清空知识库资源,不会因为 Agent 配置保留了知识库 ID 而重新启用知识能力。

自定义 Context 字段

需要让用户配置额外行为时,扩展 Context,让后端和前端沿同一 Schema 工作:

from dataclasses import dataclass, field
from yuxi.agents import BaseContext


@dataclass(kw_only=True)
class MyAgentContext(BaseContext):
    response_style: str = field(
        default="concise",
        metadata={
            "name": "回答风格",
            "description": "控制回答的详细程度",
            "type": "string",
            "options": ["concise", "detailed"],
        },
    )

Read the full file on GitHub · 101 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. yesterday First seen · 101 lines · 0 tokens per session scan A 504f2e22981e

Subscribe to this mod's changes

agents-config is an agent published in the GitHub repository xerrors/Yuxi (6,591 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,137 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.