界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
效率与协作 · SKILL.md

agent-core

agent-core

【效率与协作】Routes local OpenHands SDK agent construction, LLM configuration, conversation lifecycle, callbacks, persistence, interruption, condensation, and title-generation workflows.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: agent-core description: "Routes local OpenHands SDK agent construction, LLM configuration, conversation lifecycle, callbacks, persistence, interruption, condensation, and title-generation workflows." disable-model-invocation: true metadata: disco-role: operating license: MIT

Agent Core

Use this sub-skill for the local SDK path: creating LLM, Agent, Conversation, LocalConversation, RemoteConversation, and AgentContext objects; configuring callbacks, tokens, tags, persistence, interrupts, condensation, and model/provider behavior; and understanding how conversations move through the SDK.

What this route owns

  • LLM construction, provider selection, and model settings.
  • Agent creation and tool lists, including mcp_config, system_prompt, condenser, and critic.
  • Conversation factory routing to LocalConversation or RemoteConversation.
  • Conversation callbacks, token callbacks, ConversationState, persistence, tags, and observability metadata.
  • Interrupt and pause behavior, condensation recovery, title generation, and async/sync parity.

Start here

Read references/api-reference.md for the concrete constructor signatures and major attributes. Read references/workflows.md for common local and remote conversation flows. Read references/troubleshooting.md when a conversation fails, pauses unexpectedly, or runs with the wrong model/provider.

Typical triggers

  • "Create an agent that edits files and runs shell commands."
  • "Use a local conversation with custom callbacks."
  • "Why did the run pause or get interrupted?"
  • "How do I attach persistence, tags, or a custom condenser?"
  • "How do I generate or rename a conversation title?"

Cross-links

Minimum workflow

  1. Choose a model and build LLM.
  2. Build an Agent with the desired tools, skills, and optional MCP or condenser settings.
  3. Create a Conversation with a local path or Workspace.
  4. Add callbacks or tags if the use case needs observability.
  5. Call send_message() and run() or use the async methods in a matching async flow.
  6. Use interrupt()/close()/persistence APIs when the conversation must stop or resume later.

Do not bury these details here

  • Full API tables belong in references/api-reference.md.
  • End-to-end examples belong in references/workflows.md.
  • Error handling and recovery belong in references/troubleshooting.md.
我的收藏