Template Generation Request
TECHNOLOGY/FRAMEWORK:
Example: CrewAI multi-agent systems
示例: CrewAI 多 agent 系统
Your technology: Pydantic AI agents
你的技术: Pydantic AI agents
TEMPLATE PURPOSE:
What specific use case should this template be optimized for?
这个模板应当针对哪个具体用例做优化?
Your purpose: Building intelligent AI agents with tool integration, conversation handling, and structured data validation using Pydantic AI framework
你的目的: 用 Pydantic AI 框架构建具备工具集成、对话处理和结构化数据校验的智能 AI agent
CORE FEATURES:
What are the essential features this template should help developers implement?
这个模板应当帮助开发者实现哪些核心功能?
Your core features:
你的核心功能:
- Agent creation with different model providers (OpenAI, Anthropic, Gemini)
- Tool integration patterns (web search, file operations, API calls)
- Conversation memory and context management
- Structured output validation with Pydantic models
- Error handling and retry mechanisms
- Testing patterns for AI agent behavior
以不同模型 provider(OpenAI、Anthropic、Gemini)创建 agent;工具集成模式(网页搜索、文件操作、API 调用);对话记忆与上下文管理;用 Pydantic 模型做结构化输出校验;错误处理与重试机制;针对 AI agent 行为的测试模式。
EXAMPLES TO INCLUDE:
What working examples should be provided in the template?
模板中应当提供哪些可运行的示例?
Your examples:
你的示例:
- Basic chat agent with memory
- Tool-enabled agent (web search + calculator)
- Multi-step workflow agent
- Agent with custom Pydantic models for structured outputs
- Testing examples for agent responses and tool usage
带记忆的基础聊天 agent;工具型 agent(网页搜索加计算器);多步工作流 agent;使用自定义 Pydantic 模型做结构化输出的 agent;针对 agent 响应与工具使用的测试示例。
DOCUMENTATION TO RESEARCH:
What specific documentation should be thoroughly researched and referenced?
应当深入调研并引用哪些具体的文档?
Your documentation:
- https://ai.pydantic.dev/ - Official Pydantic AI documentation
- Model provider APIs (OpenAI, Anthropic) for integration patterns
- Tool integration best practices and examples
你的文档: https://ai.pydantic.dev/ —— Pydantic AI 官方文档;模型 provider 的 API(OpenAI、Anthropic)以了解集成模式;工具集成的最佳实践与示例。
DEVELOPMENT PATTERNS:
What specific development patterns, project structures, or workflows should be researched and included?
应当调研并纳入哪些具体的开发模式、项目结构或工作流?
Your development patterns:
- How to structure agent modules and tool definitions
- Configuration management for different model providers
- Environment setup for development vs production
- Logging and monitoring patterns for AI agents
你的开发模式: 如何组织 agent 模块与工具定义;不同模型 provider 的配置管理;开发与生产环境的搭建差异;AI agent 的日志与监控模式。
SECURITY & BEST PRACTICES:
What security considerations and best practices are critical for this technology?
对这项技术而言,哪些安全考量与最佳实践至关重要?
Your security considerations:
- API key management
- Input validation and sanitization for agent inputs
- Rate limiting and usage monitoring
- Prompt injection prevention
- Cost control and monitoring for model usage
你的安全考量: API key 管理;对 agent 输入的校验与清洗;限流与用量监控;提示词注入防护;模型使用的成本控制与监控。
COMMON GOTCHAS:
What are the typical pitfalls, edge cases, or complex issues developers face with this technology?
开发者使用这项技术时常见的坑、边界情况或复杂问题有哪些?
Your gotchas:
- Handling model provider rate limits and errors
- Managing conversation state across requests
- Tool execution error handling and retries
你的坑: 处理模型 provider 的速率限制与错误;跨请求管理对话状态;工具执行的错误处理与重试。
VALIDATION REQUIREMENTS:
What specific validation, testing, or quality checks should be included in the template?
模板中应当包含哪些具体的验证、测试或质量检查?
Your validation requirements:
- Tool unit testing testing
- Agent unit testing
你的验证要求: 工具的单元测试;agent 的单元测试。