mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-14 05:23:14 +08:00
初始化:独立 oclaw 仓库首提交
- 在 oclaw/ 下重新初始化 Git 仓库 - 补齐子仓库 .gitignore,避免提交本地运行态数据(_local、node_modules、logs 等) - 提交当前工程代码与配置 Made-with: Cursor
This commit is contained in:
commit
ba3836f00f
579 changed files with 83112 additions and 0 deletions
45
agents/network_ops_agent.py
Normal file
45
agents/network_ops_agent.py
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from oclaw.chat.agent import Agent
|
||||
from oclaw.platform.persistence.sqlite_store import SqliteStore
|
||||
from oclaw.prompts.loader import render_openclaw_prompt
|
||||
from oclaw.tools import default_registry
|
||||
|
||||
NETWORK_SYSTEM_PROMPT_ZH = render_openclaw_prompt("roles/specialists/ops/system.md", strict=True)
|
||||
|
||||
|
||||
class NetworkOpsAgent(Agent):
|
||||
"""网络运维专家 Agent:固定专家提示词与专家工具目录。"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
store: SqliteStore,
|
||||
model: Any,
|
||||
lang: str = "zh",
|
||||
llm_profile_mode: str | None = None,
|
||||
system_prompt: str | None = None,
|
||||
policy_session_id: str | None = None,
|
||||
path_policy_tenant_id: str | None = None,
|
||||
path_policy_user_id: str | None = None,
|
||||
) -> None:
|
||||
tools = default_registry(
|
||||
expert="network_ops",
|
||||
policy_session_id=policy_session_id,
|
||||
path_policy_tenant_id=path_policy_tenant_id,
|
||||
path_policy_user_id=path_policy_user_id,
|
||||
store=store,
|
||||
)
|
||||
super().__init__(
|
||||
store=store,
|
||||
tools=tools,
|
||||
model=model,
|
||||
system_prompt=(system_prompt or render_openclaw_prompt("roles/specialists/ops/system.md", strict=True)),
|
||||
lang=lang,
|
||||
llm_profile_mode=llm_profile_mode,
|
||||
)
|
||||
|
||||
|
||||
__all__ = ["NetworkOpsAgent", "NETWORK_SYSTEM_PROMPT_ZH"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue