[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-letta-letta-api-client":3,"mdc-rwr9o2-key":40,"related-org-letta-letta-api-client":3354,"related-repo-letta-letta-api-client":3514},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":29,"repoUrl":30,"updatedAt":31,"license":32,"forks":33,"topics":34,"repo":35,"sourceUrl":38,"mdContent":39},"letta-api-client","build applications with Letta API","Build applications with the Letta API — a model-agnostic, stateful API for building persistent agents with memory and long-term learning. Covers SDK patterns for Python and TypeScript. Includes 24 working code examples.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"letta","Letta","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fletta.png","letta-ai",[13,17,20,23,26],{"name":14,"slug":15,"type":16},"TypeScript","typescript","tag",{"name":18,"slug":19,"type":16},"Memory","memory",{"name":21,"slug":22,"type":16},"Python","python",{"name":24,"slug":25,"type":16},"Agents","agents",{"name":27,"slug":28,"type":16},"API Development","api-development",127,"https:\u002F\u002Fgithub.com\u002Fletta-ai\u002Fskills","2026-07-13T06:25:28.958647","MIT",20,[],{"repoUrl":30,"stars":29,"forks":33,"topics":36,"description":37},[],"A shared repository for skills. Intended to be used with Letta Code, Claude Code, Codex CLI, and other agents that support skills.","https:\u002F\u002Fgithub.com\u002Fletta-ai\u002Fskills\u002Ftree\u002FHEAD\u002Fletta\u002Fletta-api-client","---\nname: letta-api-client\ndescription: Build applications with the Letta API — a model-agnostic, stateful API for building persistent agents with memory and long-term learning. Covers SDK patterns for Python and TypeScript. Includes 24 working code examples.\nlicense: MIT\n---\n\n# Letta API Client Skill\n\nBuild applications on top of the **Letta API** — a model-agnostic, stateful API for building persistent agents with memory and long-term learning. The Letta API powers [Letta Code](https:\u002F\u002Fgithub.com\u002Fletta-ai\u002Fletta-code) and the [Learning SDK](https:\u002F\u002Fgithub.com\u002Fletta-ai\u002Flearning-sdk). This skill covers the core patterns for creating agents, managing memory, building custom tools, and handling multi-user scenarios.\n\n## When to Use This Skill\n\n- Building applications that need persistent, stateful AI agents\n- Creating chatbots, assistants, or autonomous agents with memory\n- Integrating Letta into existing web\u002Fmobile applications\n- Building multi-user applications where each user has their own agent\n- Understanding the API layer that Letta Code and Learning SDK are built on\n\n## Quick Start\n\nSee [getting-started.md](.\u002Fgetting-started.md) for first-time setup and common onboarding issues.\n\n## SDK Versions Tested\n\nExamples last tested with:\n- **Python SDK**: `letta-client==1.7.1`\n- **TypeScript SDK**: `@letta-ai\u002Fletta-client@1.7.1`\n\n## Core Concepts\n\n### 1. Client Setup\nSee [client-setup.md](.\u002Fclient-setup.md) for initialization patterns:\n- Letta Cloud vs self-hosted connections\n- Environment variable management\n- Singleton patterns for web frameworks\n\n### 2. Memory Architecture  \nSee [memory-architecture.md](.\u002Fmemory-architecture.md) for memory patterns:\n- **Core Memory Blocks**: Always in-context (persona, human, custom blocks)\n- **Archival Memory**: Large corpus with semantic search\n- **Conversation History**: Searchable message history\n- **Shared Blocks**: Multi-agent coordination\n\n### 3. Custom Tools\nSee [custom-tools.md](.\u002Fcustom-tools.md) for tool creation:\n- Simple function tools with auto-generated schemas\n- Tools with environment variable secrets\n- BaseTool class for complex schemas\n- Sandboxed execution requirements\n\n### 4. Client-Side Tools\nSee [client-side-tools.md](.\u002Fclient-side-tools.md) for local tool execution:\n- Execute tools on your machine while agent runs on Letta API\n- How [Letta Code](https:\u002F\u002Fgithub.com\u002Fletta-ai\u002Fletta-code) runs Bash\u002FRead\u002FWrite locally\n- Approval-based flow with `type: \"tool\"` responses\n- Access local files, databases, and private APIs\n\n### 5. Client Injection & Secrets\nSee [client-injection.md](.\u002Fclient-injection.md) for server-side tool patterns:\n- Pre-injected `client` variable on Letta Cloud\n- Building custom memory tools that modify agent state\n- Agent secrets via `os.getenv()`\n- `LETTA_AGENT_ID` for self-referential tools\n\n### 6. Multi-User Patterns\nSee [multi-user.md](.\u002Fmulti-user.md) for scaling:\n- One agent per user (personalization)\n- Shared agent with Conversations API\n- Identity system for user context\n\n### 7. Streaming\nSee [streaming.md](.\u002Fstreaming.md) for real-time responses:\n- Basic SSE streaming\n- Long-running operations with `include_pings`\n- Background execution and resumable streams\n\n### 8. Conversations\nConversations enable parallel sessions with shared memory:\n- Thread-safe concurrent messaging (agents.messages.create is NOT thread-safe)\n- Shared memory blocks across all conversations\n- Separate context windows per conversation\n- Use for: same user with multiple parallel tasks, multi-threaded applications\n\n### 9. Sleeptime Agents\nSee [sleeptime.md](.\u002Fsleeptime.md) for background memory processing:\n- Enable with `enable_sleeptime=True`\n- Background agent refines memory between conversations\n- Good for agents that learn over time\n\n### 10. Agent Files & Folders\nSee [agent-files.md](.\u002Fagent-files.md) for portability and file access:\n- Export\u002Fimport agents with `.af` files\n- Attach folders to give agents document access\n- Migration checklist for moving agents\n\n### 11. Tool Rules\nSee [tool-rules.md](.\u002Ftool-rules.md) for constraining tool execution:\n- `InitToolRule` - Force a tool to run first\n- `ChildToolRule` - Control which tools can follow\n- `TerminalToolRule` - End agent turn after tool\n- Sequential pipelines and approval workflows\n\n## Quick Reference\n\n### Python SDK\n```bash\npip install letta-client\n```\n\n```python\nfrom letta_client import Letta\n\n# Cloud\nclient = Letta(api_key=\"LETTA_API_KEY\")\n\n# Self-hosted\nclient = Letta(base_url=\"http:\u002F\u002Flocalhost:8283\")\n```\n\n### TypeScript SDK\n```bash\nnpm install @letta-ai\u002Fletta-client\n```\n\n```typescript\nimport { Letta } from \"@letta-ai\u002Fletta-client\";\n\n\u002F\u002F Cloud\nconst client = new Letta({ apiKey: process.env.LETTA_API_KEY });\n\n\u002F\u002F Self-hosted\nconst client = new Letta({ baseUrl: \"http:\u002F\u002Flocalhost:8283\" });\n```\n\n## Examples\n\nSee the `examples\u002F` directory for runnable code:\n\n**Python:**\n- `01_basic_client.py` - Client initialization\n- `02_create_agent.py` - Agent creation with memory blocks\n- `03_custom_tool_simple.py` - Basic custom tool\n- `04_custom_tool_secrets.py` - Tool with environment variables\n- `05_send_message.py` - Basic messaging\n- `06_send_message_stream.py` - Streaming responses\n- `07_multi_user.py` - Multi-user patterns\n- `08_archival_memory.py` - Archival memory operations\n- `09_shared_blocks.py` - Multi-agent shared memory\n- `10_conversations.py` - Parallel sessions with conversations\n- `11_client_injection.py` - Custom memory tools with injected client\n- `12_tool_rules.py` - Constraining tool execution order\n- `13_client_side_tools.py` - Execute tools locally (like Letta Code)\n\n**TypeScript:**\n- `01_basic_client.ts` - Client initialization\n- `02_create_agent.ts` - Agent creation\n- `03_send_message.ts` - Basic messaging\n- `04_send_message_stream.ts` - Streaming\n- `05_nextjs_singleton.ts` - Next.js pattern\n- `06_multi_user.ts` - Multi-user patterns\n- `07_conversations.ts` - Parallel sessions\n- `08_custom_tool.ts` - Custom tools with secrets\n- `09_archival_memory.ts` - Long-term storage\n- `10_shared_blocks.ts` - Multi-agent shared memory\n- `11_client_injection.ts` - Custom memory tools\n- `12_tool_rules.ts` - Tool execution order\n- `13_client_side_tools.ts` - Execute tools locally (like Letta Code)\n\n## Troubleshooting\n\n| Error | Cause | Fix |\n|-------|-------|-----|\n| 401 Unauthorized | Invalid or missing API key | Check `LETTA_API_KEY` env var |\n| 422 Validation Error | Missing required field | Add `model`, `embedding`, or `memory_blocks` |\n| Tool not found | Tool not attached to agent | `client.agents.tools.attach(agent_id, tool_id)` |\n| `os.getenv()` returns None | Secret not configured | Add to agent via `secrets` parameter |\n| 524 Timeout | Long operation without pings | Add `include_pings=True` to streaming |\n| Agent not responding | Model issue or empty response | Check for `assistant_message` type in response |\n| Memory block not updating | Looking at wrong agent | Verify `agent_id` matches |\n| Import error in tool | Top-level import | Move imports inside function body |\n\n## Key Gotchas\n\n1. **Imports in tools must be inside the function** - Tools run in a sandbox without access to top-level imports\n2. **Use `os.getenv()` for secrets** - Don't pass sensitive data as function arguments\n3. **On Cloud, use injected `client`** - Don't instantiate `Letta()` inside tools, use the pre-injected client\n4. **Memory blocks are character-limited** - Use archival memory for large data\n5. **Streaming requires `include_pings=True` for long operations** - Prevents timeout on Cloud\n6. **SDK 1.0 uses `.update()` not `.modify()`** - Method was renamed\n7. **`LETTA_AGENT_ID` is always available** - Use it in tools to reference the current agent\n8. **Archival tools need `include_base_tools=True`** - Not attached by default\n9. **Use `memory_insert` for shared blocks** - Safest for concurrent writes (append-only)\n10. **Tool docstrings require Args section** - Parameters need descriptions or schema generation fails\n\n## TypeScript SDK Notes\n\n```typescript\n\u002F\u002F Client initialization uses baseURL (not baseUrl)\nconst client = new Letta({ apiKey: \"...\", baseURL: \"http:\u002F\u002Flocalhost:8283\" });\n\n\u002F\u002F Block API: positional args changed\nclient.agents.blocks.attach(blockId, { agent_id });      \u002F\u002F blockId is first\nclient.agents.blocks.retrieve(blockLabel, { agent_id }); \u002F\u002F label is first\n\n\u002F\u002F Passages.create returns array\nconst passages = await client.agents.passages.create(agentId, { text: \"...\" });\nconst passage = passages[0];\n\n\u002F\u002F Content can be string | array - use type guard\nconst content = typeof msg.content === \"string\" ? msg.content : JSON.stringify(msg.content);\n\n\u002F\u002F Conversations API returns streams by default\nconst stream = await client.conversations.messages.create(convId, { messages: [...] });\nfor await (const chunk of stream) { ... }\n\n\u002F\u002F Tool rule types\n{ type: \"run_first\", tool_name: \"...\" }           \u002F\u002F InitToolRule\n{ type: \"constrain_child_tools\", tool_name: \"...\", children: [...] } \u002F\u002F ChildToolRule  \n{ type: \"exit_loop\", tool_name: \"...\" }           \u002F\u002F TerminalToolRule\n```\n\n## Quick Reference\n\n```python\n# Client\nclient = Letta(api_key=os.getenv(\"LETTA_API_KEY\"))\n\n# Create agent\nagent = client.agents.create(\n    model=\"anthropic\u002Fclaude-sonnet-4-5-20250929\",\n    embedding=\"openai\u002Ftext-embedding-3-small\",\n    memory_blocks=[{\"label\": \"persona\", \"value\": \"...\"}],\n    include_base_tools=True,  # archival memory tools\n    enable_sleeptime=True,    # background memory processing\n)\n\n# Send message\nresponse = client.agents.messages.create(\n    agent_id=agent.id,\n    messages=[{\"role\": \"user\", \"content\": \"Hello\"}]\n)\n\n# Stream response\nstream = client.agents.messages.stream(\n    agent_id=agent.id,\n    messages=[{\"role\": \"user\", \"content\": \"Hello\"}],\n    stream_tokens=True,\n    include_pings=True,  # prevent timeout\n)\n\n# Create tool\ntool = client.tools.create(source_code=\"def my_tool(x: str) -> str: ...\")\nclient.agents.tools.attach(agent_id=agent.id, tool_id=tool.id)\n\n# Memory blocks\nclient.agents.blocks.retrieve(agent_id=agent.id, block_label=\"persona\")\nclient.agents.blocks.update(agent_id=agent.id, block_label=\"persona\", value=\"...\")\n\n# Folders\nfolder = client.folders.create(name=\"docs\")\nclient.folders.files.upload(file=f, folder_id=folder.id)\nclient.agents.folders.attach(agent_id=agent.id, folder_id=folder.id)\n\n# Conversations (parallel sessions)\nconv = client.conversations.create(agent_id=agent.id)\nstream = client.conversations.messages.create(conv.id, messages=[...])\n\n# Agent secrets (for tools)\nclient.agents.update(agent_id=agent.id, secrets={\"API_KEY\": \"...\"})\n```\n\n## Resources\n\n**Platform:**\n- [Letta Cloud (ADE)](https:\u002F\u002Fapp.letta.com) - Agent Development Environment\n- [API Keys](https:\u002F\u002Fapp.letta.com\u002Fapi-keys) - Get your API key\n\n**Documentation:**\n- [Letta Docs](https:\u002F\u002Fdocs.letta.com) - Full documentation\n- [Agents Guide](https:\u002F\u002Fdocs.letta.com\u002Fguides\u002Fagents\u002Foverview) - Agent concepts\n- [Memory Blocks](https:\u002F\u002Fdocs.letta.com\u002Fguides\u002Fagents\u002Fmemory-blocks) - Memory architecture\n- [Custom Tools](https:\u002F\u002Fdocs.letta.com\u002Fguides\u002Fagents\u002Fcustom-tools) - Tool creation\n- [Streaming](https:\u002F\u002Fdocs.letta.com\u002Fguides\u002Fagents\u002Fstreaming) - Real-time responses\n- [Multi-User](https:\u002F\u002Fdocs.letta.com\u002Fguides\u002Fagents\u002Fmulti-user) - Scaling patterns\n\n**SDKs:**\n- [Python SDK](https:\u002F\u002Fgithub.com\u002Fletta-ai\u002Fletta-python) - `pip install letta-client`\n- [TypeScript SDK](https:\u002F\u002Fgithub.com\u002Fletta-ai\u002Fletta-node) - `npm install @letta-ai\u002Fletta-client`\n\n**Examples:**\n- [Chatbot Example](https:\u002F\u002Fgithub.com\u002Fletta-ai\u002Fletta-chatbot-example) - Full app example\n",{"data":41,"body":42},{"name":4,"description":6,"license":32},{"type":43,"children":44},"root",[45,54,88,95,125,131,144,150,155,190,196,203,215,233,239,251,294,300,312,335,341,353,391,397,409,452,458,470,488,494,506,530,536,541,564,570,582,606,612,624,650,656,668,709,715,720,754,824,829,853,1096,1102,1115,1123,1269,1277,1418,1424,1671,1677,1840,1846,2773,2778,3157,3163,3171,3198,3206,3281,3289,3325,3333,3348],{"type":46,"tag":47,"props":48,"children":50},"element","h1",{"id":49},"letta-api-client-skill",[51],{"type":52,"value":53},"text","Letta API Client Skill",{"type":46,"tag":55,"props":56,"children":57},"p",{},[58,60,66,68,77,79,86],{"type":52,"value":59},"Build applications on top of the ",{"type":46,"tag":61,"props":62,"children":63},"strong",{},[64],{"type":52,"value":65},"Letta API",{"type":52,"value":67}," — a model-agnostic, stateful API for building persistent agents with memory and long-term learning. The Letta API powers ",{"type":46,"tag":69,"props":70,"children":74},"a",{"href":71,"rel":72},"https:\u002F\u002Fgithub.com\u002Fletta-ai\u002Fletta-code",[73],"nofollow",[75],{"type":52,"value":76},"Letta Code",{"type":52,"value":78}," and the ",{"type":46,"tag":69,"props":80,"children":83},{"href":81,"rel":82},"https:\u002F\u002Fgithub.com\u002Fletta-ai\u002Flearning-sdk",[73],[84],{"type":52,"value":85},"Learning SDK",{"type":52,"value":87},". This skill covers the core patterns for creating agents, managing memory, building custom tools, and handling multi-user scenarios.",{"type":46,"tag":89,"props":90,"children":92},"h2",{"id":91},"when-to-use-this-skill",[93],{"type":52,"value":94},"When to Use This Skill",{"type":46,"tag":96,"props":97,"children":98},"ul",{},[99,105,110,115,120],{"type":46,"tag":100,"props":101,"children":102},"li",{},[103],{"type":52,"value":104},"Building applications that need persistent, stateful AI agents",{"type":46,"tag":100,"props":106,"children":107},{},[108],{"type":52,"value":109},"Creating chatbots, assistants, or autonomous agents with memory",{"type":46,"tag":100,"props":111,"children":112},{},[113],{"type":52,"value":114},"Integrating Letta into existing web\u002Fmobile applications",{"type":46,"tag":100,"props":116,"children":117},{},[118],{"type":52,"value":119},"Building multi-user applications where each user has their own agent",{"type":46,"tag":100,"props":121,"children":122},{},[123],{"type":52,"value":124},"Understanding the API layer that Letta Code and Learning SDK are built on",{"type":46,"tag":89,"props":126,"children":128},{"id":127},"quick-start",[129],{"type":52,"value":130},"Quick Start",{"type":46,"tag":55,"props":132,"children":133},{},[134,136,142],{"type":52,"value":135},"See ",{"type":46,"tag":69,"props":137,"children":139},{"href":138},".\u002Fgetting-started.md",[140],{"type":52,"value":141},"getting-started.md",{"type":52,"value":143}," for first-time setup and common onboarding issues.",{"type":46,"tag":89,"props":145,"children":147},{"id":146},"sdk-versions-tested",[148],{"type":52,"value":149},"SDK Versions Tested",{"type":46,"tag":55,"props":151,"children":152},{},[153],{"type":52,"value":154},"Examples last tested with:",{"type":46,"tag":96,"props":156,"children":157},{},[158,175],{"type":46,"tag":100,"props":159,"children":160},{},[161,166,168],{"type":46,"tag":61,"props":162,"children":163},{},[164],{"type":52,"value":165},"Python SDK",{"type":52,"value":167},": ",{"type":46,"tag":169,"props":170,"children":172},"code",{"className":171},[],[173],{"type":52,"value":174},"letta-client==1.7.1",{"type":46,"tag":100,"props":176,"children":177},{},[178,183,184],{"type":46,"tag":61,"props":179,"children":180},{},[181],{"type":52,"value":182},"TypeScript SDK",{"type":52,"value":167},{"type":46,"tag":169,"props":185,"children":187},{"className":186},[],[188],{"type":52,"value":189},"@letta-ai\u002Fletta-client@1.7.1",{"type":46,"tag":89,"props":191,"children":193},{"id":192},"core-concepts",[194],{"type":52,"value":195},"Core Concepts",{"type":46,"tag":197,"props":198,"children":200},"h3",{"id":199},"_1-client-setup",[201],{"type":52,"value":202},"1. Client Setup",{"type":46,"tag":55,"props":204,"children":205},{},[206,207,213],{"type":52,"value":135},{"type":46,"tag":69,"props":208,"children":210},{"href":209},".\u002Fclient-setup.md",[211],{"type":52,"value":212},"client-setup.md",{"type":52,"value":214}," for initialization patterns:",{"type":46,"tag":96,"props":216,"children":217},{},[218,223,228],{"type":46,"tag":100,"props":219,"children":220},{},[221],{"type":52,"value":222},"Letta Cloud vs self-hosted connections",{"type":46,"tag":100,"props":224,"children":225},{},[226],{"type":52,"value":227},"Environment variable management",{"type":46,"tag":100,"props":229,"children":230},{},[231],{"type":52,"value":232},"Singleton patterns for web frameworks",{"type":46,"tag":197,"props":234,"children":236},{"id":235},"_2-memory-architecture",[237],{"type":52,"value":238},"2. Memory Architecture",{"type":46,"tag":55,"props":240,"children":241},{},[242,243,249],{"type":52,"value":135},{"type":46,"tag":69,"props":244,"children":246},{"href":245},".\u002Fmemory-architecture.md",[247],{"type":52,"value":248},"memory-architecture.md",{"type":52,"value":250}," for memory patterns:",{"type":46,"tag":96,"props":252,"children":253},{},[254,264,274,284],{"type":46,"tag":100,"props":255,"children":256},{},[257,262],{"type":46,"tag":61,"props":258,"children":259},{},[260],{"type":52,"value":261},"Core Memory Blocks",{"type":52,"value":263},": Always in-context (persona, human, custom blocks)",{"type":46,"tag":100,"props":265,"children":266},{},[267,272],{"type":46,"tag":61,"props":268,"children":269},{},[270],{"type":52,"value":271},"Archival Memory",{"type":52,"value":273},": Large corpus with semantic search",{"type":46,"tag":100,"props":275,"children":276},{},[277,282],{"type":46,"tag":61,"props":278,"children":279},{},[280],{"type":52,"value":281},"Conversation History",{"type":52,"value":283},": Searchable message history",{"type":46,"tag":100,"props":285,"children":286},{},[287,292],{"type":46,"tag":61,"props":288,"children":289},{},[290],{"type":52,"value":291},"Shared Blocks",{"type":52,"value":293},": Multi-agent coordination",{"type":46,"tag":197,"props":295,"children":297},{"id":296},"_3-custom-tools",[298],{"type":52,"value":299},"3. Custom Tools",{"type":46,"tag":55,"props":301,"children":302},{},[303,304,310],{"type":52,"value":135},{"type":46,"tag":69,"props":305,"children":307},{"href":306},".\u002Fcustom-tools.md",[308],{"type":52,"value":309},"custom-tools.md",{"type":52,"value":311}," for tool creation:",{"type":46,"tag":96,"props":313,"children":314},{},[315,320,325,330],{"type":46,"tag":100,"props":316,"children":317},{},[318],{"type":52,"value":319},"Simple function tools with auto-generated schemas",{"type":46,"tag":100,"props":321,"children":322},{},[323],{"type":52,"value":324},"Tools with environment variable secrets",{"type":46,"tag":100,"props":326,"children":327},{},[328],{"type":52,"value":329},"BaseTool class for complex schemas",{"type":46,"tag":100,"props":331,"children":332},{},[333],{"type":52,"value":334},"Sandboxed execution requirements",{"type":46,"tag":197,"props":336,"children":338},{"id":337},"_4-client-side-tools",[339],{"type":52,"value":340},"4. Client-Side Tools",{"type":46,"tag":55,"props":342,"children":343},{},[344,345,351],{"type":52,"value":135},{"type":46,"tag":69,"props":346,"children":348},{"href":347},".\u002Fclient-side-tools.md",[349],{"type":52,"value":350},"client-side-tools.md",{"type":52,"value":352}," for local tool execution:",{"type":46,"tag":96,"props":354,"children":355},{},[356,361,373,386],{"type":46,"tag":100,"props":357,"children":358},{},[359],{"type":52,"value":360},"Execute tools on your machine while agent runs on Letta API",{"type":46,"tag":100,"props":362,"children":363},{},[364,366,371],{"type":52,"value":365},"How ",{"type":46,"tag":69,"props":367,"children":369},{"href":71,"rel":368},[73],[370],{"type":52,"value":76},{"type":52,"value":372}," runs Bash\u002FRead\u002FWrite locally",{"type":46,"tag":100,"props":374,"children":375},{},[376,378,384],{"type":52,"value":377},"Approval-based flow with ",{"type":46,"tag":169,"props":379,"children":381},{"className":380},[],[382],{"type":52,"value":383},"type: \"tool\"",{"type":52,"value":385}," responses",{"type":46,"tag":100,"props":387,"children":388},{},[389],{"type":52,"value":390},"Access local files, databases, and private APIs",{"type":46,"tag":197,"props":392,"children":394},{"id":393},"_5-client-injection-secrets",[395],{"type":52,"value":396},"5. Client Injection & Secrets",{"type":46,"tag":55,"props":398,"children":399},{},[400,401,407],{"type":52,"value":135},{"type":46,"tag":69,"props":402,"children":404},{"href":403},".\u002Fclient-injection.md",[405],{"type":52,"value":406},"client-injection.md",{"type":52,"value":408}," for server-side tool patterns:",{"type":46,"tag":96,"props":410,"children":411},{},[412,425,430,441],{"type":46,"tag":100,"props":413,"children":414},{},[415,417,423],{"type":52,"value":416},"Pre-injected ",{"type":46,"tag":169,"props":418,"children":420},{"className":419},[],[421],{"type":52,"value":422},"client",{"type":52,"value":424}," variable on Letta Cloud",{"type":46,"tag":100,"props":426,"children":427},{},[428],{"type":52,"value":429},"Building custom memory tools that modify agent state",{"type":46,"tag":100,"props":431,"children":432},{},[433,435],{"type":52,"value":434},"Agent secrets via ",{"type":46,"tag":169,"props":436,"children":438},{"className":437},[],[439],{"type":52,"value":440},"os.getenv()",{"type":46,"tag":100,"props":442,"children":443},{},[444,450],{"type":46,"tag":169,"props":445,"children":447},{"className":446},[],[448],{"type":52,"value":449},"LETTA_AGENT_ID",{"type":52,"value":451}," for self-referential tools",{"type":46,"tag":197,"props":453,"children":455},{"id":454},"_6-multi-user-patterns",[456],{"type":52,"value":457},"6. Multi-User Patterns",{"type":46,"tag":55,"props":459,"children":460},{},[461,462,468],{"type":52,"value":135},{"type":46,"tag":69,"props":463,"children":465},{"href":464},".\u002Fmulti-user.md",[466],{"type":52,"value":467},"multi-user.md",{"type":52,"value":469}," for scaling:",{"type":46,"tag":96,"props":471,"children":472},{},[473,478,483],{"type":46,"tag":100,"props":474,"children":475},{},[476],{"type":52,"value":477},"One agent per user (personalization)",{"type":46,"tag":100,"props":479,"children":480},{},[481],{"type":52,"value":482},"Shared agent with Conversations API",{"type":46,"tag":100,"props":484,"children":485},{},[486],{"type":52,"value":487},"Identity system for user context",{"type":46,"tag":197,"props":489,"children":491},{"id":490},"_7-streaming",[492],{"type":52,"value":493},"7. Streaming",{"type":46,"tag":55,"props":495,"children":496},{},[497,498,504],{"type":52,"value":135},{"type":46,"tag":69,"props":499,"children":501},{"href":500},".\u002Fstreaming.md",[502],{"type":52,"value":503},"streaming.md",{"type":52,"value":505}," for real-time responses:",{"type":46,"tag":96,"props":507,"children":508},{},[509,514,525],{"type":46,"tag":100,"props":510,"children":511},{},[512],{"type":52,"value":513},"Basic SSE streaming",{"type":46,"tag":100,"props":515,"children":516},{},[517,519],{"type":52,"value":518},"Long-running operations with ",{"type":46,"tag":169,"props":520,"children":522},{"className":521},[],[523],{"type":52,"value":524},"include_pings",{"type":46,"tag":100,"props":526,"children":527},{},[528],{"type":52,"value":529},"Background execution and resumable streams",{"type":46,"tag":197,"props":531,"children":533},{"id":532},"_8-conversations",[534],{"type":52,"value":535},"8. Conversations",{"type":46,"tag":55,"props":537,"children":538},{},[539],{"type":52,"value":540},"Conversations enable parallel sessions with shared memory:",{"type":46,"tag":96,"props":542,"children":543},{},[544,549,554,559],{"type":46,"tag":100,"props":545,"children":546},{},[547],{"type":52,"value":548},"Thread-safe concurrent messaging (agents.messages.create is NOT thread-safe)",{"type":46,"tag":100,"props":550,"children":551},{},[552],{"type":52,"value":553},"Shared memory blocks across all conversations",{"type":46,"tag":100,"props":555,"children":556},{},[557],{"type":52,"value":558},"Separate context windows per conversation",{"type":46,"tag":100,"props":560,"children":561},{},[562],{"type":52,"value":563},"Use for: same user with multiple parallel tasks, multi-threaded applications",{"type":46,"tag":197,"props":565,"children":567},{"id":566},"_9-sleeptime-agents",[568],{"type":52,"value":569},"9. Sleeptime Agents",{"type":46,"tag":55,"props":571,"children":572},{},[573,574,580],{"type":52,"value":135},{"type":46,"tag":69,"props":575,"children":577},{"href":576},".\u002Fsleeptime.md",[578],{"type":52,"value":579},"sleeptime.md",{"type":52,"value":581}," for background memory processing:",{"type":46,"tag":96,"props":583,"children":584},{},[585,596,601],{"type":46,"tag":100,"props":586,"children":587},{},[588,590],{"type":52,"value":589},"Enable with ",{"type":46,"tag":169,"props":591,"children":593},{"className":592},[],[594],{"type":52,"value":595},"enable_sleeptime=True",{"type":46,"tag":100,"props":597,"children":598},{},[599],{"type":52,"value":600},"Background agent refines memory between conversations",{"type":46,"tag":100,"props":602,"children":603},{},[604],{"type":52,"value":605},"Good for agents that learn over time",{"type":46,"tag":197,"props":607,"children":609},{"id":608},"_10-agent-files-folders",[610],{"type":52,"value":611},"10. Agent Files & Folders",{"type":46,"tag":55,"props":613,"children":614},{},[615,616,622],{"type":52,"value":135},{"type":46,"tag":69,"props":617,"children":619},{"href":618},".\u002Fagent-files.md",[620],{"type":52,"value":621},"agent-files.md",{"type":52,"value":623}," for portability and file access:",{"type":46,"tag":96,"props":625,"children":626},{},[627,640,645],{"type":46,"tag":100,"props":628,"children":629},{},[630,632,638],{"type":52,"value":631},"Export\u002Fimport agents with ",{"type":46,"tag":169,"props":633,"children":635},{"className":634},[],[636],{"type":52,"value":637},".af",{"type":52,"value":639}," files",{"type":46,"tag":100,"props":641,"children":642},{},[643],{"type":52,"value":644},"Attach folders to give agents document access",{"type":46,"tag":100,"props":646,"children":647},{},[648],{"type":52,"value":649},"Migration checklist for moving agents",{"type":46,"tag":197,"props":651,"children":653},{"id":652},"_11-tool-rules",[654],{"type":52,"value":655},"11. Tool Rules",{"type":46,"tag":55,"props":657,"children":658},{},[659,660,666],{"type":52,"value":135},{"type":46,"tag":69,"props":661,"children":663},{"href":662},".\u002Ftool-rules.md",[664],{"type":52,"value":665},"tool-rules.md",{"type":52,"value":667}," for constraining tool execution:",{"type":46,"tag":96,"props":669,"children":670},{},[671,682,693,704],{"type":46,"tag":100,"props":672,"children":673},{},[674,680],{"type":46,"tag":169,"props":675,"children":677},{"className":676},[],[678],{"type":52,"value":679},"InitToolRule",{"type":52,"value":681}," - Force a tool to run first",{"type":46,"tag":100,"props":683,"children":684},{},[685,691],{"type":46,"tag":169,"props":686,"children":688},{"className":687},[],[689],{"type":52,"value":690},"ChildToolRule",{"type":52,"value":692}," - Control which tools can follow",{"type":46,"tag":100,"props":694,"children":695},{},[696,702],{"type":46,"tag":169,"props":697,"children":699},{"className":698},[],[700],{"type":52,"value":701},"TerminalToolRule",{"type":52,"value":703}," - End agent turn after tool",{"type":46,"tag":100,"props":705,"children":706},{},[707],{"type":52,"value":708},"Sequential pipelines and approval workflows",{"type":46,"tag":89,"props":710,"children":712},{"id":711},"quick-reference",[713],{"type":52,"value":714},"Quick Reference",{"type":46,"tag":197,"props":716,"children":718},{"id":717},"python-sdk",[719],{"type":52,"value":165},{"type":46,"tag":721,"props":722,"children":727},"pre",{"className":723,"code":724,"language":725,"meta":726,"style":726},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","pip install letta-client\n","bash","",[728],{"type":46,"tag":169,"props":729,"children":730},{"__ignoreMap":726},[731],{"type":46,"tag":732,"props":733,"children":736},"span",{"class":734,"line":735},"line",1,[737,743,749],{"type":46,"tag":732,"props":738,"children":740},{"style":739},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[741],{"type":52,"value":742},"pip",{"type":46,"tag":732,"props":744,"children":746},{"style":745},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[747],{"type":52,"value":748}," install",{"type":46,"tag":732,"props":750,"children":751},{"style":745},[752],{"type":52,"value":753}," letta-client\n",{"type":46,"tag":721,"props":755,"children":758},{"className":756,"code":757,"language":22,"meta":726,"style":726},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","from letta_client import Letta\n\n# Cloud\nclient = Letta(api_key=\"LETTA_API_KEY\")\n\n# Self-hosted\nclient = Letta(base_url=\"http:\u002F\u002Flocalhost:8283\")\n",[759],{"type":46,"tag":169,"props":760,"children":761},{"__ignoreMap":726},[762,770,780,789,798,806,815],{"type":46,"tag":732,"props":763,"children":764},{"class":734,"line":735},[765],{"type":46,"tag":732,"props":766,"children":767},{},[768],{"type":52,"value":769},"from letta_client import Letta\n",{"type":46,"tag":732,"props":771,"children":773},{"class":734,"line":772},2,[774],{"type":46,"tag":732,"props":775,"children":777},{"emptyLinePlaceholder":776},true,[778],{"type":52,"value":779},"\n",{"type":46,"tag":732,"props":781,"children":783},{"class":734,"line":782},3,[784],{"type":46,"tag":732,"props":785,"children":786},{},[787],{"type":52,"value":788},"# Cloud\n",{"type":46,"tag":732,"props":790,"children":792},{"class":734,"line":791},4,[793],{"type":46,"tag":732,"props":794,"children":795},{},[796],{"type":52,"value":797},"client = Letta(api_key=\"LETTA_API_KEY\")\n",{"type":46,"tag":732,"props":799,"children":801},{"class":734,"line":800},5,[802],{"type":46,"tag":732,"props":803,"children":804},{"emptyLinePlaceholder":776},[805],{"type":52,"value":779},{"type":46,"tag":732,"props":807,"children":809},{"class":734,"line":808},6,[810],{"type":46,"tag":732,"props":811,"children":812},{},[813],{"type":52,"value":814},"# Self-hosted\n",{"type":46,"tag":732,"props":816,"children":818},{"class":734,"line":817},7,[819],{"type":46,"tag":732,"props":820,"children":821},{},[822],{"type":52,"value":823},"client = Letta(base_url=\"http:\u002F\u002Flocalhost:8283\")\n",{"type":46,"tag":197,"props":825,"children":827},{"id":826},"typescript-sdk",[828],{"type":52,"value":182},{"type":46,"tag":721,"props":830,"children":832},{"className":723,"code":831,"language":725,"meta":726,"style":726},"npm install @letta-ai\u002Fletta-client\n",[833],{"type":46,"tag":169,"props":834,"children":835},{"__ignoreMap":726},[836],{"type":46,"tag":732,"props":837,"children":838},{"class":734,"line":735},[839,844,848],{"type":46,"tag":732,"props":840,"children":841},{"style":739},[842],{"type":52,"value":843},"npm",{"type":46,"tag":732,"props":845,"children":846},{"style":745},[847],{"type":52,"value":748},{"type":46,"tag":732,"props":849,"children":850},{"style":745},[851],{"type":52,"value":852}," @letta-ai\u002Fletta-client\n",{"type":46,"tag":721,"props":854,"children":857},{"className":855,"code":856,"language":15,"meta":726,"style":726},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { Letta } from \"@letta-ai\u002Fletta-client\";\n\n\u002F\u002F Cloud\nconst client = new Letta({ apiKey: process.env.LETTA_API_KEY });\n\n\u002F\u002F Self-hosted\nconst client = new Letta({ baseUrl: \"http:\u002F\u002Flocalhost:8283\" });\n",[858],{"type":46,"tag":169,"props":859,"children":860},{"__ignoreMap":726},[861,912,919,928,1016,1023,1031],{"type":46,"tag":732,"props":862,"children":863},{"class":734,"line":735},[864,870,876,882,887,892,897,902,907],{"type":46,"tag":732,"props":865,"children":867},{"style":866},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[868],{"type":52,"value":869},"import",{"type":46,"tag":732,"props":871,"children":873},{"style":872},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[874],{"type":52,"value":875}," {",{"type":46,"tag":732,"props":877,"children":879},{"style":878},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[880],{"type":52,"value":881}," Letta",{"type":46,"tag":732,"props":883,"children":884},{"style":872},[885],{"type":52,"value":886}," }",{"type":46,"tag":732,"props":888,"children":889},{"style":866},[890],{"type":52,"value":891}," from",{"type":46,"tag":732,"props":893,"children":894},{"style":872},[895],{"type":52,"value":896}," \"",{"type":46,"tag":732,"props":898,"children":899},{"style":745},[900],{"type":52,"value":901},"@letta-ai\u002Fletta-client",{"type":46,"tag":732,"props":903,"children":904},{"style":872},[905],{"type":52,"value":906},"\"",{"type":46,"tag":732,"props":908,"children":909},{"style":872},[910],{"type":52,"value":911},";\n",{"type":46,"tag":732,"props":913,"children":914},{"class":734,"line":772},[915],{"type":46,"tag":732,"props":916,"children":917},{"emptyLinePlaceholder":776},[918],{"type":52,"value":779},{"type":46,"tag":732,"props":920,"children":921},{"class":734,"line":782},[922],{"type":46,"tag":732,"props":923,"children":925},{"style":924},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[926],{"type":52,"value":927},"\u002F\u002F Cloud\n",{"type":46,"tag":732,"props":929,"children":930},{"class":734,"line":791},[931,937,942,947,952,957,962,967,973,978,983,988,993,997,1002,1007,1012],{"type":46,"tag":732,"props":932,"children":934},{"style":933},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[935],{"type":52,"value":936},"const",{"type":46,"tag":732,"props":938,"children":939},{"style":878},[940],{"type":52,"value":941}," client ",{"type":46,"tag":732,"props":943,"children":944},{"style":872},[945],{"type":52,"value":946},"=",{"type":46,"tag":732,"props":948,"children":949},{"style":872},[950],{"type":52,"value":951}," new",{"type":46,"tag":732,"props":953,"children":955},{"style":954},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[956],{"type":52,"value":881},{"type":46,"tag":732,"props":958,"children":959},{"style":878},[960],{"type":52,"value":961},"(",{"type":46,"tag":732,"props":963,"children":964},{"style":872},[965],{"type":52,"value":966},"{",{"type":46,"tag":732,"props":968,"children":970},{"style":969},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[971],{"type":52,"value":972}," apiKey",{"type":46,"tag":732,"props":974,"children":975},{"style":872},[976],{"type":52,"value":977},":",{"type":46,"tag":732,"props":979,"children":980},{"style":878},[981],{"type":52,"value":982}," process",{"type":46,"tag":732,"props":984,"children":985},{"style":872},[986],{"type":52,"value":987},".",{"type":46,"tag":732,"props":989,"children":990},{"style":878},[991],{"type":52,"value":992},"env",{"type":46,"tag":732,"props":994,"children":995},{"style":872},[996],{"type":52,"value":987},{"type":46,"tag":732,"props":998,"children":999},{"style":878},[1000],{"type":52,"value":1001},"LETTA_API_KEY ",{"type":46,"tag":732,"props":1003,"children":1004},{"style":872},[1005],{"type":52,"value":1006},"}",{"type":46,"tag":732,"props":1008,"children":1009},{"style":878},[1010],{"type":52,"value":1011},")",{"type":46,"tag":732,"props":1013,"children":1014},{"style":872},[1015],{"type":52,"value":911},{"type":46,"tag":732,"props":1017,"children":1018},{"class":734,"line":800},[1019],{"type":46,"tag":732,"props":1020,"children":1021},{"emptyLinePlaceholder":776},[1022],{"type":52,"value":779},{"type":46,"tag":732,"props":1024,"children":1025},{"class":734,"line":808},[1026],{"type":46,"tag":732,"props":1027,"children":1028},{"style":924},[1029],{"type":52,"value":1030},"\u002F\u002F Self-hosted\n",{"type":46,"tag":732,"props":1032,"children":1033},{"class":734,"line":817},[1034,1038,1042,1046,1050,1054,1058,1062,1067,1071,1075,1080,1084,1088,1092],{"type":46,"tag":732,"props":1035,"children":1036},{"style":933},[1037],{"type":52,"value":936},{"type":46,"tag":732,"props":1039,"children":1040},{"style":878},[1041],{"type":52,"value":941},{"type":46,"tag":732,"props":1043,"children":1044},{"style":872},[1045],{"type":52,"value":946},{"type":46,"tag":732,"props":1047,"children":1048},{"style":872},[1049],{"type":52,"value":951},{"type":46,"tag":732,"props":1051,"children":1052},{"style":954},[1053],{"type":52,"value":881},{"type":46,"tag":732,"props":1055,"children":1056},{"style":878},[1057],{"type":52,"value":961},{"type":46,"tag":732,"props":1059,"children":1060},{"style":872},[1061],{"type":52,"value":966},{"type":46,"tag":732,"props":1063,"children":1064},{"style":969},[1065],{"type":52,"value":1066}," baseUrl",{"type":46,"tag":732,"props":1068,"children":1069},{"style":872},[1070],{"type":52,"value":977},{"type":46,"tag":732,"props":1072,"children":1073},{"style":872},[1074],{"type":52,"value":896},{"type":46,"tag":732,"props":1076,"children":1077},{"style":745},[1078],{"type":52,"value":1079},"http:\u002F\u002Flocalhost:8283",{"type":46,"tag":732,"props":1081,"children":1082},{"style":872},[1083],{"type":52,"value":906},{"type":46,"tag":732,"props":1085,"children":1086},{"style":872},[1087],{"type":52,"value":886},{"type":46,"tag":732,"props":1089,"children":1090},{"style":878},[1091],{"type":52,"value":1011},{"type":46,"tag":732,"props":1093,"children":1094},{"style":872},[1095],{"type":52,"value":911},{"type":46,"tag":89,"props":1097,"children":1099},{"id":1098},"examples",[1100],{"type":52,"value":1101},"Examples",{"type":46,"tag":55,"props":1103,"children":1104},{},[1105,1107,1113],{"type":52,"value":1106},"See the ",{"type":46,"tag":169,"props":1108,"children":1110},{"className":1109},[],[1111],{"type":52,"value":1112},"examples\u002F",{"type":52,"value":1114}," directory for runnable code:",{"type":46,"tag":55,"props":1116,"children":1117},{},[1118],{"type":46,"tag":61,"props":1119,"children":1120},{},[1121],{"type":52,"value":1122},"Python:",{"type":46,"tag":96,"props":1124,"children":1125},{},[1126,1137,1148,1159,1170,1181,1192,1203,1214,1225,1236,1247,1258],{"type":46,"tag":100,"props":1127,"children":1128},{},[1129,1135],{"type":46,"tag":169,"props":1130,"children":1132},{"className":1131},[],[1133],{"type":52,"value":1134},"01_basic_client.py",{"type":52,"value":1136}," - Client initialization",{"type":46,"tag":100,"props":1138,"children":1139},{},[1140,1146],{"type":46,"tag":169,"props":1141,"children":1143},{"className":1142},[],[1144],{"type":52,"value":1145},"02_create_agent.py",{"type":52,"value":1147}," - Agent creation with memory blocks",{"type":46,"tag":100,"props":1149,"children":1150},{},[1151,1157],{"type":46,"tag":169,"props":1152,"children":1154},{"className":1153},[],[1155],{"type":52,"value":1156},"03_custom_tool_simple.py",{"type":52,"value":1158}," - Basic custom tool",{"type":46,"tag":100,"props":1160,"children":1161},{},[1162,1168],{"type":46,"tag":169,"props":1163,"children":1165},{"className":1164},[],[1166],{"type":52,"value":1167},"04_custom_tool_secrets.py",{"type":52,"value":1169}," - Tool with environment variables",{"type":46,"tag":100,"props":1171,"children":1172},{},[1173,1179],{"type":46,"tag":169,"props":1174,"children":1176},{"className":1175},[],[1177],{"type":52,"value":1178},"05_send_message.py",{"type":52,"value":1180}," - Basic messaging",{"type":46,"tag":100,"props":1182,"children":1183},{},[1184,1190],{"type":46,"tag":169,"props":1185,"children":1187},{"className":1186},[],[1188],{"type":52,"value":1189},"06_send_message_stream.py",{"type":52,"value":1191}," - Streaming responses",{"type":46,"tag":100,"props":1193,"children":1194},{},[1195,1201],{"type":46,"tag":169,"props":1196,"children":1198},{"className":1197},[],[1199],{"type":52,"value":1200},"07_multi_user.py",{"type":52,"value":1202}," - Multi-user patterns",{"type":46,"tag":100,"props":1204,"children":1205},{},[1206,1212],{"type":46,"tag":169,"props":1207,"children":1209},{"className":1208},[],[1210],{"type":52,"value":1211},"08_archival_memory.py",{"type":52,"value":1213}," - Archival memory operations",{"type":46,"tag":100,"props":1215,"children":1216},{},[1217,1223],{"type":46,"tag":169,"props":1218,"children":1220},{"className":1219},[],[1221],{"type":52,"value":1222},"09_shared_blocks.py",{"type":52,"value":1224}," - Multi-agent shared memory",{"type":46,"tag":100,"props":1226,"children":1227},{},[1228,1234],{"type":46,"tag":169,"props":1229,"children":1231},{"className":1230},[],[1232],{"type":52,"value":1233},"10_conversations.py",{"type":52,"value":1235}," - Parallel sessions with conversations",{"type":46,"tag":100,"props":1237,"children":1238},{},[1239,1245],{"type":46,"tag":169,"props":1240,"children":1242},{"className":1241},[],[1243],{"type":52,"value":1244},"11_client_injection.py",{"type":52,"value":1246}," - Custom memory tools with injected client",{"type":46,"tag":100,"props":1248,"children":1249},{},[1250,1256],{"type":46,"tag":169,"props":1251,"children":1253},{"className":1252},[],[1254],{"type":52,"value":1255},"12_tool_rules.py",{"type":52,"value":1257}," - Constraining tool execution order",{"type":46,"tag":100,"props":1259,"children":1260},{},[1261,1267],{"type":46,"tag":169,"props":1262,"children":1264},{"className":1263},[],[1265],{"type":52,"value":1266},"13_client_side_tools.py",{"type":52,"value":1268}," - Execute tools locally (like Letta Code)",{"type":46,"tag":55,"props":1270,"children":1271},{},[1272],{"type":46,"tag":61,"props":1273,"children":1274},{},[1275],{"type":52,"value":1276},"TypeScript:",{"type":46,"tag":96,"props":1278,"children":1279},{},[1280,1290,1301,1311,1322,1333,1343,1354,1365,1376,1386,1397,1408],{"type":46,"tag":100,"props":1281,"children":1282},{},[1283,1289],{"type":46,"tag":169,"props":1284,"children":1286},{"className":1285},[],[1287],{"type":52,"value":1288},"01_basic_client.ts",{"type":52,"value":1136},{"type":46,"tag":100,"props":1291,"children":1292},{},[1293,1299],{"type":46,"tag":169,"props":1294,"children":1296},{"className":1295},[],[1297],{"type":52,"value":1298},"02_create_agent.ts",{"type":52,"value":1300}," - Agent creation",{"type":46,"tag":100,"props":1302,"children":1303},{},[1304,1310],{"type":46,"tag":169,"props":1305,"children":1307},{"className":1306},[],[1308],{"type":52,"value":1309},"03_send_message.ts",{"type":52,"value":1180},{"type":46,"tag":100,"props":1312,"children":1313},{},[1314,1320],{"type":46,"tag":169,"props":1315,"children":1317},{"className":1316},[],[1318],{"type":52,"value":1319},"04_send_message_stream.ts",{"type":52,"value":1321}," - Streaming",{"type":46,"tag":100,"props":1323,"children":1324},{},[1325,1331],{"type":46,"tag":169,"props":1326,"children":1328},{"className":1327},[],[1329],{"type":52,"value":1330},"05_nextjs_singleton.ts",{"type":52,"value":1332}," - Next.js pattern",{"type":46,"tag":100,"props":1334,"children":1335},{},[1336,1342],{"type":46,"tag":169,"props":1337,"children":1339},{"className":1338},[],[1340],{"type":52,"value":1341},"06_multi_user.ts",{"type":52,"value":1202},{"type":46,"tag":100,"props":1344,"children":1345},{},[1346,1352],{"type":46,"tag":169,"props":1347,"children":1349},{"className":1348},[],[1350],{"type":52,"value":1351},"07_conversations.ts",{"type":52,"value":1353}," - Parallel sessions",{"type":46,"tag":100,"props":1355,"children":1356},{},[1357,1363],{"type":46,"tag":169,"props":1358,"children":1360},{"className":1359},[],[1361],{"type":52,"value":1362},"08_custom_tool.ts",{"type":52,"value":1364}," - Custom tools with secrets",{"type":46,"tag":100,"props":1366,"children":1367},{},[1368,1374],{"type":46,"tag":169,"props":1369,"children":1371},{"className":1370},[],[1372],{"type":52,"value":1373},"09_archival_memory.ts",{"type":52,"value":1375}," - Long-term storage",{"type":46,"tag":100,"props":1377,"children":1378},{},[1379,1385],{"type":46,"tag":169,"props":1380,"children":1382},{"className":1381},[],[1383],{"type":52,"value":1384},"10_shared_blocks.ts",{"type":52,"value":1224},{"type":46,"tag":100,"props":1387,"children":1388},{},[1389,1395],{"type":46,"tag":169,"props":1390,"children":1392},{"className":1391},[],[1393],{"type":52,"value":1394},"11_client_injection.ts",{"type":52,"value":1396}," - Custom memory tools",{"type":46,"tag":100,"props":1398,"children":1399},{},[1400,1406],{"type":46,"tag":169,"props":1401,"children":1403},{"className":1402},[],[1404],{"type":52,"value":1405},"12_tool_rules.ts",{"type":52,"value":1407}," - Tool execution order",{"type":46,"tag":100,"props":1409,"children":1410},{},[1411,1417],{"type":46,"tag":169,"props":1412,"children":1414},{"className":1413},[],[1415],{"type":52,"value":1416},"13_client_side_tools.ts",{"type":52,"value":1268},{"type":46,"tag":89,"props":1419,"children":1421},{"id":1420},"troubleshooting",[1422],{"type":52,"value":1423},"Troubleshooting",{"type":46,"tag":1425,"props":1426,"children":1427},"table",{},[1428,1452],{"type":46,"tag":1429,"props":1430,"children":1431},"thead",{},[1432],{"type":46,"tag":1433,"props":1434,"children":1435},"tr",{},[1436,1442,1447],{"type":46,"tag":1437,"props":1438,"children":1439},"th",{},[1440],{"type":52,"value":1441},"Error",{"type":46,"tag":1437,"props":1443,"children":1444},{},[1445],{"type":52,"value":1446},"Cause",{"type":46,"tag":1437,"props":1448,"children":1449},{},[1450],{"type":52,"value":1451},"Fix",{"type":46,"tag":1453,"props":1454,"children":1455},"tbody",{},[1456,1483,1523,1545,1576,1601,1627,1653],{"type":46,"tag":1433,"props":1457,"children":1458},{},[1459,1465,1470],{"type":46,"tag":1460,"props":1461,"children":1462},"td",{},[1463],{"type":52,"value":1464},"401 Unauthorized",{"type":46,"tag":1460,"props":1466,"children":1467},{},[1468],{"type":52,"value":1469},"Invalid or missing API key",{"type":46,"tag":1460,"props":1471,"children":1472},{},[1473,1475,1481],{"type":52,"value":1474},"Check ",{"type":46,"tag":169,"props":1476,"children":1478},{"className":1477},[],[1479],{"type":52,"value":1480},"LETTA_API_KEY",{"type":52,"value":1482}," env var",{"type":46,"tag":1433,"props":1484,"children":1485},{},[1486,1491,1496],{"type":46,"tag":1460,"props":1487,"children":1488},{},[1489],{"type":52,"value":1490},"422 Validation Error",{"type":46,"tag":1460,"props":1492,"children":1493},{},[1494],{"type":52,"value":1495},"Missing required field",{"type":46,"tag":1460,"props":1497,"children":1498},{},[1499,1501,1507,1509,1515,1517],{"type":52,"value":1500},"Add ",{"type":46,"tag":169,"props":1502,"children":1504},{"className":1503},[],[1505],{"type":52,"value":1506},"model",{"type":52,"value":1508},", ",{"type":46,"tag":169,"props":1510,"children":1512},{"className":1511},[],[1513],{"type":52,"value":1514},"embedding",{"type":52,"value":1516},", or ",{"type":46,"tag":169,"props":1518,"children":1520},{"className":1519},[],[1521],{"type":52,"value":1522},"memory_blocks",{"type":46,"tag":1433,"props":1524,"children":1525},{},[1526,1531,1536],{"type":46,"tag":1460,"props":1527,"children":1528},{},[1529],{"type":52,"value":1530},"Tool not found",{"type":46,"tag":1460,"props":1532,"children":1533},{},[1534],{"type":52,"value":1535},"Tool not attached to agent",{"type":46,"tag":1460,"props":1537,"children":1538},{},[1539],{"type":46,"tag":169,"props":1540,"children":1542},{"className":1541},[],[1543],{"type":52,"value":1544},"client.agents.tools.attach(agent_id, tool_id)",{"type":46,"tag":1433,"props":1546,"children":1547},{},[1548,1558,1563],{"type":46,"tag":1460,"props":1549,"children":1550},{},[1551,1556],{"type":46,"tag":169,"props":1552,"children":1554},{"className":1553},[],[1555],{"type":52,"value":440},{"type":52,"value":1557}," returns None",{"type":46,"tag":1460,"props":1559,"children":1560},{},[1561],{"type":52,"value":1562},"Secret not configured",{"type":46,"tag":1460,"props":1564,"children":1565},{},[1566,1568,1574],{"type":52,"value":1567},"Add to agent via ",{"type":46,"tag":169,"props":1569,"children":1571},{"className":1570},[],[1572],{"type":52,"value":1573},"secrets",{"type":52,"value":1575}," parameter",{"type":46,"tag":1433,"props":1577,"children":1578},{},[1579,1584,1589],{"type":46,"tag":1460,"props":1580,"children":1581},{},[1582],{"type":52,"value":1583},"524 Timeout",{"type":46,"tag":1460,"props":1585,"children":1586},{},[1587],{"type":52,"value":1588},"Long operation without pings",{"type":46,"tag":1460,"props":1590,"children":1591},{},[1592,1593,1599],{"type":52,"value":1500},{"type":46,"tag":169,"props":1594,"children":1596},{"className":1595},[],[1597],{"type":52,"value":1598},"include_pings=True",{"type":52,"value":1600}," to streaming",{"type":46,"tag":1433,"props":1602,"children":1603},{},[1604,1609,1614],{"type":46,"tag":1460,"props":1605,"children":1606},{},[1607],{"type":52,"value":1608},"Agent not responding",{"type":46,"tag":1460,"props":1610,"children":1611},{},[1612],{"type":52,"value":1613},"Model issue or empty response",{"type":46,"tag":1460,"props":1615,"children":1616},{},[1617,1619,1625],{"type":52,"value":1618},"Check for ",{"type":46,"tag":169,"props":1620,"children":1622},{"className":1621},[],[1623],{"type":52,"value":1624},"assistant_message",{"type":52,"value":1626}," type in response",{"type":46,"tag":1433,"props":1628,"children":1629},{},[1630,1635,1640],{"type":46,"tag":1460,"props":1631,"children":1632},{},[1633],{"type":52,"value":1634},"Memory block not updating",{"type":46,"tag":1460,"props":1636,"children":1637},{},[1638],{"type":52,"value":1639},"Looking at wrong agent",{"type":46,"tag":1460,"props":1641,"children":1642},{},[1643,1645,1651],{"type":52,"value":1644},"Verify ",{"type":46,"tag":169,"props":1646,"children":1648},{"className":1647},[],[1649],{"type":52,"value":1650},"agent_id",{"type":52,"value":1652}," matches",{"type":46,"tag":1433,"props":1654,"children":1655},{},[1656,1661,1666],{"type":46,"tag":1460,"props":1657,"children":1658},{},[1659],{"type":52,"value":1660},"Import error in tool",{"type":46,"tag":1460,"props":1662,"children":1663},{},[1664],{"type":52,"value":1665},"Top-level import",{"type":46,"tag":1460,"props":1667,"children":1668},{},[1669],{"type":52,"value":1670},"Move imports inside function body",{"type":46,"tag":89,"props":1672,"children":1674},{"id":1673},"key-gotchas",[1675],{"type":52,"value":1676},"Key Gotchas",{"type":46,"tag":1678,"props":1679,"children":1680},"ol",{},[1681,1691,1708,1731,1741,1758,1782,1797,1813,1830],{"type":46,"tag":100,"props":1682,"children":1683},{},[1684,1689],{"type":46,"tag":61,"props":1685,"children":1686},{},[1687],{"type":52,"value":1688},"Imports in tools must be inside the function",{"type":52,"value":1690}," - Tools run in a sandbox without access to top-level imports",{"type":46,"tag":100,"props":1692,"children":1693},{},[1694,1706],{"type":46,"tag":61,"props":1695,"children":1696},{},[1697,1699,1704],{"type":52,"value":1698},"Use ",{"type":46,"tag":169,"props":1700,"children":1702},{"className":1701},[],[1703],{"type":52,"value":440},{"type":52,"value":1705}," for secrets",{"type":52,"value":1707}," - Don't pass sensitive data as function arguments",{"type":46,"tag":100,"props":1709,"children":1710},{},[1711,1721,1723,1729],{"type":46,"tag":61,"props":1712,"children":1713},{},[1714,1716],{"type":52,"value":1715},"On Cloud, use injected ",{"type":46,"tag":169,"props":1717,"children":1719},{"className":1718},[],[1720],{"type":52,"value":422},{"type":52,"value":1722}," - Don't instantiate ",{"type":46,"tag":169,"props":1724,"children":1726},{"className":1725},[],[1727],{"type":52,"value":1728},"Letta()",{"type":52,"value":1730}," inside tools, use the pre-injected client",{"type":46,"tag":100,"props":1732,"children":1733},{},[1734,1739],{"type":46,"tag":61,"props":1735,"children":1736},{},[1737],{"type":52,"value":1738},"Memory blocks are character-limited",{"type":52,"value":1740}," - Use archival memory for large data",{"type":46,"tag":100,"props":1742,"children":1743},{},[1744,1756],{"type":46,"tag":61,"props":1745,"children":1746},{},[1747,1749,1754],{"type":52,"value":1748},"Streaming requires ",{"type":46,"tag":169,"props":1750,"children":1752},{"className":1751},[],[1753],{"type":52,"value":1598},{"type":52,"value":1755}," for long operations",{"type":52,"value":1757}," - Prevents timeout on Cloud",{"type":46,"tag":100,"props":1759,"children":1760},{},[1761,1780],{"type":46,"tag":61,"props":1762,"children":1763},{},[1764,1766,1772,1774],{"type":52,"value":1765},"SDK 1.0 uses ",{"type":46,"tag":169,"props":1767,"children":1769},{"className":1768},[],[1770],{"type":52,"value":1771},".update()",{"type":52,"value":1773}," not ",{"type":46,"tag":169,"props":1775,"children":1777},{"className":1776},[],[1778],{"type":52,"value":1779},".modify()",{"type":52,"value":1781}," - Method was renamed",{"type":46,"tag":100,"props":1783,"children":1784},{},[1785,1795],{"type":46,"tag":61,"props":1786,"children":1787},{},[1788,1793],{"type":46,"tag":169,"props":1789,"children":1791},{"className":1790},[],[1792],{"type":52,"value":449},{"type":52,"value":1794}," is always available",{"type":52,"value":1796}," - Use it in tools to reference the current agent",{"type":46,"tag":100,"props":1798,"children":1799},{},[1800,1811],{"type":46,"tag":61,"props":1801,"children":1802},{},[1803,1805],{"type":52,"value":1804},"Archival tools need ",{"type":46,"tag":169,"props":1806,"children":1808},{"className":1807},[],[1809],{"type":52,"value":1810},"include_base_tools=True",{"type":52,"value":1812}," - Not attached by default",{"type":46,"tag":100,"props":1814,"children":1815},{},[1816,1828],{"type":46,"tag":61,"props":1817,"children":1818},{},[1819,1820,1826],{"type":52,"value":1698},{"type":46,"tag":169,"props":1821,"children":1823},{"className":1822},[],[1824],{"type":52,"value":1825},"memory_insert",{"type":52,"value":1827}," for shared blocks",{"type":52,"value":1829}," - Safest for concurrent writes (append-only)",{"type":46,"tag":100,"props":1831,"children":1832},{},[1833,1838],{"type":46,"tag":61,"props":1834,"children":1835},{},[1836],{"type":52,"value":1837},"Tool docstrings require Args section",{"type":52,"value":1839}," - Parameters need descriptions or schema generation fails",{"type":46,"tag":89,"props":1841,"children":1843},{"id":1842},"typescript-sdk-notes",[1844],{"type":52,"value":1845},"TypeScript SDK Notes",{"type":46,"tag":721,"props":1847,"children":1849},{"className":855,"code":1848,"language":15,"meta":726,"style":726},"\u002F\u002F Client initialization uses baseURL (not baseUrl)\nconst client = new Letta({ apiKey: \"...\", baseURL: \"http:\u002F\u002Flocalhost:8283\" });\n\n\u002F\u002F Block API: positional args changed\nclient.agents.blocks.attach(blockId, { agent_id });      \u002F\u002F blockId is first\nclient.agents.blocks.retrieve(blockLabel, { agent_id }); \u002F\u002F label is first\n\n\u002F\u002F Passages.create returns array\nconst passages = await client.agents.passages.create(agentId, { text: \"...\" });\nconst passage = passages[0];\n\n\u002F\u002F Content can be string | array - use type guard\nconst content = typeof msg.content === \"string\" ? msg.content : JSON.stringify(msg.content);\n\n\u002F\u002F Conversations API returns streams by default\nconst stream = await client.conversations.messages.create(convId, { messages: [...] });\nfor await (const chunk of stream) { ... }\n\n\u002F\u002F Tool rule types\n{ type: \"run_first\", tool_name: \"...\" }           \u002F\u002F InitToolRule\n{ type: \"constrain_child_tools\", tool_name: \"...\", children: [...] } \u002F\u002F ChildToolRule  \n{ type: \"exit_loop\", tool_name: \"...\" }           \u002F\u002F TerminalToolRule\n",[1850],{"type":46,"tag":169,"props":1851,"children":1852},{"__ignoreMap":726},[1853,1861,1951,1958,1966,2035,2101,2108,2117,2216,2253,2261,2270,2377,2385,2394,2493,2544,2552,2561,2624,2711],{"type":46,"tag":732,"props":1854,"children":1855},{"class":734,"line":735},[1856],{"type":46,"tag":732,"props":1857,"children":1858},{"style":924},[1859],{"type":52,"value":1860},"\u002F\u002F Client initialization uses baseURL (not baseUrl)\n",{"type":46,"tag":732,"props":1862,"children":1863},{"class":734,"line":772},[1864,1868,1872,1876,1880,1884,1888,1892,1896,1900,1904,1909,1913,1918,1923,1927,1931,1935,1939,1943,1947],{"type":46,"tag":732,"props":1865,"children":1866},{"style":933},[1867],{"type":52,"value":936},{"type":46,"tag":732,"props":1869,"children":1870},{"style":878},[1871],{"type":52,"value":941},{"type":46,"tag":732,"props":1873,"children":1874},{"style":872},[1875],{"type":52,"value":946},{"type":46,"tag":732,"props":1877,"children":1878},{"style":872},[1879],{"type":52,"value":951},{"type":46,"tag":732,"props":1881,"children":1882},{"style":954},[1883],{"type":52,"value":881},{"type":46,"tag":732,"props":1885,"children":1886},{"style":878},[1887],{"type":52,"value":961},{"type":46,"tag":732,"props":1889,"children":1890},{"style":872},[1891],{"type":52,"value":966},{"type":46,"tag":732,"props":1893,"children":1894},{"style":969},[1895],{"type":52,"value":972},{"type":46,"tag":732,"props":1897,"children":1898},{"style":872},[1899],{"type":52,"value":977},{"type":46,"tag":732,"props":1901,"children":1902},{"style":872},[1903],{"type":52,"value":896},{"type":46,"tag":732,"props":1905,"children":1906},{"style":745},[1907],{"type":52,"value":1908},"...",{"type":46,"tag":732,"props":1910,"children":1911},{"style":872},[1912],{"type":52,"value":906},{"type":46,"tag":732,"props":1914,"children":1915},{"style":872},[1916],{"type":52,"value":1917},",",{"type":46,"tag":732,"props":1919,"children":1920},{"style":969},[1921],{"type":52,"value":1922}," baseURL",{"type":46,"tag":732,"props":1924,"children":1925},{"style":872},[1926],{"type":52,"value":977},{"type":46,"tag":732,"props":1928,"children":1929},{"style":872},[1930],{"type":52,"value":896},{"type":46,"tag":732,"props":1932,"children":1933},{"style":745},[1934],{"type":52,"value":1079},{"type":46,"tag":732,"props":1936,"children":1937},{"style":872},[1938],{"type":52,"value":906},{"type":46,"tag":732,"props":1940,"children":1941},{"style":872},[1942],{"type":52,"value":886},{"type":46,"tag":732,"props":1944,"children":1945},{"style":878},[1946],{"type":52,"value":1011},{"type":46,"tag":732,"props":1948,"children":1949},{"style":872},[1950],{"type":52,"value":911},{"type":46,"tag":732,"props":1952,"children":1953},{"class":734,"line":782},[1954],{"type":46,"tag":732,"props":1955,"children":1956},{"emptyLinePlaceholder":776},[1957],{"type":52,"value":779},{"type":46,"tag":732,"props":1959,"children":1960},{"class":734,"line":791},[1961],{"type":46,"tag":732,"props":1962,"children":1963},{"style":924},[1964],{"type":52,"value":1965},"\u002F\u002F Block API: positional args changed\n",{"type":46,"tag":732,"props":1967,"children":1968},{"class":734,"line":800},[1969,1973,1977,1981,1985,1990,1994,1999,2004,2008,2012,2017,2021,2025,2030],{"type":46,"tag":732,"props":1970,"children":1971},{"style":878},[1972],{"type":52,"value":422},{"type":46,"tag":732,"props":1974,"children":1975},{"style":872},[1976],{"type":52,"value":987},{"type":46,"tag":732,"props":1978,"children":1979},{"style":878},[1980],{"type":52,"value":25},{"type":46,"tag":732,"props":1982,"children":1983},{"style":872},[1984],{"type":52,"value":987},{"type":46,"tag":732,"props":1986,"children":1987},{"style":878},[1988],{"type":52,"value":1989},"blocks",{"type":46,"tag":732,"props":1991,"children":1992},{"style":872},[1993],{"type":52,"value":987},{"type":46,"tag":732,"props":1995,"children":1996},{"style":954},[1997],{"type":52,"value":1998},"attach",{"type":46,"tag":732,"props":2000,"children":2001},{"style":878},[2002],{"type":52,"value":2003},"(blockId",{"type":46,"tag":732,"props":2005,"children":2006},{"style":872},[2007],{"type":52,"value":1917},{"type":46,"tag":732,"props":2009,"children":2010},{"style":872},[2011],{"type":52,"value":875},{"type":46,"tag":732,"props":2013,"children":2014},{"style":878},[2015],{"type":52,"value":2016}," agent_id ",{"type":46,"tag":732,"props":2018,"children":2019},{"style":872},[2020],{"type":52,"value":1006},{"type":46,"tag":732,"props":2022,"children":2023},{"style":878},[2024],{"type":52,"value":1011},{"type":46,"tag":732,"props":2026,"children":2027},{"style":872},[2028],{"type":52,"value":2029},";",{"type":46,"tag":732,"props":2031,"children":2032},{"style":924},[2033],{"type":52,"value":2034},"      \u002F\u002F blockId is first\n",{"type":46,"tag":732,"props":2036,"children":2037},{"class":734,"line":808},[2038,2042,2046,2050,2054,2058,2062,2067,2072,2076,2080,2084,2088,2092,2096],{"type":46,"tag":732,"props":2039,"children":2040},{"style":878},[2041],{"type":52,"value":422},{"type":46,"tag":732,"props":2043,"children":2044},{"style":872},[2045],{"type":52,"value":987},{"type":46,"tag":732,"props":2047,"children":2048},{"style":878},[2049],{"type":52,"value":25},{"type":46,"tag":732,"props":2051,"children":2052},{"style":872},[2053],{"type":52,"value":987},{"type":46,"tag":732,"props":2055,"children":2056},{"style":878},[2057],{"type":52,"value":1989},{"type":46,"tag":732,"props":2059,"children":2060},{"style":872},[2061],{"type":52,"value":987},{"type":46,"tag":732,"props":2063,"children":2064},{"style":954},[2065],{"type":52,"value":2066},"retrieve",{"type":46,"tag":732,"props":2068,"children":2069},{"style":878},[2070],{"type":52,"value":2071},"(blockLabel",{"type":46,"tag":732,"props":2073,"children":2074},{"style":872},[2075],{"type":52,"value":1917},{"type":46,"tag":732,"props":2077,"children":2078},{"style":872},[2079],{"type":52,"value":875},{"type":46,"tag":732,"props":2081,"children":2082},{"style":878},[2083],{"type":52,"value":2016},{"type":46,"tag":732,"props":2085,"children":2086},{"style":872},[2087],{"type":52,"value":1006},{"type":46,"tag":732,"props":2089,"children":2090},{"style":878},[2091],{"type":52,"value":1011},{"type":46,"tag":732,"props":2093,"children":2094},{"style":872},[2095],{"type":52,"value":2029},{"type":46,"tag":732,"props":2097,"children":2098},{"style":924},[2099],{"type":52,"value":2100}," \u002F\u002F label is first\n",{"type":46,"tag":732,"props":2102,"children":2103},{"class":734,"line":817},[2104],{"type":46,"tag":732,"props":2105,"children":2106},{"emptyLinePlaceholder":776},[2107],{"type":52,"value":779},{"type":46,"tag":732,"props":2109,"children":2111},{"class":734,"line":2110},8,[2112],{"type":46,"tag":732,"props":2113,"children":2114},{"style":924},[2115],{"type":52,"value":2116},"\u002F\u002F Passages.create returns array\n",{"type":46,"tag":732,"props":2118,"children":2120},{"class":734,"line":2119},9,[2121,2125,2130,2134,2139,2144,2148,2152,2156,2161,2165,2170,2175,2179,2183,2188,2192,2196,2200,2204,2208,2212],{"type":46,"tag":732,"props":2122,"children":2123},{"style":933},[2124],{"type":52,"value":936},{"type":46,"tag":732,"props":2126,"children":2127},{"style":878},[2128],{"type":52,"value":2129}," passages ",{"type":46,"tag":732,"props":2131,"children":2132},{"style":872},[2133],{"type":52,"value":946},{"type":46,"tag":732,"props":2135,"children":2136},{"style":866},[2137],{"type":52,"value":2138}," await",{"type":46,"tag":732,"props":2140,"children":2141},{"style":878},[2142],{"type":52,"value":2143}," client",{"type":46,"tag":732,"props":2145,"children":2146},{"style":872},[2147],{"type":52,"value":987},{"type":46,"tag":732,"props":2149,"children":2150},{"style":878},[2151],{"type":52,"value":25},{"type":46,"tag":732,"props":2153,"children":2154},{"style":872},[2155],{"type":52,"value":987},{"type":46,"tag":732,"props":2157,"children":2158},{"style":878},[2159],{"type":52,"value":2160},"passages",{"type":46,"tag":732,"props":2162,"children":2163},{"style":872},[2164],{"type":52,"value":987},{"type":46,"tag":732,"props":2166,"children":2167},{"style":954},[2168],{"type":52,"value":2169},"create",{"type":46,"tag":732,"props":2171,"children":2172},{"style":878},[2173],{"type":52,"value":2174},"(agentId",{"type":46,"tag":732,"props":2176,"children":2177},{"style":872},[2178],{"type":52,"value":1917},{"type":46,"tag":732,"props":2180,"children":2181},{"style":872},[2182],{"type":52,"value":875},{"type":46,"tag":732,"props":2184,"children":2185},{"style":969},[2186],{"type":52,"value":2187}," text",{"type":46,"tag":732,"props":2189,"children":2190},{"style":872},[2191],{"type":52,"value":977},{"type":46,"tag":732,"props":2193,"children":2194},{"style":872},[2195],{"type":52,"value":896},{"type":46,"tag":732,"props":2197,"children":2198},{"style":745},[2199],{"type":52,"value":1908},{"type":46,"tag":732,"props":2201,"children":2202},{"style":872},[2203],{"type":52,"value":906},{"type":46,"tag":732,"props":2205,"children":2206},{"style":872},[2207],{"type":52,"value":886},{"type":46,"tag":732,"props":2209,"children":2210},{"style":878},[2211],{"type":52,"value":1011},{"type":46,"tag":732,"props":2213,"children":2214},{"style":872},[2215],{"type":52,"value":911},{"type":46,"tag":732,"props":2217,"children":2219},{"class":734,"line":2218},10,[2220,2224,2229,2233,2238,2244,2249],{"type":46,"tag":732,"props":2221,"children":2222},{"style":933},[2223],{"type":52,"value":936},{"type":46,"tag":732,"props":2225,"children":2226},{"style":878},[2227],{"type":52,"value":2228}," passage ",{"type":46,"tag":732,"props":2230,"children":2231},{"style":872},[2232],{"type":52,"value":946},{"type":46,"tag":732,"props":2234,"children":2235},{"style":878},[2236],{"type":52,"value":2237}," passages[",{"type":46,"tag":732,"props":2239,"children":2241},{"style":2240},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[2242],{"type":52,"value":2243},"0",{"type":46,"tag":732,"props":2245,"children":2246},{"style":878},[2247],{"type":52,"value":2248},"]",{"type":46,"tag":732,"props":2250,"children":2251},{"style":872},[2252],{"type":52,"value":911},{"type":46,"tag":732,"props":2254,"children":2256},{"class":734,"line":2255},11,[2257],{"type":46,"tag":732,"props":2258,"children":2259},{"emptyLinePlaceholder":776},[2260],{"type":52,"value":779},{"type":46,"tag":732,"props":2262,"children":2264},{"class":734,"line":2263},12,[2265],{"type":46,"tag":732,"props":2266,"children":2267},{"style":924},[2268],{"type":52,"value":2269},"\u002F\u002F Content can be string | array - use type guard\n",{"type":46,"tag":732,"props":2271,"children":2273},{"class":734,"line":2272},13,[2274,2278,2283,2287,2292,2297,2301,2306,2311,2315,2320,2324,2329,2333,2337,2341,2345,2350,2354,2359,2364,2368,2373],{"type":46,"tag":732,"props":2275,"children":2276},{"style":933},[2277],{"type":52,"value":936},{"type":46,"tag":732,"props":2279,"children":2280},{"style":878},[2281],{"type":52,"value":2282}," content ",{"type":46,"tag":732,"props":2284,"children":2285},{"style":872},[2286],{"type":52,"value":946},{"type":46,"tag":732,"props":2288,"children":2289},{"style":872},[2290],{"type":52,"value":2291}," typeof",{"type":46,"tag":732,"props":2293,"children":2294},{"style":878},[2295],{"type":52,"value":2296}," msg",{"type":46,"tag":732,"props":2298,"children":2299},{"style":872},[2300],{"type":52,"value":987},{"type":46,"tag":732,"props":2302,"children":2303},{"style":878},[2304],{"type":52,"value":2305},"content ",{"type":46,"tag":732,"props":2307,"children":2308},{"style":872},[2309],{"type":52,"value":2310},"===",{"type":46,"tag":732,"props":2312,"children":2313},{"style":872},[2314],{"type":52,"value":896},{"type":46,"tag":732,"props":2316,"children":2317},{"style":745},[2318],{"type":52,"value":2319},"string",{"type":46,"tag":732,"props":2321,"children":2322},{"style":872},[2323],{"type":52,"value":906},{"type":46,"tag":732,"props":2325,"children":2326},{"style":872},[2327],{"type":52,"value":2328}," ?",{"type":46,"tag":732,"props":2330,"children":2331},{"style":878},[2332],{"type":52,"value":2296},{"type":46,"tag":732,"props":2334,"children":2335},{"style":872},[2336],{"type":52,"value":987},{"type":46,"tag":732,"props":2338,"children":2339},{"style":878},[2340],{"type":52,"value":2305},{"type":46,"tag":732,"props":2342,"children":2343},{"style":872},[2344],{"type":52,"value":977},{"type":46,"tag":732,"props":2346,"children":2347},{"style":878},[2348],{"type":52,"value":2349}," JSON",{"type":46,"tag":732,"props":2351,"children":2352},{"style":872},[2353],{"type":52,"value":987},{"type":46,"tag":732,"props":2355,"children":2356},{"style":954},[2357],{"type":52,"value":2358},"stringify",{"type":46,"tag":732,"props":2360,"children":2361},{"style":878},[2362],{"type":52,"value":2363},"(msg",{"type":46,"tag":732,"props":2365,"children":2366},{"style":872},[2367],{"type":52,"value":987},{"type":46,"tag":732,"props":2369,"children":2370},{"style":878},[2371],{"type":52,"value":2372},"content)",{"type":46,"tag":732,"props":2374,"children":2375},{"style":872},[2376],{"type":52,"value":911},{"type":46,"tag":732,"props":2378,"children":2380},{"class":734,"line":2379},14,[2381],{"type":46,"tag":732,"props":2382,"children":2383},{"emptyLinePlaceholder":776},[2384],{"type":52,"value":779},{"type":46,"tag":732,"props":2386,"children":2388},{"class":734,"line":2387},15,[2389],{"type":46,"tag":732,"props":2390,"children":2391},{"style":924},[2392],{"type":52,"value":2393},"\u002F\u002F Conversations API returns streams by default\n",{"type":46,"tag":732,"props":2395,"children":2397},{"class":734,"line":2396},16,[2398,2402,2407,2411,2415,2419,2423,2428,2432,2437,2441,2445,2450,2454,2458,2463,2467,2472,2476,2481,2485,2489],{"type":46,"tag":732,"props":2399,"children":2400},{"style":933},[2401],{"type":52,"value":936},{"type":46,"tag":732,"props":2403,"children":2404},{"style":878},[2405],{"type":52,"value":2406}," stream ",{"type":46,"tag":732,"props":2408,"children":2409},{"style":872},[2410],{"type":52,"value":946},{"type":46,"tag":732,"props":2412,"children":2413},{"style":866},[2414],{"type":52,"value":2138},{"type":46,"tag":732,"props":2416,"children":2417},{"style":878},[2418],{"type":52,"value":2143},{"type":46,"tag":732,"props":2420,"children":2421},{"style":872},[2422],{"type":52,"value":987},{"type":46,"tag":732,"props":2424,"children":2425},{"style":878},[2426],{"type":52,"value":2427},"conversations",{"type":46,"tag":732,"props":2429,"children":2430},{"style":872},[2431],{"type":52,"value":987},{"type":46,"tag":732,"props":2433,"children":2434},{"style":878},[2435],{"type":52,"value":2436},"messages",{"type":46,"tag":732,"props":2438,"children":2439},{"style":872},[2440],{"type":52,"value":987},{"type":46,"tag":732,"props":2442,"children":2443},{"style":954},[2444],{"type":52,"value":2169},{"type":46,"tag":732,"props":2446,"children":2447},{"style":878},[2448],{"type":52,"value":2449},"(convId",{"type":46,"tag":732,"props":2451,"children":2452},{"style":872},[2453],{"type":52,"value":1917},{"type":46,"tag":732,"props":2455,"children":2456},{"style":872},[2457],{"type":52,"value":875},{"type":46,"tag":732,"props":2459,"children":2460},{"style":969},[2461],{"type":52,"value":2462}," messages",{"type":46,"tag":732,"props":2464,"children":2465},{"style":872},[2466],{"type":52,"value":977},{"type":46,"tag":732,"props":2468,"children":2469},{"style":878},[2470],{"type":52,"value":2471}," [",{"type":46,"tag":732,"props":2473,"children":2474},{"style":872},[2475],{"type":52,"value":1908},{"type":46,"tag":732,"props":2477,"children":2478},{"style":878},[2479],{"type":52,"value":2480},"] ",{"type":46,"tag":732,"props":2482,"children":2483},{"style":872},[2484],{"type":52,"value":1006},{"type":46,"tag":732,"props":2486,"children":2487},{"style":878},[2488],{"type":52,"value":1011},{"type":46,"tag":732,"props":2490,"children":2491},{"style":872},[2492],{"type":52,"value":911},{"type":46,"tag":732,"props":2494,"children":2496},{"class":734,"line":2495},17,[2497,2502,2506,2511,2515,2520,2525,2530,2534,2539],{"type":46,"tag":732,"props":2498,"children":2499},{"style":866},[2500],{"type":52,"value":2501},"for",{"type":46,"tag":732,"props":2503,"children":2504},{"style":866},[2505],{"type":52,"value":2138},{"type":46,"tag":732,"props":2507,"children":2508},{"style":878},[2509],{"type":52,"value":2510}," (",{"type":46,"tag":732,"props":2512,"children":2513},{"style":933},[2514],{"type":52,"value":936},{"type":46,"tag":732,"props":2516,"children":2517},{"style":878},[2518],{"type":52,"value":2519}," chunk ",{"type":46,"tag":732,"props":2521,"children":2522},{"style":872},[2523],{"type":52,"value":2524},"of",{"type":46,"tag":732,"props":2526,"children":2527},{"style":878},[2528],{"type":52,"value":2529}," stream) ",{"type":46,"tag":732,"props":2531,"children":2532},{"style":872},[2533],{"type":52,"value":966},{"type":46,"tag":732,"props":2535,"children":2536},{"style":872},[2537],{"type":52,"value":2538}," ...",{"type":46,"tag":732,"props":2540,"children":2541},{"style":872},[2542],{"type":52,"value":2543}," }\n",{"type":46,"tag":732,"props":2545,"children":2547},{"class":734,"line":2546},18,[2548],{"type":46,"tag":732,"props":2549,"children":2550},{"emptyLinePlaceholder":776},[2551],{"type":52,"value":779},{"type":46,"tag":732,"props":2553,"children":2555},{"class":734,"line":2554},19,[2556],{"type":46,"tag":732,"props":2557,"children":2558},{"style":924},[2559],{"type":52,"value":2560},"\u002F\u002F Tool rule types\n",{"type":46,"tag":732,"props":2562,"children":2563},{"class":734,"line":33},[2564,2568,2573,2577,2581,2586,2590,2594,2599,2603,2607,2611,2615,2619],{"type":46,"tag":732,"props":2565,"children":2566},{"style":872},[2567],{"type":52,"value":966},{"type":46,"tag":732,"props":2569,"children":2570},{"style":739},[2571],{"type":52,"value":2572}," type",{"type":46,"tag":732,"props":2574,"children":2575},{"style":872},[2576],{"type":52,"value":977},{"type":46,"tag":732,"props":2578,"children":2579},{"style":872},[2580],{"type":52,"value":896},{"type":46,"tag":732,"props":2582,"children":2583},{"style":745},[2584],{"type":52,"value":2585},"run_first",{"type":46,"tag":732,"props":2587,"children":2588},{"style":872},[2589],{"type":52,"value":906},{"type":46,"tag":732,"props":2591,"children":2592},{"style":872},[2593],{"type":52,"value":1917},{"type":46,"tag":732,"props":2595,"children":2596},{"style":739},[2597],{"type":52,"value":2598}," tool_name",{"type":46,"tag":732,"props":2600,"children":2601},{"style":872},[2602],{"type":52,"value":977},{"type":46,"tag":732,"props":2604,"children":2605},{"style":872},[2606],{"type":52,"value":896},{"type":46,"tag":732,"props":2608,"children":2609},{"style":745},[2610],{"type":52,"value":1908},{"type":46,"tag":732,"props":2612,"children":2613},{"style":872},[2614],{"type":52,"value":906},{"type":46,"tag":732,"props":2616,"children":2617},{"style":872},[2618],{"type":52,"value":886},{"type":46,"tag":732,"props":2620,"children":2621},{"style":924},[2622],{"type":52,"value":2623},"           \u002F\u002F InitToolRule\n",{"type":46,"tag":732,"props":2625,"children":2627},{"class":734,"line":2626},21,[2628,2632,2636,2640,2644,2649,2653,2657,2661,2665,2669,2673,2677,2681,2686,2690,2694,2698,2702,2706],{"type":46,"tag":732,"props":2629,"children":2630},{"style":872},[2631],{"type":52,"value":966},{"type":46,"tag":732,"props":2633,"children":2634},{"style":739},[2635],{"type":52,"value":2572},{"type":46,"tag":732,"props":2637,"children":2638},{"style":872},[2639],{"type":52,"value":977},{"type":46,"tag":732,"props":2641,"children":2642},{"style":872},[2643],{"type":52,"value":896},{"type":46,"tag":732,"props":2645,"children":2646},{"style":745},[2647],{"type":52,"value":2648},"constrain_child_tools",{"type":46,"tag":732,"props":2650,"children":2651},{"style":872},[2652],{"type":52,"value":906},{"type":46,"tag":732,"props":2654,"children":2655},{"style":872},[2656],{"type":52,"value":1917},{"type":46,"tag":732,"props":2658,"children":2659},{"style":739},[2660],{"type":52,"value":2598},{"type":46,"tag":732,"props":2662,"children":2663},{"style":872},[2664],{"type":52,"value":977},{"type":46,"tag":732,"props":2666,"children":2667},{"style":872},[2668],{"type":52,"value":896},{"type":46,"tag":732,"props":2670,"children":2671},{"style":745},[2672],{"type":52,"value":1908},{"type":46,"tag":732,"props":2674,"children":2675},{"style":872},[2676],{"type":52,"value":906},{"type":46,"tag":732,"props":2678,"children":2679},{"style":872},[2680],{"type":52,"value":1917},{"type":46,"tag":732,"props":2682,"children":2683},{"style":739},[2684],{"type":52,"value":2685}," children",{"type":46,"tag":732,"props":2687,"children":2688},{"style":872},[2689],{"type":52,"value":977},{"type":46,"tag":732,"props":2691,"children":2692},{"style":969},[2693],{"type":52,"value":2471},{"type":46,"tag":732,"props":2695,"children":2696},{"style":872},[2697],{"type":52,"value":1908},{"type":46,"tag":732,"props":2699,"children":2700},{"style":969},[2701],{"type":52,"value":2480},{"type":46,"tag":732,"props":2703,"children":2704},{"style":872},[2705],{"type":52,"value":1006},{"type":46,"tag":732,"props":2707,"children":2708},{"style":924},[2709],{"type":52,"value":2710}," \u002F\u002F ChildToolRule  \n",{"type":46,"tag":732,"props":2712,"children":2714},{"class":734,"line":2713},22,[2715,2719,2723,2727,2731,2736,2740,2744,2748,2752,2756,2760,2764,2768],{"type":46,"tag":732,"props":2716,"children":2717},{"style":872},[2718],{"type":52,"value":966},{"type":46,"tag":732,"props":2720,"children":2721},{"style":739},[2722],{"type":52,"value":2572},{"type":46,"tag":732,"props":2724,"children":2725},{"style":872},[2726],{"type":52,"value":977},{"type":46,"tag":732,"props":2728,"children":2729},{"style":872},[2730],{"type":52,"value":896},{"type":46,"tag":732,"props":2732,"children":2733},{"style":745},[2734],{"type":52,"value":2735},"exit_loop",{"type":46,"tag":732,"props":2737,"children":2738},{"style":872},[2739],{"type":52,"value":906},{"type":46,"tag":732,"props":2741,"children":2742},{"style":872},[2743],{"type":52,"value":1917},{"type":46,"tag":732,"props":2745,"children":2746},{"style":739},[2747],{"type":52,"value":2598},{"type":46,"tag":732,"props":2749,"children":2750},{"style":872},[2751],{"type":52,"value":977},{"type":46,"tag":732,"props":2753,"children":2754},{"style":872},[2755],{"type":52,"value":896},{"type":46,"tag":732,"props":2757,"children":2758},{"style":745},[2759],{"type":52,"value":1908},{"type":46,"tag":732,"props":2761,"children":2762},{"style":872},[2763],{"type":52,"value":906},{"type":46,"tag":732,"props":2765,"children":2766},{"style":872},[2767],{"type":52,"value":886},{"type":46,"tag":732,"props":2769,"children":2770},{"style":924},[2771],{"type":52,"value":2772},"           \u002F\u002F TerminalToolRule\n",{"type":46,"tag":89,"props":2774,"children":2776},{"id":2775},"quick-reference-1",[2777],{"type":52,"value":714},{"type":46,"tag":721,"props":2779,"children":2781},{"className":756,"code":2780,"language":22,"meta":726,"style":726},"# Client\nclient = Letta(api_key=os.getenv(\"LETTA_API_KEY\"))\n\n# Create agent\nagent = client.agents.create(\n    model=\"anthropic\u002Fclaude-sonnet-4-5-20250929\",\n    embedding=\"openai\u002Ftext-embedding-3-small\",\n    memory_blocks=[{\"label\": \"persona\", \"value\": \"...\"}],\n    include_base_tools=True,  # archival memory tools\n    enable_sleeptime=True,    # background memory processing\n)\n\n# Send message\nresponse = client.agents.messages.create(\n    agent_id=agent.id,\n    messages=[{\"role\": \"user\", \"content\": \"Hello\"}]\n)\n\n# Stream response\nstream = client.agents.messages.stream(\n    agent_id=agent.id,\n    messages=[{\"role\": \"user\", \"content\": \"Hello\"}],\n    stream_tokens=True,\n    include_pings=True,  # prevent timeout\n)\n\n# Create tool\ntool = client.tools.create(source_code=\"def my_tool(x: str) -> str: ...\")\nclient.agents.tools.attach(agent_id=agent.id, tool_id=tool.id)\n\n# Memory blocks\nclient.agents.blocks.retrieve(agent_id=agent.id, block_label=\"persona\")\nclient.agents.blocks.update(agent_id=agent.id, block_label=\"persona\", value=\"...\")\n\n# Folders\nfolder = client.folders.create(name=\"docs\")\nclient.folders.files.upload(file=f, folder_id=folder.id)\nclient.agents.folders.attach(agent_id=agent.id, folder_id=folder.id)\n\n# Conversations (parallel sessions)\nconv = client.conversations.create(agent_id=agent.id)\nstream = client.conversations.messages.create(conv.id, messages=[...])\n\n# Agent secrets (for tools)\nclient.agents.update(agent_id=agent.id, secrets={\"API_KEY\": \"...\"})\n",[2782],{"type":46,"tag":169,"props":2783,"children":2784},{"__ignoreMap":726},[2785,2793,2801,2808,2816,2824,2832,2840,2848,2856,2864,2872,2879,2887,2895,2903,2911,2918,2925,2933,2941,2948,2956,2965,2974,2982,2990,2999,3008,3017,3025,3034,3043,3052,3060,3069,3078,3087,3096,3104,3113,3122,3131,3139,3148],{"type":46,"tag":732,"props":2786,"children":2787},{"class":734,"line":735},[2788],{"type":46,"tag":732,"props":2789,"children":2790},{},[2791],{"type":52,"value":2792},"# Client\n",{"type":46,"tag":732,"props":2794,"children":2795},{"class":734,"line":772},[2796],{"type":46,"tag":732,"props":2797,"children":2798},{},[2799],{"type":52,"value":2800},"client = Letta(api_key=os.getenv(\"LETTA_API_KEY\"))\n",{"type":46,"tag":732,"props":2802,"children":2803},{"class":734,"line":782},[2804],{"type":46,"tag":732,"props":2805,"children":2806},{"emptyLinePlaceholder":776},[2807],{"type":52,"value":779},{"type":46,"tag":732,"props":2809,"children":2810},{"class":734,"line":791},[2811],{"type":46,"tag":732,"props":2812,"children":2813},{},[2814],{"type":52,"value":2815},"# Create agent\n",{"type":46,"tag":732,"props":2817,"children":2818},{"class":734,"line":800},[2819],{"type":46,"tag":732,"props":2820,"children":2821},{},[2822],{"type":52,"value":2823},"agent = client.agents.create(\n",{"type":46,"tag":732,"props":2825,"children":2826},{"class":734,"line":808},[2827],{"type":46,"tag":732,"props":2828,"children":2829},{},[2830],{"type":52,"value":2831},"    model=\"anthropic\u002Fclaude-sonnet-4-5-20250929\",\n",{"type":46,"tag":732,"props":2833,"children":2834},{"class":734,"line":817},[2835],{"type":46,"tag":732,"props":2836,"children":2837},{},[2838],{"type":52,"value":2839},"    embedding=\"openai\u002Ftext-embedding-3-small\",\n",{"type":46,"tag":732,"props":2841,"children":2842},{"class":734,"line":2110},[2843],{"type":46,"tag":732,"props":2844,"children":2845},{},[2846],{"type":52,"value":2847},"    memory_blocks=[{\"label\": \"persona\", \"value\": \"...\"}],\n",{"type":46,"tag":732,"props":2849,"children":2850},{"class":734,"line":2119},[2851],{"type":46,"tag":732,"props":2852,"children":2853},{},[2854],{"type":52,"value":2855},"    include_base_tools=True,  # archival memory tools\n",{"type":46,"tag":732,"props":2857,"children":2858},{"class":734,"line":2218},[2859],{"type":46,"tag":732,"props":2860,"children":2861},{},[2862],{"type":52,"value":2863},"    enable_sleeptime=True,    # background memory processing\n",{"type":46,"tag":732,"props":2865,"children":2866},{"class":734,"line":2255},[2867],{"type":46,"tag":732,"props":2868,"children":2869},{},[2870],{"type":52,"value":2871},")\n",{"type":46,"tag":732,"props":2873,"children":2874},{"class":734,"line":2263},[2875],{"type":46,"tag":732,"props":2876,"children":2877},{"emptyLinePlaceholder":776},[2878],{"type":52,"value":779},{"type":46,"tag":732,"props":2880,"children":2881},{"class":734,"line":2272},[2882],{"type":46,"tag":732,"props":2883,"children":2884},{},[2885],{"type":52,"value":2886},"# Send message\n",{"type":46,"tag":732,"props":2888,"children":2889},{"class":734,"line":2379},[2890],{"type":46,"tag":732,"props":2891,"children":2892},{},[2893],{"type":52,"value":2894},"response = client.agents.messages.create(\n",{"type":46,"tag":732,"props":2896,"children":2897},{"class":734,"line":2387},[2898],{"type":46,"tag":732,"props":2899,"children":2900},{},[2901],{"type":52,"value":2902},"    agent_id=agent.id,\n",{"type":46,"tag":732,"props":2904,"children":2905},{"class":734,"line":2396},[2906],{"type":46,"tag":732,"props":2907,"children":2908},{},[2909],{"type":52,"value":2910},"    messages=[{\"role\": \"user\", \"content\": \"Hello\"}]\n",{"type":46,"tag":732,"props":2912,"children":2913},{"class":734,"line":2495},[2914],{"type":46,"tag":732,"props":2915,"children":2916},{},[2917],{"type":52,"value":2871},{"type":46,"tag":732,"props":2919,"children":2920},{"class":734,"line":2546},[2921],{"type":46,"tag":732,"props":2922,"children":2923},{"emptyLinePlaceholder":776},[2924],{"type":52,"value":779},{"type":46,"tag":732,"props":2926,"children":2927},{"class":734,"line":2554},[2928],{"type":46,"tag":732,"props":2929,"children":2930},{},[2931],{"type":52,"value":2932},"# Stream response\n",{"type":46,"tag":732,"props":2934,"children":2935},{"class":734,"line":33},[2936],{"type":46,"tag":732,"props":2937,"children":2938},{},[2939],{"type":52,"value":2940},"stream = client.agents.messages.stream(\n",{"type":46,"tag":732,"props":2942,"children":2943},{"class":734,"line":2626},[2944],{"type":46,"tag":732,"props":2945,"children":2946},{},[2947],{"type":52,"value":2902},{"type":46,"tag":732,"props":2949,"children":2950},{"class":734,"line":2713},[2951],{"type":46,"tag":732,"props":2952,"children":2953},{},[2954],{"type":52,"value":2955},"    messages=[{\"role\": \"user\", \"content\": \"Hello\"}],\n",{"type":46,"tag":732,"props":2957,"children":2959},{"class":734,"line":2958},23,[2960],{"type":46,"tag":732,"props":2961,"children":2962},{},[2963],{"type":52,"value":2964},"    stream_tokens=True,\n",{"type":46,"tag":732,"props":2966,"children":2968},{"class":734,"line":2967},24,[2969],{"type":46,"tag":732,"props":2970,"children":2971},{},[2972],{"type":52,"value":2973},"    include_pings=True,  # prevent timeout\n",{"type":46,"tag":732,"props":2975,"children":2977},{"class":734,"line":2976},25,[2978],{"type":46,"tag":732,"props":2979,"children":2980},{},[2981],{"type":52,"value":2871},{"type":46,"tag":732,"props":2983,"children":2985},{"class":734,"line":2984},26,[2986],{"type":46,"tag":732,"props":2987,"children":2988},{"emptyLinePlaceholder":776},[2989],{"type":52,"value":779},{"type":46,"tag":732,"props":2991,"children":2993},{"class":734,"line":2992},27,[2994],{"type":46,"tag":732,"props":2995,"children":2996},{},[2997],{"type":52,"value":2998},"# Create tool\n",{"type":46,"tag":732,"props":3000,"children":3002},{"class":734,"line":3001},28,[3003],{"type":46,"tag":732,"props":3004,"children":3005},{},[3006],{"type":52,"value":3007},"tool = client.tools.create(source_code=\"def my_tool(x: str) -> str: ...\")\n",{"type":46,"tag":732,"props":3009,"children":3011},{"class":734,"line":3010},29,[3012],{"type":46,"tag":732,"props":3013,"children":3014},{},[3015],{"type":52,"value":3016},"client.agents.tools.attach(agent_id=agent.id, tool_id=tool.id)\n",{"type":46,"tag":732,"props":3018,"children":3020},{"class":734,"line":3019},30,[3021],{"type":46,"tag":732,"props":3022,"children":3023},{"emptyLinePlaceholder":776},[3024],{"type":52,"value":779},{"type":46,"tag":732,"props":3026,"children":3028},{"class":734,"line":3027},31,[3029],{"type":46,"tag":732,"props":3030,"children":3031},{},[3032],{"type":52,"value":3033},"# Memory blocks\n",{"type":46,"tag":732,"props":3035,"children":3037},{"class":734,"line":3036},32,[3038],{"type":46,"tag":732,"props":3039,"children":3040},{},[3041],{"type":52,"value":3042},"client.agents.blocks.retrieve(agent_id=agent.id, block_label=\"persona\")\n",{"type":46,"tag":732,"props":3044,"children":3046},{"class":734,"line":3045},33,[3047],{"type":46,"tag":732,"props":3048,"children":3049},{},[3050],{"type":52,"value":3051},"client.agents.blocks.update(agent_id=agent.id, block_label=\"persona\", value=\"...\")\n",{"type":46,"tag":732,"props":3053,"children":3055},{"class":734,"line":3054},34,[3056],{"type":46,"tag":732,"props":3057,"children":3058},{"emptyLinePlaceholder":776},[3059],{"type":52,"value":779},{"type":46,"tag":732,"props":3061,"children":3063},{"class":734,"line":3062},35,[3064],{"type":46,"tag":732,"props":3065,"children":3066},{},[3067],{"type":52,"value":3068},"# Folders\n",{"type":46,"tag":732,"props":3070,"children":3072},{"class":734,"line":3071},36,[3073],{"type":46,"tag":732,"props":3074,"children":3075},{},[3076],{"type":52,"value":3077},"folder = client.folders.create(name=\"docs\")\n",{"type":46,"tag":732,"props":3079,"children":3081},{"class":734,"line":3080},37,[3082],{"type":46,"tag":732,"props":3083,"children":3084},{},[3085],{"type":52,"value":3086},"client.folders.files.upload(file=f, folder_id=folder.id)\n",{"type":46,"tag":732,"props":3088,"children":3090},{"class":734,"line":3089},38,[3091],{"type":46,"tag":732,"props":3092,"children":3093},{},[3094],{"type":52,"value":3095},"client.agents.folders.attach(agent_id=agent.id, folder_id=folder.id)\n",{"type":46,"tag":732,"props":3097,"children":3099},{"class":734,"line":3098},39,[3100],{"type":46,"tag":732,"props":3101,"children":3102},{"emptyLinePlaceholder":776},[3103],{"type":52,"value":779},{"type":46,"tag":732,"props":3105,"children":3107},{"class":734,"line":3106},40,[3108],{"type":46,"tag":732,"props":3109,"children":3110},{},[3111],{"type":52,"value":3112},"# Conversations (parallel sessions)\n",{"type":46,"tag":732,"props":3114,"children":3116},{"class":734,"line":3115},41,[3117],{"type":46,"tag":732,"props":3118,"children":3119},{},[3120],{"type":52,"value":3121},"conv = client.conversations.create(agent_id=agent.id)\n",{"type":46,"tag":732,"props":3123,"children":3125},{"class":734,"line":3124},42,[3126],{"type":46,"tag":732,"props":3127,"children":3128},{},[3129],{"type":52,"value":3130},"stream = client.conversations.messages.create(conv.id, messages=[...])\n",{"type":46,"tag":732,"props":3132,"children":3134},{"class":734,"line":3133},43,[3135],{"type":46,"tag":732,"props":3136,"children":3137},{"emptyLinePlaceholder":776},[3138],{"type":52,"value":779},{"type":46,"tag":732,"props":3140,"children":3142},{"class":734,"line":3141},44,[3143],{"type":46,"tag":732,"props":3144,"children":3145},{},[3146],{"type":52,"value":3147},"# Agent secrets (for tools)\n",{"type":46,"tag":732,"props":3149,"children":3151},{"class":734,"line":3150},45,[3152],{"type":46,"tag":732,"props":3153,"children":3154},{},[3155],{"type":52,"value":3156},"client.agents.update(agent_id=agent.id, secrets={\"API_KEY\": \"...\"})\n",{"type":46,"tag":89,"props":3158,"children":3160},{"id":3159},"resources",[3161],{"type":52,"value":3162},"Resources",{"type":46,"tag":55,"props":3164,"children":3165},{},[3166],{"type":46,"tag":61,"props":3167,"children":3168},{},[3169],{"type":52,"value":3170},"Platform:",{"type":46,"tag":96,"props":3172,"children":3173},{},[3174,3186],{"type":46,"tag":100,"props":3175,"children":3176},{},[3177,3184],{"type":46,"tag":69,"props":3178,"children":3181},{"href":3179,"rel":3180},"https:\u002F\u002Fapp.letta.com",[73],[3182],{"type":52,"value":3183},"Letta Cloud (ADE)",{"type":52,"value":3185}," - Agent Development Environment",{"type":46,"tag":100,"props":3187,"children":3188},{},[3189,3196],{"type":46,"tag":69,"props":3190,"children":3193},{"href":3191,"rel":3192},"https:\u002F\u002Fapp.letta.com\u002Fapi-keys",[73],[3194],{"type":52,"value":3195},"API Keys",{"type":52,"value":3197}," - Get your API key",{"type":46,"tag":55,"props":3199,"children":3200},{},[3201],{"type":46,"tag":61,"props":3202,"children":3203},{},[3204],{"type":52,"value":3205},"Documentation:",{"type":46,"tag":96,"props":3207,"children":3208},{},[3209,3221,3233,3245,3257,3269],{"type":46,"tag":100,"props":3210,"children":3211},{},[3212,3219],{"type":46,"tag":69,"props":3213,"children":3216},{"href":3214,"rel":3215},"https:\u002F\u002Fdocs.letta.com",[73],[3217],{"type":52,"value":3218},"Letta Docs",{"type":52,"value":3220}," - Full documentation",{"type":46,"tag":100,"props":3222,"children":3223},{},[3224,3231],{"type":46,"tag":69,"props":3225,"children":3228},{"href":3226,"rel":3227},"https:\u002F\u002Fdocs.letta.com\u002Fguides\u002Fagents\u002Foverview",[73],[3229],{"type":52,"value":3230},"Agents Guide",{"type":52,"value":3232}," - Agent concepts",{"type":46,"tag":100,"props":3234,"children":3235},{},[3236,3243],{"type":46,"tag":69,"props":3237,"children":3240},{"href":3238,"rel":3239},"https:\u002F\u002Fdocs.letta.com\u002Fguides\u002Fagents\u002Fmemory-blocks",[73],[3241],{"type":52,"value":3242},"Memory Blocks",{"type":52,"value":3244}," - Memory architecture",{"type":46,"tag":100,"props":3246,"children":3247},{},[3248,3255],{"type":46,"tag":69,"props":3249,"children":3252},{"href":3250,"rel":3251},"https:\u002F\u002Fdocs.letta.com\u002Fguides\u002Fagents\u002Fcustom-tools",[73],[3253],{"type":52,"value":3254},"Custom Tools",{"type":52,"value":3256}," - Tool creation",{"type":46,"tag":100,"props":3258,"children":3259},{},[3260,3267],{"type":46,"tag":69,"props":3261,"children":3264},{"href":3262,"rel":3263},"https:\u002F\u002Fdocs.letta.com\u002Fguides\u002Fagents\u002Fstreaming",[73],[3265],{"type":52,"value":3266},"Streaming",{"type":52,"value":3268}," - Real-time responses",{"type":46,"tag":100,"props":3270,"children":3271},{},[3272,3279],{"type":46,"tag":69,"props":3273,"children":3276},{"href":3274,"rel":3275},"https:\u002F\u002Fdocs.letta.com\u002Fguides\u002Fagents\u002Fmulti-user",[73],[3277],{"type":52,"value":3278},"Multi-User",{"type":52,"value":3280}," - Scaling patterns",{"type":46,"tag":55,"props":3282,"children":3283},{},[3284],{"type":46,"tag":61,"props":3285,"children":3286},{},[3287],{"type":52,"value":3288},"SDKs:",{"type":46,"tag":96,"props":3290,"children":3291},{},[3292,3309],{"type":46,"tag":100,"props":3293,"children":3294},{},[3295,3301,3303],{"type":46,"tag":69,"props":3296,"children":3299},{"href":3297,"rel":3298},"https:\u002F\u002Fgithub.com\u002Fletta-ai\u002Fletta-python",[73],[3300],{"type":52,"value":165},{"type":52,"value":3302}," - ",{"type":46,"tag":169,"props":3304,"children":3306},{"className":3305},[],[3307],{"type":52,"value":3308},"pip install letta-client",{"type":46,"tag":100,"props":3310,"children":3311},{},[3312,3318,3319],{"type":46,"tag":69,"props":3313,"children":3316},{"href":3314,"rel":3315},"https:\u002F\u002Fgithub.com\u002Fletta-ai\u002Fletta-node",[73],[3317],{"type":52,"value":182},{"type":52,"value":3302},{"type":46,"tag":169,"props":3320,"children":3322},{"className":3321},[],[3323],{"type":52,"value":3324},"npm install @letta-ai\u002Fletta-client",{"type":46,"tag":55,"props":3326,"children":3327},{},[3328],{"type":46,"tag":61,"props":3329,"children":3330},{},[3331],{"type":52,"value":3332},"Examples:",{"type":46,"tag":96,"props":3334,"children":3335},{},[3336],{"type":46,"tag":100,"props":3337,"children":3338},{},[3339,3346],{"type":46,"tag":69,"props":3340,"children":3343},{"href":3341,"rel":3342},"https:\u002F\u002Fgithub.com\u002Fletta-ai\u002Fletta-chatbot-example",[73],[3344],{"type":52,"value":3345},"Chatbot Example",{"type":52,"value":3347}," - Full app example",{"type":46,"tag":3349,"props":3350,"children":3351},"style",{},[3352],{"type":52,"value":3353},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":3355,"total":3513},[3356,3371,3386,3398,3410,3424,3436,3447,3459,3475,3486,3498],{"slug":3357,"name":3357,"fn":3358,"description":3359,"org":3360,"tags":3361,"stars":3369,"repoUrl":71,"updatedAt":3370},"acquiring-skills","discover and install agent skills","Discover and install skills from Hermes, ClawHub, GitHub, and other registries. Load this skill whenever a user asks for a capability you don't already have — image generation, social media, email, calendar, finance, DevOps, search, browser automation, etc.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3362,3363,3366],{"name":24,"slug":25,"type":16},{"name":3364,"slug":3365,"type":16},"Automation","automation",{"name":3367,"slug":3368,"type":16},"GitHub","github",2831,"2026-07-13T06:22:58.45767",{"slug":3372,"name":3373,"fn":3374,"description":3375,"org":3376,"tags":3377,"stars":3369,"repoUrl":71,"updatedAt":3385},"context-doctor","Context Doctor","repair system prompt and memory degradation","Identify and repair degradation in system prompt, external memory, and skills preventing you from following instructions or remembering information as well as you should.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3378,3379,3382],{"name":24,"slug":25,"type":16},{"name":3380,"slug":3381,"type":16},"AI Context","ai-context",{"name":3383,"slug":3384,"type":16},"Debugging","debugging","2026-07-13T06:22:50.151002",{"slug":3387,"name":3387,"fn":3388,"description":3389,"org":3390,"tags":3391,"stars":3369,"repoUrl":71,"updatedAt":3397},"converting-mcps-to-skills","connect MCP servers to create skills","Connect to MCP (Model Context Protocol) servers and create skills for repeated use. Load when a user wants to use an MCP server, connect to external tools via MCP, or when they mention MCP, model context protocol, or specific MCP servers.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3392,3393,3394],{"name":24,"slug":25,"type":16},{"name":3364,"slug":3365,"type":16},{"name":3395,"slug":3396,"type":16},"MCP","mcp","2026-07-13T06:23:37.646079",{"slug":3399,"name":3399,"fn":3400,"description":3401,"org":3402,"tags":3403,"stars":3369,"repoUrl":71,"updatedAt":3409},"creating-mods","create and edit Letta Code mods","Creates and edits trusted local Letta Code mods, including tools, slash commands, local-only model providers, lifecycle\u002Fturn events, scoped conversation helpers, panels, and capability-gated behavior. Use when asked to make a mod, add an agent-callable tool, add a slash command, add a local provider\u002Fmodel adapter, transform turns, react to app events, or add lightweight mod UI outside the dedicated \u002Fstatusline flow.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3404,3405,3406],{"name":24,"slug":25,"type":16},{"name":3364,"slug":3365,"type":16},{"name":3407,"slug":3408,"type":16},"Coding","coding","2026-07-23T05:42:38.133565",{"slug":3411,"name":3411,"fn":3412,"description":3413,"org":3414,"tags":3415,"stars":3369,"repoUrl":71,"updatedAt":3423},"creating-skills","create and update agent skills","Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Letta Code's capabilities with specialized knowledge, workflows, or tool integrations.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3416,3417,3420],{"name":24,"slug":25,"type":16},{"name":3418,"slug":3419,"type":16},"Documentation","documentation",{"name":3421,"slug":3422,"type":16},"Plugin Development","plugin-development","2026-07-13T06:22:56.998659",{"slug":3425,"name":3425,"fn":3426,"description":3427,"org":3428,"tags":3429,"stars":3369,"repoUrl":71,"updatedAt":3435},"customizing-commands","create and manage Letta slash commands","Creates, edits, and enables Letta Code mod-provided slash commands. Use when the user asks to add a custom \u002Fcommand, slash command, command shortcut, scoped conversation-backed command, or command-driven panel behavior.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3430,3431,3432],{"name":24,"slug":25,"type":16},{"name":3364,"slug":3365,"type":16},{"name":3433,"slug":3434,"type":16},"CLI","cli","2026-07-13T06:23:18.266798",{"slug":3437,"name":3437,"fn":3438,"description":3439,"org":3440,"tags":3441,"stars":3369,"repoUrl":71,"updatedAt":3446},"customizing-statusline","customize Letta Code statusline mods","Creates, edits, and migrates Letta Code statusline mods. Use when handling the \u002Fstatusline command or continuing work started by \u002Fstatusline.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3442,3443],{"name":3433,"slug":3434,"type":16},{"name":3444,"slug":3445,"type":16},"Engineering","engineering","2026-07-13T06:23:27.465985",{"slug":3448,"name":3448,"fn":3449,"description":3450,"org":3451,"tags":3452,"stars":3369,"repoUrl":71,"updatedAt":3458},"dispatching-coding-agents","dispatch stateless coding agents","Dispatch stateless coding agents (Claude Code or Codex) via Bash. Use when you're stuck, need a second opinion, or need parallel research on a hard problem. They have no memory — you must provide all context.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3453,3454,3455],{"name":24,"slug":25,"type":16},{"name":3407,"slug":3408,"type":16},{"name":3456,"slug":3457,"type":16},"Multi-Agent","multi-agent","2026-07-26T05:46:56.388845",{"slug":3460,"name":3460,"fn":3461,"description":3462,"org":3463,"tags":3464,"stars":3369,"repoUrl":71,"updatedAt":3474},"editing-letta-code-desktop-preferences","edit Letta Code Desktop preferences","Edits Letta Code Desktop (LCD) preferences by safely reading and updating ~\u002F.letta\u002Fdesktop_preferences.json. Use only when the user asks to change current Desktop\u002FLCD settings such as theme, default working directory, remote access preference, or remote environment name via the preferences JSON.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3465,3468,3471],{"name":3466,"slug":3467,"type":16},"Configuration","configuration",{"name":3469,"slug":3470,"type":16},"Desktop","desktop",{"name":3472,"slug":3473,"type":16},"Themes","themes","2026-07-13T06:23:41.407811",{"slug":3476,"name":3476,"fn":3477,"description":3478,"org":3479,"tags":3480,"stars":3369,"repoUrl":71,"updatedAt":3485},"finding-agents","locate and manage agents on server","Find other agents on the same server. Use when the user asks about other agents, wants to migrate memory from another agent, or needs to find an agent by name or tags.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3481,3482],{"name":24,"slug":25,"type":16},{"name":3483,"slug":3484,"type":16},"Management","management","2026-07-16T06:02:17.297841",{"slug":3487,"name":3487,"fn":3488,"description":3489,"org":3490,"tags":3491,"stars":3369,"repoUrl":71,"updatedAt":3497},"generating-mod-envs","generate Letta mod learning environments","Generates and reviews mod learning env JSON files for Letta Code local mods. Use when asked to teach, learn, or optimize a mod behavior; create, draft, validate, improve, or explain envs for `\u002Fmods learn --env`; or design evaluation scenarios, memory fixtures, requiredResultMarkers, requiredTraceMarkers, negative controls, and candidate diversity hints.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3492,3493,3496],{"name":24,"slug":25,"type":16},{"name":3494,"slug":3495,"type":16},"AI Infrastructure","ai-infrastructure",{"name":3466,"slug":3467,"type":16},"2026-07-13T06:23:08.838181",{"slug":3499,"name":3499,"fn":3500,"description":3501,"org":3502,"tags":3503,"stars":3369,"repoUrl":71,"updatedAt":3512},"image-generation","generate images from text prompts","Generate images from text prompts (and optionally edit\u002Fremix input images). Use when the user asks to create, generate, draw, render, or edit an image, illustration, logo, icon, diagram, or photo.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3504,3507,3510],{"name":3505,"slug":3506,"type":16},"Creative","creative",{"name":3508,"slug":3509,"type":16},"Graphics","graphics",{"name":3511,"slug":3499,"type":16},"Image Generation","2026-07-13T06:23:06.189403",69,{"items":3515,"total":3150},[3516,3530,3545,3564,3575,3596,3606],{"slug":3517,"name":3517,"fn":3518,"description":3519,"org":3520,"tags":3521,"stars":29,"repoUrl":30,"updatedAt":3529},"1password","manage secrets with 1Password CLI","Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading\u002Finjecting\u002Frunning secrets via op.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3522,3525,3526],{"name":3523,"slug":3524,"type":16},"Authentication","authentication",{"name":3433,"slug":3434,"type":16},{"name":3527,"slug":3528,"type":16},"Security","security","2026-07-13T06:24:39.504387",{"slug":3531,"name":3531,"fn":3532,"description":3533,"org":3534,"tags":3535,"stars":29,"repoUrl":30,"updatedAt":3544},"agent-slack","automate Slack messaging and workflows","Slack automation CLI — read\u002Fsend\u002Fsearch messages, browse threads and channels, manage channels, download attachments, look up users, and run workflows.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3536,3537,3538,3541],{"name":3364,"slug":3365,"type":16},{"name":3433,"slug":3434,"type":16},{"name":3539,"slug":3540,"type":16},"Messaging","messaging",{"name":3542,"slug":3543,"type":16},"Slack","slack","2026-07-13T06:23:51.908511",{"slug":3546,"name":3546,"fn":3547,"description":3548,"org":3549,"tags":3550,"stars":29,"repoUrl":30,"updatedAt":3563},"ai-news","fetch and summarize AI news","Fetch and summarize recent AI news from curated RSS feeds (Hugging Face, VentureBeat, The Verge, OpenAI, Anthropic, DeepMind, etc.) and YouTube channels (Yannic Kilcher, Two Minute Papers, AI Explained, etc.). Also fetches full transcripts for specific YouTube videos. Use when the user asks about recent AI news, what's happened in AI lately, summaries of AI research or product announcements, or wants a digest of what's going on in the AI space.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3551,3554,3557,3560],{"name":3552,"slug":3553,"type":16},"Communications","communications",{"name":3555,"slug":3556,"type":16},"LLM","llm",{"name":3558,"slug":3559,"type":16},"Research","research",{"name":3561,"slug":3562,"type":16},"Summarization","summarization","2026-07-13T06:24:20.520223",{"slug":3565,"name":3565,"fn":3566,"description":3567,"org":3568,"tags":3569,"stars":29,"repoUrl":30,"updatedAt":3574},"creating-letta-code-channels","build and debug Letta Code channels","Builds and debugs Letta Code channels, including first-party channel adapters and dynamic user channel plugins under ~\u002F.letta\u002Fchannels. Use when adding Telegram, WhatsApp, Bluesky, Slack, Discord, or custom channel support; testing channel routing, pairing, MessageChannel, runtime dependencies, or channel plugin manifests.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3570,3571,3572,3573],{"name":24,"slug":25,"type":16},{"name":27,"slug":28,"type":16},{"name":3539,"slug":3540,"type":16},{"name":3542,"slug":3543,"type":16},"2026-07-13T06:25:55.843495",{"slug":3576,"name":3576,"fn":3577,"description":3578,"org":3579,"tags":3580,"stars":29,"repoUrl":30,"updatedAt":3595},"datadog","query Datadog observability data","Query Datadog observability data (logs, metrics, monitors, dashboards, hosts) via direct API. Use when investigating production issues, checking monitors, searching logs, or accessing Datadog data.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3581,3583,3586,3589,3592],{"name":3582,"slug":3576,"type":16},"Datadog",{"name":3584,"slug":3585,"type":16},"Logs","logs",{"name":3587,"slug":3588,"type":16},"Metrics","metrics",{"name":3590,"slug":3591,"type":16},"Monitoring","monitoring",{"name":3593,"slug":3594,"type":16},"Observability","observability","2026-07-13T06:24:27.990605",{"slug":3597,"name":3597,"fn":3598,"description":3599,"org":3600,"tags":3601,"stars":29,"repoUrl":30,"updatedAt":3605},"discord","automate Discord server and channel tasks","Discord automation CLI — send\u002Fread\u002Fsearch messages, manage channels and servers, react, create threads, pin messages, and look up users.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3602,3603,3604],{"name":3364,"slug":3365,"type":16},{"name":3433,"slug":3434,"type":16},{"name":3539,"slug":3540,"type":16},"2026-07-13T06:24:26.62387",{"slug":3607,"name":3607,"fn":3608,"description":3609,"org":3610,"tags":3611,"stars":29,"repoUrl":30,"updatedAt":3624},"doc","create and edit Word documents","Use when the task involves reading, creating, or editing `.docx` documents, especially when formatting or layout fidelity matters; prefer `python-docx` plus the bundled `scripts\u002Frender_docx.py` for visual checks.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3612,3615,3618,3621],{"name":3613,"slug":3614,"type":16},"Documents","documents",{"name":3616,"slug":3617,"type":16},"DOCX","docx",{"name":3619,"slug":3620,"type":16},"Office","office",{"name":3622,"slug":3623,"type":16},"Word","word","2026-07-13T06:23:44.299568"]