Add chatbot documentation and Claude agent SDK resources
This commit is contained in:
148
input/claude-agent-sdk/README.md
Normal file
148
input/claude-agent-sdk/README.md
Normal file
@@ -0,0 +1,148 @@
|
||||
# Claude Agent SDK - Documentație pentru Proiecte
|
||||
|
||||
Acest director conține documentație despre **Claude Agent SDK** și utilizarea acestuia în diverse contexte și proiecte.
|
||||
|
||||
## Fișiere Disponibile
|
||||
|
||||
### 📘 [claude-agent-sdk-documentation.md](./claude-agent-sdk-documentation.md)
|
||||
|
||||
Documentație completă despre Claude Agent SDK, inclusiv:
|
||||
|
||||
- **Overview**: Ce este și de ce este important
|
||||
- **Instalare și Setup**: Configurare pentru Python și TypeScript
|
||||
- **Arhitectură**: Concepte cheie (message blocks, query function, options)
|
||||
- **Features**: Tools, permissions, MCP servers, context management
|
||||
- **Cazuri de Utilizare**:
|
||||
- Knowledge Management (Obsidian)
|
||||
- Personal Assistants
|
||||
- Custom Coding Assistants
|
||||
- Customer Support
|
||||
- Finance & Investment Agents
|
||||
- SRE & DevOps Automation
|
||||
- Research & Content Creation
|
||||
- Telegram/Slack Bots
|
||||
- **Exemple de Cod Detaliate**:
|
||||
- Simple Query
|
||||
- Custom CLI
|
||||
- Obsidian Integration
|
||||
- Telegram Bot cu Remote Coding
|
||||
- MCP Server Setup
|
||||
- Session Management
|
||||
- Error Handling
|
||||
- **Integrări Posibile**: Development tools, communication platforms, productivity tools
|
||||
- **Monitoring**: Sentry integration, custom logging
|
||||
- **Best Practices**: Security, permissions, testing, deployment
|
||||
- **Resurse**: Links către documentație oficială, tutorials, community
|
||||
|
||||
## Quick Links
|
||||
|
||||
### Documentație Oficială Anthropic
|
||||
- [Agent SDK Overview](https://docs.claude.com/en/api/agent-sdk/overview)
|
||||
- [GitHub Python SDK](https://github.com/anthropics/claude-agent-sdk-python)
|
||||
- [Building Agents Blog Post](https://www.anthropic.com/engineering/building-agents-with-the-claude-agent-sdk)
|
||||
|
||||
### Instalare Rapidă
|
||||
|
||||
**Python:**
|
||||
```bash
|
||||
pip install claude-agent-sdk
|
||||
```
|
||||
|
||||
**TypeScript:**
|
||||
```bash
|
||||
npm install @anthropic-ai/claude-agent-sdk
|
||||
```
|
||||
|
||||
### Example Rapid
|
||||
|
||||
```python
|
||||
from claude_agent_sdk import query
|
||||
|
||||
options = {
|
||||
"systemPrompt": "You are a helpful assistant.",
|
||||
"cwd": "/workspace"
|
||||
}
|
||||
|
||||
messages = [{"role": "user", "content": "Help me with X"}]
|
||||
|
||||
for message in query(messages=messages, options=options):
|
||||
print(message)
|
||||
```
|
||||
|
||||
## Utilizare în Proiecte
|
||||
|
||||
### Pentru Proiecte Noi
|
||||
|
||||
1. **Citește documentația completă** în `claude-agent-sdk-documentation.md`
|
||||
2. **Identifică use case-ul** (coding, automation, knowledge management, etc.)
|
||||
3. **Configurează agent options** (system prompt, permissions, MCP servers)
|
||||
4. **Setup monitoring** (Sentry pentru production)
|
||||
5. **Deploy** (Docker, serverless, etc.)
|
||||
|
||||
### Exemple de Aplicații
|
||||
|
||||
Din documentație poți învăța să construiești:
|
||||
|
||||
- 🤖 **Telegram/Slack bots** pentru remote coding
|
||||
- 📓 **Obsidian/Notion integrations** pentru knowledge management
|
||||
- 👨💻 **Custom coding assistants** pentru tech stack-ul tău
|
||||
- 🔧 **DevOps automation** pentru infrastructure management
|
||||
- 💬 **Customer support bots** cu acces la CRM/database
|
||||
- 📊 **Finance analysis agents** cu API integrations
|
||||
- 🔍 **Research assistants** pentru content creation
|
||||
|
||||
## Note Importante
|
||||
|
||||
### Security Best Practices
|
||||
|
||||
✅ **DO:**
|
||||
- Use granular permissions (`allowedTools: ["read", "glob"]`)
|
||||
- Limit working directory (`cwd: "/safe/path"`)
|
||||
- Use environment variables pentru secrets
|
||||
- Setup monitoring (Sentry, logs)
|
||||
- Test în non-production environment first
|
||||
|
||||
❌ **DON'T:**
|
||||
- Use `allowedTools: "*"` în production fără review
|
||||
- Set `cwd: "/"` (root access)
|
||||
- Hardcode API keys/tokens în code
|
||||
- Deploy without monitoring
|
||||
- Give bash access without command restrictions
|
||||
|
||||
### Cost Management
|
||||
|
||||
- Monitor token usage (vezi Sentry integration)
|
||||
- Truncate conversation history când devine prea mare
|
||||
- Use prompt caching (automatic în SDK)
|
||||
- Consider Claude subscription vs API credits
|
||||
|
||||
### Production Readiness Checklist
|
||||
|
||||
- [ ] System prompt optimizat pentru use case
|
||||
- [ ] Granular permissions configurate
|
||||
- [ ] MCP servers necesari setup
|
||||
- [ ] Error handling implementat
|
||||
- [ ] Monitoring configured (Sentry/logs)
|
||||
- [ ] Session management pentru conversații
|
||||
- [ ] Docker/deployment configuration
|
||||
- [ ] Environment variables pentru secrets
|
||||
- [ ] Testing suite pentru agent behavior
|
||||
- [ ] Documentation pentru team
|
||||
|
||||
## Contribuții și Updates
|
||||
|
||||
Documentația este bazată pe:
|
||||
- **Transcript**: "Claude Code's Real Purpose (It's Bigger Than You Think)"
|
||||
- **Documentație oficială**: Anthropic Claude Agent SDK (Ianuarie 2025)
|
||||
- **Web research**: Tutorials, examples, community resources
|
||||
|
||||
Pentru updates:
|
||||
- Verifică [documentația oficială](https://docs.claude.com/en/api/agent-sdk/overview)
|
||||
- Urmărește [Anthropic blog](https://www.anthropic.com/news)
|
||||
- GitHub repositories: [Python SDK](https://github.com/anthropics/claude-agent-sdk-python)
|
||||
|
||||
---
|
||||
|
||||
**Happy Building!** 🚀
|
||||
|
||||
*Pentru întrebări sau clarificări, consultă documentația completă sau resursele oficiale Anthropic.*
|
||||
Reference in New Issue
Block a user