core-sdk
Build local mcp-agent apps with MCPApp, Agent, AgentSpec, AugmentedLLM, RequestParams, settings, secrets, decorators, and factory basics.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-08
- Stars
- ★ 11
- Forks
- 3
01 前言 Front Matter
- name
- core-sdk
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Build local mcp-agent apps with MCPApp, Agent, AgentSpec, AugmentedLLM, RequestParams, settings, secrets, decorators, and factory basics.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/api-reference.md10.5 KB
- 参考文档references/configuration.md8.8 KB
- 参考文档references/decorators-and-factory.md9.7 KB
- 参考文档references/troubleshooting.md10.2 KB
03 SKILL.md 正文
core-sdk
Use this sub-skill when the task is to create, configure, or debug a local mcp-agent application using the core Python SDK. It covers MCPApp, Agent, AgentSpec, AugmentedLLM, RequestParams, programmatic Settings, YAML config/secrets, local function tools, human-input hooks, and the basic agent factory helpers.
Start Here
- Read
references/api-reference.mdfor verified constructor signatures, lifecycle patterns, LLM attachment, provider/model selection, and request parameters. - Read
references/configuration.mdwhen the task involvesmcp_agent.config.yaml,mcp_agent.secrets.yaml,Settings(...), provider keys, or schema validation. - Read
references/decorators-and-factory.mdfor@app.tool,@app.async_tool, workflow decorator basics,AgentSpec,create_agent,create_llm, and agent-spec loading. - Read
references/troubleshooting.mdwhen imports, provider extras, secrets, YAML merging, server names, async lifecycle, decorators, orRequestParamsfail. - Run
scripts/check_core_sdk.py --helpto see the credential-free smoke checks; run it before blaming provider credentials or network access.
Core Workflow
- Create one
MCPAppper process, preferably with an explicitSettingsobject or explicit config path for deterministic runs. - Enter
async with app.run() as running_app:before using app context, configured server registry, logging, token counters, human-input hooks, or workflow decorators that depend on runtime context. - Define
Agent(name=..., instruction=..., server_names=[...], functions=[...], context=running_app.context)for local agents; attach a provider implementation withawait agent.attach_llm(...)only after provider package and credentials are available. - Use
RequestParams(...)per generation to set model, model preferences, temperature, token limits, tool filtering, history, iteration count, strict mode, and reasoning effort. - Keep provider keys in secrets or environment variables; keep reusable server/model defaults in config or programmatic
Settings.
Route Elsewhere
- Route workflow pattern selection, routers/orchestrators/parallel/deep workflow design, and durable workflow strategy to sibling
workflow-patterns. - Route MCP server exposure, server auth internals, FastMCP deployment, and app-as-server details to sibling
mcp-server-integration. - Route CLI commands, cloud deployment, and hosted operations to sibling
cli-cloud-operations. - Route Temporal worker operations and production durability to sibling
durable-execution. - Route tracing/exporter/provider-wrapper internals to sibling
observability-integrations.
Bundled Check
Use the smoke checker for local SDK validation without credentials or network:
python scripts/check_core_sdk.py
python scripts/check_core_sdk.py --provider openai
The default check imports core APIs, constructs programmatic settings, validates local function-tool annotations, registers decorators, creates an AgentSpec, and builds RequestParams. Provider checks only import the provider wrapper and report whether a key-shaped setting is present; they do not call external services.
04 同仓库更多 Skills
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
python-api
Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP/mAP semantics, and source-style import diagnostics.
file-evaluation
Folder-based PASCAL VOC AP/mAP evaluation from ground-truth and detection text files.
object-detection-metrics
Guides legacy Object-Detection-Metrics PASCAL VOC AP/mAP evaluation from detection text folders and direct Python API classes.
nx-workspace-patterns
Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.