cloudbase-agent-python
FreeNo executable scriptsNot checkedBuild production-ready AI agent backends using the CloudBase Agent Python SDK — create agents with LangGraph/CrewAI/LlamaIndex, serve them via FastAPI with…
by bighardperson★ 71 GitHub starsAbout this skill
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) - CloudBase cloud functions (use
cloud-functionsskill) - CloudRun backend services without agent features (use
cloudrun-developmentskill) - TypeScript/JavaScript agent projects (use
cloudbase-agentskill, refer to thets/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
manageAgentuntil all blocking steps pass.
| Step | Task | Document | Blocking? |
|---|---|---|---|
| 0 | Choose adapter & write agent code | See "Adapter Selection" below | — |
| 1 | Ensure Python 3.10 | agent-deployment § Step 1 | ✅ BLOCKING |
| 2 | Build env/ (one-shot) | agent-deployment § Step 2 | ✅ BLOCKING |
| 3 | Verify env/ integrity | agent-deployment § Step 3 | ✅ BLOCKING |
| 4 | Deploy with manageAgent | agent-deployment § Step 4 | — |
Adapter Selection (Step 0)
| Framework | Read | Install |
|---|---|---|
| LangGraph (stateful graphs) | adapter-langgraph | cloudbase-agent-langgraph |
| CrewAI (multi-agent crews) | adapter-development | cloudbase-agent-crewai |
| Coze platform | adapter-coze | cloudbase-agent-coze |
| Custom / raw FastAPI | server-quickstart + adapter-development | cloudbase-agent-server |
Additional References (read on demand, NOT required for deployment)
| Task | Read |
|---|---|
| Server setup, middleware, multi-agent, CORS | server-quickstart |
| Authentication and user context | authentication |
Quick Start (Framework-Agnostic)
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.
Architecture
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) │
└──────────────
Install cloudbase-agent-python in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
FAQ
What does the cloudbase-agent-python skill do?
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.'
How do I install the cloudbase-agent-python skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the cloudbase-agent-python skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
by Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
by Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
by Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
by Anthropic