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.
npx agentmods add agents/xerrors/yuxi/agent-backend-developmentgit clone --depth 1 https://github.com/xerrors/YuxiWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.01212 |
| Opus 5 | $0.00000 | $0.00606 |
| Sonnet 5 | $0.00000 | $0.00242 |
| Haiku 4.5 | $0.00000 | $0.00121 |
Grade A, and why
agent-backend-development 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.
开发智能体后端
本页面向需要在 Yuxi 中新增或维护 Agent 后端的贡献者。它只讲代码装配;配置字段、权限和运行时上下文分别见配置智能体和Agent 运行时上下文。
后端放在哪里
随服务发布的 Agent 后端放在:
backend/package/yuxi/agents/buildin/<your_agent>/
├── __init__.py
├── context.py
└── graph.py
buildin 包会遍历包含 __init__.py 的子目录,发现并注册其中的 BaseAgent 子类。__init__.py 需要导出该类。
最小实现
from langchain.agents import create_agent
from yuxi.agents import BaseAgent, BaseContext, load_chat_model
from yuxi.agents.context import prepare_agent_runtime_context
class MyAgent(BaseAgent):
name = "我的智能体"
description = "用于示例的智能体后端"
context_schema = BaseContext
async def get_graph(self, context=None, **kwargs):
context = await prepare_agent_runtime_context(
context or self.context_schema(),
context_schema=self.context_schema,
)
return create_agent(
model=load_chat_model(fully_specified_name=context.model),
system_prompt=context.system_prompt,
checkpointer=await self._get_checkpointer(),
)
这个示例展示最小的 Context、模型、提示词和 PostgreSQL checkpoint 装配。真实后端还要根据需要接入文件 backend、工具、Skills、审批、Summary、用量和子智能体 middleware。
prepare_agent_runtime_context 会根据当前用户重新过滤资源,并在模型为空时补齐系统默认模型。不要在 get_graph() 中从浏览器输入、宿主机路径或数据库原始字段直接拼出可执行配置。
Context 和配置表单
需要让管理员或用户配置 Agent 行为时,在 context.py 扩展 BaseContext:
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"],
},
)
metadata 会影响 Agent 详情接口和 AgentRuntimeConfigForm。不要只在前端添加一个字段,也不要把运行期 ID、worker 身份和权限快照暴露成可保存配置。
新增字段后,沿下面的链路检查:
context_schema
→ get_configurable_items()
→ Agent 详情接口
→ 前端配置表单
→ config_json.context
→ get_graph(context)
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.
- 2d ago First seen · 115 lines · 0 tokens per session scan A d2ded4d987fc
agent-backend-development 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,212 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.
Other agents, from other repositories
txtify-qa
QA gatekeeper for Txtify. Use to run the full verification ladder on the current tree and report evidence — before merging, releasing, or when asked "does everything still work?".
agents
Agent 模块是系统的执行引擎,基于 LangGraph StateGraph 实现单个 Agent 的完整执行生命周期管理。.
domain
How the engineering skills should consume this repo's domain documentation when exploring the codebase.
2026-04-20-relay-handoff
Demo Agent Ada found that Relay parser failures were caused by missing fenced-code terminators in synthetic notes.
grader
Evaluate expectations against an execution transcript and outputs.
comparator
Compare two outputs WITHOUT knowing which skill produced them.