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.'
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
A direct command skips the review prompt. Inspect the source before running it.
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.'
version
2.21.1
alwaysApply
true
CloudBase Agent Python SDK
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.
When to use this skill
Use this skill for AI agent development when you need to:
Deploy AI agents as HTTP services with AG-UI protocol support
Build agent backends using LangGraph, CrewAI, or LlamaIndex frameworks
Create custom agent adapters implementing the AbstractAgent interface
Understand AG-UI protocol events and message streaming
Build production-ready agent servers with FastAPI
Do NOT use for:
Simple AI model calling without agent capabilities (use ai-model-* skills)
CloudRun backend services without agent features (use cloudrun-development skill)
TypeScript/JavaScript agent projects (use cloudbase-agent skill, refer to the ts/ sub-directory)
How to use this skill (for a coding agent)
Choose the right adapter
Use LangGraph adapter for stateful, graph-based workflows
Use CrewAI adapter for multi-agent collaboration patterns
Build custom adapter for specialized agent logic
Write agent code โ follow the adapter-specific doc from the Routing table
Deploy the agent server โ follow the blocking deployment pipeline in agent-deployment
Routing (Execution Order)
โ ๏ธ Deployment is a BLOCKING 4-step pipeline. Steps marked โ BLOCKING
must be completed AND verified before proceeding to the next step.
Do NOT call manageAgent until all blocking steps pass.
# server.py โ this pattern works with ANY adapterimport 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_agentdefcreate_agent() -> AgentCreatorResult:
agent = create_my_agent() # Your agent factoryreturn {"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")
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.*).
Import Note: All packages share the cloudbase_agent namespace:
# After installing cloudbase-agent-langgraph, import from cloudbase_agentfrom cloudbase_agent.langgraph import LangGraphAgent
from cloudbase_agent.server import AgentServiceApp
from cloudbase_agent.tools import create_bash_tool
Reference Documents
Based on what the user needs, read the corresponding reference document.
Only read the relevant reference โ don't load all of them.
Namespace Package: 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 ....
Observability Auto-Integration: Install cloudbase-agent-observability and tracing works automatically โ zero config needed.
Deploy with manageAgent: Always use the manageAgent MCP tool for CloudBase deployment. Follow the 4-step blocking pipeline in agent-deployment.