Warden Agent Builder
Build and deploy LangGraph agents for Warden Protocol's Agentic Wallet ecosystem.
⚠️ IMPORTANT: About Example Agents
The Warden community repository contains example agents for learning, not templates to recreate:
- - Weather Agent - Study this to learn simple data fetching patterns
- CoinGecko Agent - Study this to learn Schema-Guided Reasoning (SGR)
- Portfolio Agent - Study this to learn complex multi-source integration
DO NOT BUILD THESE AGENTS - they already exist. Instead:
- 1. Study their code to understand patterns
- Learn from their architecture and workflows
- Build something NEW and original for the incentive programme
Your agent must be unique and solve a different problem to be eligible for the incentive programme.
Overview
Warden Protocol is an "Agentic Wallet for the Do-It-For-Me economy" with an active Agent Builder Incentive Programme open to OpenClaw agents that deploy to Warden. All agents must be LangGraph-based and API-accessible.
Key Resources:
- - Community Agents Repository: https://github.com/warden-protocol/community-agents
- Documentation: https://docs.wardenprotocol.org
- Discord: #developers channel for support
Requirements Checklist
Before building, ensure your agent meets these mandatory requirements:
✓ Framework: Built with LangGraph (TypeScript or Python)
✓ Deployment: LangSmith Deployments OR custom infrastructure
✓ Access: API-accessible (no UI required - Warden provides UI)
✓ Isolation: One agent per LangGraph instance
✓ Security Limitations (Phase 1):
- Cannot access user wallets
- Cannot store data on Warden infrastructure
✓ Functionality: Can implement any workflow:
- Web3/Web2 automation
- API integrations
- Database connections
- External tool interactions
Understanding the Example Agents
The community-agents repository contains reference examples to learn from, NOT templates to recreate:
Example Agent 1: LangGraph Quick Start (Study for Basics)
Location:
agents/langgraph-quick-start (TypeScript) or
agents/langgraph-quick-start-py (Python)
Learn: LangGraph fundamentals, minimal agent structure
Study: Single-node chatbot with OpenAI integration
CODEBLOCK0
Example Agent 2: Weather Agent (Study for Structure)
Location:
agents/weather-agent
Learn: Simple data fetching, API integration, user-friendly responses
Study:
- - How to fetch data from external APIs (WeatherAPI)
- Processing and formatting results
- Clear scope and structure
⚠️ DO NOT BUILD: This already exists. Study it, then build something NEW.
Example Agent 3: CoinGecko Agent (Study for SGR Pattern)
Location:
agents/coingecko-agent
Learn: Schema-Guided Reasoning, complex workflows
Study:
- - 5-step SGR workflow: Validate → Extract → Fetch → Validate → Analyze
- Comparative analysis patterns
- Error handling and data validation
⚠️ DO NOT BUILD: This already exists. Study the pattern, apply to new use cases.
Example Agent 4: Portfolio Analysis Agent (Study for Advanced Patterns)
Location:
agents/portfolio-agent
Learn: Multi-source data synthesis, production architecture
Study:
- - Integrating multiple APIs (CoinGecko + Alchemy)
- Multi-chain support (EVM and Solana)
- Complex SGR workflows
- Comprehensive reporting
⚠️ DO NOT BUILD: This already exists. Study the architecture for your own complex agent.
IMPORTANT: Build Something NEW
These examples exist to teach patterns and best practices. For the incentive programme, you MUST create an original, unique agent that solves a different problem. Do NOT simply recreate the Weather Agent, CoinGecko Agent, or Portfolio Agent.
Building Your Original Agent
Step 1: Study Examples and Choose Your Approach
DO NOT clone an example to modify it. Instead:
- 1. Study the examples to understand patterns:
- Simple data fetching → Study Weather Agent
- Complex analysis → Study CoinGecko Agent
- Multi-source synthesis → Study Portfolio Agent
- 2. Identify YOUR unique use case:
- What problem will your agent solve?
- What APIs or data sources will it use?
- What makes it different from existing agents?
- 3. Plan your agent's workflow:
- Simple request-response?
- Schema-Guided Reasoning (SGR)?
- Multi-step analysis?
Step 2: Initialize Your NEW Agent
Use the initialization script to create a fresh project:
CODEBLOCK1
This creates a clean starting point, not a copy of existing agents.
Step 3: Understand LangGraph Agent Structure
Every LangGraph agent follows this basic structure:
CODEBLOCK2
Key files to implement:
- -
graph.ts/py - Define your workflow (validate → process → respond) - INLINECODE6 - Implement your core logic
- INLINECODE7 - Integrate external APIs specific to YOUR agent's purpose
Step 4: Implement Your Custom Agent Logic
Study patterns from examples, apply to YOUR use case:
If building a simple data fetcher (like Weather Agent pattern):
CODEBLOCK3
If building complex analysis (like CoinGecko Agent pattern - SGR):
CODEBLOCK4
Key Principles:
- 1. Keep workflows linear and predictable
- Validate inputs at each stage
- Handle errors gracefully
- Use OpenAI for natural language generation
- Structure responses consistently
CRITICAL: This should be YOUR implementation solving YOUR problem, not a copy of the example agents.
Step 5: Configure Environment
Create .env file:
CODEBLOCK5
Getting LangSmith API Key:
- 1. Create account at https://smith.langchain.com
- Navigate to Settings → API Keys
- Create new API key
- Add to
.env file
Update langgraph.json:
CODEBLOCK6
Step 6: Test Locally
CODEBLOCK7
Test your agent's API:
CODEBLOCK8
Deployment Options
Option 1: LangSmith Deployments (Recommended)
Pros: Fastest, simplest, managed infrastructure
Requirements: LangSmith API key
Steps:
CODEBLOCK9
Your agent receives:
- - API endpoint URL
- Automatic authentication (uses your LangSmith API key)
- Automatic scaling and monitoring
Authentication for API calls:
When calling your deployed agent, include your LangSmith API key:
CODEBLOCK10
Option 2: Self-Hosted Infrastructure
Pros: Full control over runtime
Requirements:
- - Docker container hosting
- Exposed API endpoint
- SSL certificate (HTTPS)
- Monitoring and logging
Basic Docker Setup:
CODEBLOCK11
Deploy and note your:
- - API URL: INLINECODE11
- API Key: Generated for authentication
Register with Warden Studio
Once your agent is deployed and reachable via HTTPS, register it in Warden Studio:
- 1. Provide API Details:
- API URL
- API key
- 2. Add Metadata:
- Agent name
- Description
- Skills/capabilities list
- Avatar image
- 3. Publish: Agent appears in Warden's Agent Hub for millions of users
No additional setup required - your API-accessible agent is ready!
Next step (separate skill):
If the user asks to publish in Warden Studio or needs guided UI steps, switch to the OpenClaw skill "Deploy Agent on Warden Studio":
https://www.clawhub.ai/Kryptopaid/warden-studio-deploy
Best Practices
1. Agent Design
- - Study the Weather Agent structure to learn patterns
- Use Schema-Guided Reasoning for complex workflows
- Keep responses concise and actionable
- Handle API failures gracefully
- Validate all inputs
2. API Integration
- - Use environment variables for API keys
- Implement rate limiting
- Cache responses when appropriate
- Log errors for debugging
- Return structured JSON responses
3. Testing
- - Test locally before deploying
- Verify all API endpoints work
- Test edge cases and errors
- Ensure responses are user-friendly
- Validate against Warden requirements
4. Documentation
- - Write clear README with:
- Agent purpose and capabilities
- Required API keys
- Setup instructions
- Example queries
- Known limitations
Common Patterns
Pattern 1: Simple Data Fetcher
CODEBLOCK12
Pattern 2: Multi-Step Analysis
CODEBLOCK13
Pattern 3: Comparative Analysis
CODEBLOCK14
Troubleshooting
Common Issues
"Agent not accessible via API"
- - Verify deployment completed successfully
- Check firewall/security group settings
- Ensure API endpoint is publicly accessible
- Test with curl or Postman
"LangGraph errors during build"
- - Verify Node.js version (18+) or Python (3.11+)
- Check all dependencies installed
- Validate langgraph.json syntax
- Review error logs in deployment console
"OpenAI API errors"
- - Verify API key is valid
- Check rate limits not exceeded
- Ensure sufficient credits
- Review error messages for details
"Agent responses are slow"
- - Optimize API calls (parallelize where possible)
- Implement caching for repeated queries
- Reduce LLM token usage
- Consider upgrading infrastructure
Incentive Programme Tips
The incentive programme is open to OpenClaw agents that deploy to Warden.
- 1. Be Original: Create something NEW that doesn't exist yet
- Don't recreate Weather Agent, CoinGecko Agent, or Portfolio Agent
- Study their patterns, apply to different problems
- 2. Solve Real Problems: Focus on useful, unique functionality
- What gap exists in the Warden ecosystem?
- What would users actually want?
- 3. Start Simple: Better to do one thing exceptionally well
- Don't try to build everything at once
- Simple, focused agents often win
- 4. Quality Over Features: Reliability beats complexity
- Test thoroughly
- Handle errors gracefully
- Provide clear, helpful responses
- 5. Study the Examples: Learn patterns, don't copy implementations
- Weather Agent → Simple data fetching pattern
- CoinGecko Agent → SGR workflow pattern
- Portfolio Agent → Multi-source integration pattern
- 6. Document Well: Clear README with examples and setup instructions
- 7. Join Discord: Get feedback in #developers channel before submitting
Example Agent Ideas (Build These!)
These are NEW agent ideas that don't exist yet in the Warden ecosystem. Build one of these (or create your own unique idea):
Web3 Use Cases:
- - Gas price optimizer (predict best times to transact)
- NFT rarity analyzer (evaluate NFT traits and rarity scores)
- DeFi yield comparator (compare yields across protocols)
- Wallet health checker (analyze wallet security and diversification)
- Transaction explainer (decode and explain complex transactions)
- Token price alerts (customizable price movement notifications)
- Smart contract auditor (basic security checks)
- Liquidity pool finder (identify best liquidity opportunities)
- Bridge fee comparator (find cheapest cross-chain bridges)
- Airdrop tracker (find and track airdrop eligibility)
General Use Cases:
- - Crypto news aggregator (filter and summarize crypto news)
- Research assistant (gather and analyze crypto research)
- Regulatory tracker (track crypto regulations by region)
- Data visualizer (create charts from on-chain data)
- API orchestrator (combine multiple crypto data sources)
- Workflow automator (automate common crypto tasks)
Remember: These are IDEAS for new agents. Study the example agents (Weather, CoinGecko, Portfolio) to learn patterns, then build something from this list or create your own unique concept.
Additional Resources
Documentation:
- - LangGraph TypeScript Guide: INLINECODE12
- LangGraph Python Guide: INLINECODE13
- Deployment Guide: INLINECODE14
Example Agents:
- - Weather Agent README: INLINECODE15
- CoinGecko Agent README: INLINECODE16
- Portfolio Agent README: INLINECODE17
Support:
- - Discord: #developers channel
- GitHub Issues: https://github.com/warden-protocol/community-agents/issues
- Documentation: https://docs.wardenprotocol.org
Quick Reference Commands
CODEBLOCK15
Success Checklist
Before submitting to incentive programme:
- - [ ] Agent built with LangGraph
- [ ] API accessible and tested
- [ ] One agent per LangGraph instance
- [ ] No wallet access or data storage (Phase 1)
- [ ] Clear documentation in README
- [ ] Environment variables properly configured
- [ ] Error handling implemented
- [ ] Tested with various inputs
- [ ] Unique and useful functionality
- [ ] Ready for Warden Studio registration
Warden Agent Builder
为Warden Protocol的Agentic Wallet生态系统构建和部署LangGraph代理。
⚠️ 重要提示:关于示例代理
Warden社区仓库包含用于学习的示例代理,而非可供复制的模板:
- - 天气代理 - 学习此代理以了解简单的数据获取模式
- CoinGecko代理 - 学习此代理以了解模式引导推理(SGR)
- 投资组合代理 - 学习此代理以了解复杂的多源集成
不要构建这些代理——它们已经存在。相反:
- 1. 学习它们的代码以理解模式
- 借鉴它们的架构和工作流程
- 构建全新且原创的内容以参与激励计划
您的代理必须独特且解决不同的问题,才有资格参与激励计划。
概述
Warden Protocol是一个面向替我完成经济的Agentic Wallet,拥有活跃的代理构建者激励计划,面向部署到Warden的OpenClaw代理。所有代理必须基于LangGraph且可通过API访问。
关键资源:
- - 社区代理仓库:https://github.com/warden-protocol/community-agents
- 文档:https://docs.wardenprotocol.org
- Discord:#developers频道获取支持
需求检查清单
在构建之前,确保您的代理满足这些强制性要求:
✓ 框架:使用LangGraph构建(TypeScript或Python)
✓ 部署:LangSmith部署或自定义基础设施
✓ 访问:可通过API访问(无需UI——Warden提供UI)
✓ 隔离:每个LangGraph实例一个代理
✓ 安全限制(第一阶段):
- 不能访问用户钱包
- 不能在Warden基础设施上存储数据
✓ 功能:可实现任何工作流程:
- Web3/Web2自动化
- API集成
- 数据库连接
- 外部工具交互
理解示例代理
community-agents仓库包含参考示例供学习,而非可供复制的模板:
示例代理1:LangGraph快速入门(学习基础知识)
位置:agents/langgraph-quick-start(TypeScript)或agents/langgraph-quick-start-py(Python)
学习内容:LangGraph基础、最小代理结构
研究内容:集成OpenAI的单节点聊天机器人
bash
git clone https://github.com/warden-protocol/community-agents.git
cd community-agents/agents/langgraph-quick-start
示例代理2:天气代理(学习结构)
位置:agents/weather-agent
学习内容:简单数据获取、API集成、用户友好响应
研究内容:
- - 如何从外部API(WeatherAPI)获取数据
- 处理和格式化结果
- 清晰的范围和结构
⚠️ 不要构建:此代理已存在。学习它,然后构建新的内容。
示例代理3:CoinGecko代理(学习SGR模式)
位置:agents/coingecko-agent
学习内容:模式引导推理、复杂工作流程
研究内容:
- - 5步SGR工作流程:验证→提取→获取→验证→分析
- 比较分析模式
- 错误处理和验证
⚠️ 不要构建:此代理已存在。学习模式,应用于新的用例。
示例代理4:投资组合分析代理(学习高级模式)
位置:agents/portfolio-agent
学习内容:多源数据综合、生产架构
研究内容:
- - 集成多个API(CoinGecko + Alchemy)
- 多链支持(EVM和Solana)
- 复杂SGR工作流程
- 全面报告
⚠️ 不要构建:此代理已存在。为自己的复杂代理学习架构。
重要提示:构建全新的内容
这些示例的存在是为了教授模式和实践。对于激励计划,您必须创建一个原创、独特的代理,解决不同的问题。不要简单地重新创建天气代理、CoinGecko代理或投资组合代理。
构建您的原创代理
第1步:学习示例并选择您的方法
不要克隆示例进行修改。 相反:
- 1. 学习示例以理解模式:
- 简单数据获取→学习天气代理
- 复杂分析→学习CoinGecko代理
- 多源综合→学习投资组合代理
- 2. 确定您独特的用例:
- 您的代理将解决什么问题?
- 它将使用哪些API或数据源?
- 它与现有代理有何不同?
- 3. 规划代理的工作流程:
- 简单的请求-响应?
- 模式引导推理(SGR)?
- 多步分析?
第2步:初始化您的新代理
使用初始化脚本创建新项目:
bash
创建您独特的代理
python scripts/init-agent.py my-unique-agent \
--template typescript \
--description 描述您的代理的功能
导航到项目
cd my-unique-agent
安装依赖
npm install # TypeScript
或
pip install -r requirements.txt # Python
这会创建一个干净的起点,而非现有代理的副本。
第3步:理解LangGraph代理结构
每个LangGraph代理遵循以下基本结构:
your-agent/
├── src/
│ ├── agent.ts/py # 主要代理逻辑(您的代码)
│ ├── graph.ts/py # LangGraph工作流程定义(您的代码)
│ └── tools.ts/py # 工具实现(您的代码)
├── package.json / requirements.txt
├── langgraph.json # LangGraph配置
└── README.md
需要实现的关键文件:
- - graph.ts/py - 定义您的工作流程(验证→处理→响应)
- agent.ts/py - 实现您的核心逻辑
- tools.ts/py - 集成特定于您代理目的的外部API
第4步:实现您的自定义代理逻辑
从示例中学习模式,应用于您的用例:
如果构建简单的数据获取器(如天气代理模式):
typescript
// 定义工作流程
const workflow = new StateGraph({
channels: agentState
})
.addNode(fetch, fetchYourData) // 您的API
.addNode(process, processYourData) // 您的逻辑
.addNode(respond, generateResponse);
workflow
.addEdge(START, fetch)
.addEdge(fetch, process)
.addEdge(process, respond)
.addEdge(respond, END);
如果构建复杂分析(如CoinGecko代理模式 - SGR):
typescript
// 定义5步SGR工作流程
const workflow = new StateGraph({
channels: agentState
})
.addNode(validate, validateYourInput) // 您的验证
.addNode(extract, extractYourParams) // 您的提取
.addNode(fetch, fetchYourData) // 您的API
.addNode(analyze, analyzeYourData) // 您的分析
.addNode(generate, generateYourResponse); // 您的格式化
workflow
.addEdge(START, validate)
.addEdge(validate, extract)
.addEdge(extract, fetch)
.addEdge(fetch, analyze)
.addEdge(analyze, generate)
.addEdge(generate, END);
关键原则:
- 1. 保持工作流程线性且可预测
- 在每个阶段验证输入
- 优雅地处理错误
- 使用OpenAI进行自然语言生成
- 一致地结构化响应
关键:这应该是您解决自己问题的实现,而非示例代理的副本。
第5步:配置环境
创建.env文件:
bash
必需
OPENAI
APIKEY=your
openaikey
LangSmith部署所需(云端)
LANGSMITH
APIKEY=your
langsmithkey
可选 - 基于您的工具
WEATHER
APIKEY=your
weatherkey
COINGECKO
APIKEY=your
coingeckokey
ALCHEMY
APIKEY=your
alchemykey
获取LangSmith API密钥:
- 1. 在https://smith.langchain.com创建账户
- 导航至设置→API密钥
- 创建新的API密钥
- 添加到.env文件
更新langgraph.json:
json
{
agent_id: [您的代理名称],
python_version: 3.11, // 或TypeScript省略此项
dependencies: [.],
graphs: {
agent: ./src/graph.ts // 或.py
},
env: .env
}
第6步:本地测试
bash
TypeScript
npm run dev
Python
langgraph dev
测试代理的API:
bash
curl -X POST http://localhost:8000/invoke \
-H Content-Type: application/json