AGENT SKILL

core-sdk

Build local mcp-agent apps with MCPApp, Agent, AgentSpec, AugmentedLLM, RequestParams, settings, secrets, decorators, and factory basics.

License 许可
Apache-2.0
最近更新
2026-09-03
Stars
★ 351
Forks
27

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 资源文件 5

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

  1. Read references/api-reference.md for verified constructor signatures, lifecycle patterns, LLM attachment, provider/model selection, and request parameters.
  2. Read references/configuration.md when the task involves mcp_agent.config.yaml, mcp_agent.secrets.yaml, Settings(...), provider keys, or schema validation.
  3. Read references/decorators-and-factory.md for @app.tool, @app.async_tool, workflow decorator basics, AgentSpec, create_agent, create_llm, and agent-spec loading.
  4. Read references/troubleshooting.md when imports, provider extras, secrets, YAML merging, server names, async lifecycle, decorators, or RequestParams fail.
  5. Run scripts/check_core_sdk.py --help to see the credential-free smoke checks; run it before blaming provider credentials or network access.

Core Workflow

  • Create one MCPApp per process, preferably with an explicit Settings object 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 with await 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

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351