- name
SKILL.md
Файл навыка остаётся в репозитории издателя.
Вставьте скопированную команду в терминал. Она установит этот SKILL.md в выбранного агента.
npx skills add TencentCloudBase/CloudBase-AI-Toolkit --skill py -a cursor -yВставьте скопированную команду в терминал. Она установит этот SKILL.md в выбранного агента.
npx skills add TencentCloudBase/CloudBase-AI-Toolkit --skill py -a claude-code -yВставьте скопированную команду в терминал. Она установит этот SKILL.md в выбранного агента.
npx skills add TencentCloudBase/CloudBase-AI-Toolkit --skill py -a codex -yВставьте скопированную команду в терминал. Она установит этот SKILL.md в выбранного агента.
npx skills add TencentCloudBase/CloudBase-AI-Toolkit --skill py -a grok -yОтправьте скопированное сообщение в чат Grok Bot. Бот загрузит этот SKILL.md с GitHub и добавит его к навыкам, общим для всех ваших ботов.
Install this skill: https://github.com/TencentCloudBase/CloudBase-AI-Toolkit/tree/HEAD/config/.claude/skills/cloudbase-agent/pyОт издателя
Build production-ready AI agent backends with multi-framework support, streaming protocol, rich tools, persistent memory, and full observability.
Note: This skill is for Python projects only.
Use this skill for AI agent development when you need to:
Do NOT use for:
ai-model-* skills)cloud-functions skill)cloudrun-development skill)cloudbase-agent skill, refer to the ts/ sub-directory)Choose the right adapter
Write agent code — follow the adapter-specific doc from the Routing table
Deploy the agent server — follow the blocking deployment pipeline in agent-deployment
⚠️ Deployment is a BLOCKING 4-step pipeline. Steps marked ✅ BLOCKING must be completed AND verified before proceeding to the next step. Do NOT call
manageAgentuntil all blocking steps pass.
Prerequisites: Python >= 3.10 is required.
1. Install dependencies (pick ONE adapter):
# Option A: LangGraph-based agent
pip install cloudbase-agent-langgraph
# Option B: CrewAI-based agent
pip install cloudbase-agent-crewai
# Option C: Custom / minimal
pip install cloudbase-agent-server
2. Create server entry point:
# server.py — this pattern works with ANY adapter
import os
from dotenv import load_dotenv
load_dotenv()
from cloudbase_agent.server import AgentServiceApp, AgentCreatorResult
# Import your agent (framework-specific, see adapter docs)
# from agents.chat.agent import create_my_agent
def create_agent() -> AgentCreatorResult:
agent = create_my_agent() # Your agent factory
return {"agent": agent}
app = AgentServiceApp()
app.set_cors_config(allow_origins=["*"])
if __name__ == "__main__":
port = int(os.environ.get("SCF_RUNTIME_PORT", "9000"))
app.run(create_agent, port=port, host="0.0.0.0")
3. Deploy to CloudBase:
Follow the 4-step deployment pipeline in agent-deployment.
Client (React / MiniProgram / curl)
│ HTTP POST + SSE streaming
▼
┌─────────────────────────────────────────────┐
│ AgentServiceApp (FastAPI) │
│ ├─ /send-message ← AG-UI SSE │
│ ├─ /chat/completions ← OpenAI-compat │
│ └─ Middleware chain (onion model) │
├─────────────────────────────────────────────┤
│ Agent Layer │
│ ├─ LangGraphAgent ├─ CrewAIAgent │
│ ├─ LlamaIndexAgent ├─ CozeAgent/DifyAgent │
│ └─ BaseAgent (extend for custom) │
├──────────────────┬──────────────────────────┤
│ Tools │ Storage │
│ Bash/FS/Code/MCP│ Memory + LongTermMemory │
├─────────────────────────────────────────────┤
│ Observability (OpenTelemetry + Langfuse) │
└─────────────────────────────────────────────┘
CloudBase Agent Python SDK is published to PyPI as separate packages. Note: PyPI package names use hyphens (cloudbase-agent-*), and Python imports use the same namespace (cloudbase_agent.*).
# Core + Server + LangGraph (most common)
pip install cloudbase-agent-langgraph
# Individual packages
pip install cloudbase-agent-core # Core framework
pip install cloudbase-agent-server # FastAPI server
pip install cloudbase-agent-langgraph # LangGraph integration
pip install cloudbase-agent-tools # Tool system
pip install cloudbase-agent-storage # Memory/Storage
pip install cloudbase-agent-observability # OpenTelemetry/Langfuse
pip install cloudbase-agent-coze # Coze platform
pip install cloudbase-agent-crewai # CrewAI integration
Import Note: All packages share the cloudbase_agent namespace:
# After installing cloudbase-agent-langgraph, import from cloudbase_agent
from cloudbase_agent.langgraph import LangGraphAgent
from cloudbase_agent.server import AgentServiceApp
from cloudbase_agent.tools import create_bash_tool
Based on what the user needs, read the corresponding reference document. Only read the relevant reference — don't load all of them.
# Server
from cloudbase_agent.server import AgentServiceApp, AgentCreatorResult
from cloudbase_agent.server import create_send_message_adapter, create_openai_adapter
from cloudbase_agent.server import RunAgentInput, OpenAIChatCompletionRequest
# Agents
from cloudbase_agent.langgraph import LangGraphAgent
from cloudbase_agent.crewai import CrewAIAgent
# Tools
from cloudbase_agent.tools import create_bash_tool, create_read_tool, create_write_tool
from cloudbase_agent.tools import MCPToolkit, CloudBaseMCPServer, CloudBaseTool
from cloudbase_agent.tools import tool, BaseTool # custom tools
# Storage
from cloudbase_agent.storage import InMemoryMemory, TDAIMemory
from cloudbase_agent.storage import TDAILongTermMemory, Mem0LongTermMemory
from cloudbase_agent.langgraph import TDAICheckpointSaver, TDAIStore
# Observability
from cloudbase_agent.observability import ConsoleTraceConfig, OTLPTraceConfig, setup_observability
# Schemas
from cloudbase_agent.schemas import Message, MessageRole, StreamEvent, EventType
my-agent-project/
├── agents/
│ ├── agentic_chat/agent.py # build_workflow() → agent instance
│ ├── human_in_the_loop/agent.py
│ └── __init__.py
├── server.py # Main entry: AgentServiceApp().run(...)
├── scf_bootstrap # CloudBase startup script (required for deployment)
├── .env # OPENAI_API_KEY, etc.
└── requirements.txt
/chat/completions).yield — pre-yield = pre-processing, post-yield = post-processing (onion model).cloudbase_agent spans multiple PyPI packages (cloudbase-agent-core, cloudbase-agent-server, cloudbase-agent-langgraph, etc.). PyPI names use hyphens, but all imports use from cloudbase_agent.xxx import ....cloudbase-agent-observability and tracing works automatically — zero config needed.manageAgent MCP tool for CloudBase deployment. Follow the 4-step blocking pipeline in agent-deployment.Build production-ready AI agent backends using the CloudBase Agent Python SDK — create agents with LangGraph/CrewAI/LlamaIndex, serve them via FastAPI with AG-UI protocol streaming + OpenAI-compatible
---name: cloudbase-agent-pythondescription: Build production-ready AI agent backends using the CloudBase Agent Python SDK — create agents with…---# config/.claude/skills/cloudbase-agent/py/skill.mdОбзор
Build production-ready AI agent backends using the CloudBase Agent Python SDK — create agents with LangGraph/CrewAI/LlamaIndex, serve them via FastAPI with AG-UI protocol streaming + OpenAI-compatible endpoints, add tools (bash, filesystem, MCP, code execution), memory (in-memory, TDAI, MySQL, MongoDB), observability (OpenTelemetry/Langfuse), and middleware (auth, logging). Use this skill when the user wants to create an AI agent server, build a chatbot backend, set up human-in-the-loop workflows, integrate MCP tools, add agent observability, or deploy an agent API — even if they don't explicitly mention 'CloudBase Agent.'
FAQ
Скачайте config/.claude/skills/cloudbase-agent/py/skill.md у издателя или скопируйте путь и откройте репозиторий. PlugMCP только показывает навык в каталоге и не хранит файл.
Издатель хранит его в https://github.com/TencentCloudBase/CloudBase-AI-Toolkit.
Claude, Cursor, Codex и Grok Build могут читать SKILL.md, который вы добавляете из репозитория издателя. Grok Bot устанавливает его, когда вы отправляете в чат ссылку на папку навыка на GitHub.