* docs: restructure architecture documentation to sideline legacy agent types This commit reorganizes the agent architecture documentation to address confusion around legacy agent types (memgpt_agent, memgpt_v2_agent) and clarify that users should not specify agent_type for new projects. The documentation was causing confusion for both users and LLMs: - References to memgpt_agent, memgpt_v2_agent, and letta_v1_agent were scattered throughout main docs - The naming progression (memgpt → memgpt_v2 → letta_v1) is non-standard - LLMs trained on these docs were recommending deprecated architectures - Discord users were confused about which agent type to use - send_message tool and heartbeat references were in mainline docs - architectures_overview.mdx - Landing page explaining legacy types exist - migration_guide.mdx - Step-by-step migration with code snippets - naming_history.mdx - Hidden page explaining progression for LLMs - memgpt_agents_legacy.mdx - Moved from main docs with deprecation warnings - heartbeats_legacy.mdx - Moved from main docs with deprecation warnings - Removed "Agent Architectures" subsection from main nav - Moved "MemGPT Agents" to top-level (renamed "Agent Memory & Architecture") - Removed "Heartbeats" page from main nav - Added "Legacy & Migration" section with 5 sub-pages - Added redirects for old URLs - pages/agents/memgpt_agents.mdx - Completely rewritten to focus on current architecture without mentioning legacy agent types - pages/agents/sleep_time_agents.mdx - Changed from agent_type to enableSleeptime - pages/agents/base_tools.mdx - Added stronger deprecation warning for send_message - pages/agents/overview.mdx - Updated assistant_message description - pages/agents/tool_rules.mdx - Removed send_message default rule examples - pages/agents/message_types.mdx - Removed heartbeat message type section - pages/agents/json_mode.mdx - Removed send_message requirements - pages/agents/archival_best_practices.mdx - Removed send_message tool rule example - pages/agents/react_agents.mdx - Removed heartbeat mechanism reference - pages/getting-started/prompts.mdx - Removed send_message note - pages/ade-guide/simulator.mdx - Removed tip about removing send_message - pages/advanced/custom_memory.mdx - Changed send_message to "respond to user" - pages/deployment/railway.mdx - Removed legacy tools array from example - pages/selfhosting/overview.mdx - Changed send_message example to memory_insert - pages/agents/heartbeats.mdx - Moved to legacy section Added to memory: aggressively remove send_message and heartbeat references from main docs. Keep legacy content only in /guides/legacy/ section. Don't add notes about legacy in main docs - just remove the references entirely. * docs: remove evals tab from navigation The evals content is not ready for public documentation yet. * docs: move send_message to deprecated tools table with legacy link - Removed Legacy Tools section - Added send_message to Deprecated Tools table with link to legacy guide - Removed undefined warning text * docs: move ReAct agents to legacy section - Moved pages/agents/react_agents.mdx to pages/legacy/react_agents_legacy.mdx - Added deprecation warning at top - Updated slug to guides/legacy/react_agents_legacy - Added to Legacy & Migration navigation section - Added redirect from old URL to new legacy location ReAct agents are a legacy architecture that lacks long-term memory capabilities compared to the current Letta architecture. * docs: move workflow and low-latency architectures to legacy - Moved pages/agents/workflows.mdx to pages/legacy/workflows_legacy.mdx - Moved pages/agents/low_latency_agents.mdx to pages/legacy/low_latency_agents_legacy.mdx - Deleted pages/agents/architectures.mdx (overview page no longer needed) - Removed 'Agent Memory & Architecture' from main Agents section - Added workflows and low-latency to Legacy & Migration section - Added redirects for old URLs These agent architectures (workflow_agent, voice_convo_agent) are legacy. For new projects, users should use the current Letta architecture with tool rules or voice-optimized configurations instead. * docs: remove orphaned stateful workflows page - Deleted pages/agents/stateful_workflows.mdx - Page was not linked in navigation or from other docs - Feature (message_buffer_autoclear flag) is already documented in API reference - Avoids confusion with legacy workflow architectures
151 lines
4.4 KiB
Plaintext
151 lines
4.4 KiB
Plaintext
---
|
|
title: Base Tools
|
|
subtitle: Built-in tools for memory management and user communication
|
|
slug: guides/agents/base-tools
|
|
---
|
|
|
|
Base tools are built-in tools that enable memory management, user communication, and access to conversation history and archival storage.
|
|
|
|
## Available Base Tools
|
|
|
|
| Tool | Purpose |
|
|
|------|---------|
|
|
| `memory_insert` | Insert text into a memory block |
|
|
| `memory_replace` | Replace specific text in a memory block |
|
|
| `memory_rethink` | Completely rewrite a memory block |
|
|
| `memory_finish_edits` | Signal completion of memory editing |
|
|
| `conversation_search` | Search prior conversation history |
|
|
| `archival_memory_insert` | Add content to archival memory |
|
|
| `archival_memory_search` | Search archival memory |
|
|
| `send_message` | Send a message to the user (legacy architectures only) |
|
|
|
|
## Memory Block Editing
|
|
|
|
Memory blocks are editable sections in the agent's context window. These tools let agents update their own memory.
|
|
|
|
See the [Memory Blocks guide](/guides/agents/memory-blocks) for more about how memory blocks work.
|
|
|
|
### memory_insert
|
|
|
|
Insert text at a specific line in a memory block.
|
|
|
|
**Parameters:**
|
|
- `label`: Which memory block to edit
|
|
- `new_str`: Text to insert
|
|
- `insert_line`: Line number (0 for beginning, -1 for end)
|
|
|
|
**Common uses:**
|
|
- Add new information to the end of a block
|
|
- Insert context at the beginning
|
|
- Add items to a list
|
|
|
|
### memory_replace
|
|
|
|
Replace specific text in a memory block.
|
|
|
|
**Parameters:**
|
|
- `label`: Which memory block to edit
|
|
- `old_str`: Exact text to find and replace
|
|
- `new_str`: Replacement text
|
|
|
|
**Common uses:**
|
|
- Update outdated information
|
|
- Fix typos or errors
|
|
- Delete text (by replacing with empty string)
|
|
|
|
**Important:** The `old_str` must match exactly, including whitespace. If it appears multiple times, the tool will error.
|
|
|
|
### memory_rethink
|
|
|
|
Completely rewrite a memory block's contents.
|
|
|
|
**Parameters:**
|
|
- `label`: Which memory block to rewrite
|
|
- `new_memory`: Complete new contents
|
|
|
|
**When to use:**
|
|
- Condensing cluttered information
|
|
- Major reorganization
|
|
- Combining multiple pieces of information
|
|
|
|
**When not to use:**
|
|
- Adding one line (use `memory_insert`)
|
|
- Changing specific text (use `memory_replace`)
|
|
|
|
### memory_finish_edits
|
|
|
|
Signals that memory editing is complete.
|
|
|
|
**Parameters:** None
|
|
|
|
Some agent architectures use this to mark the end of a memory update cycle.
|
|
|
|
## Recall Memory
|
|
|
|
### conversation_search
|
|
|
|
Search prior conversation history using both text matching and semantic similarity.
|
|
|
|
**Parameters:**
|
|
- `query`: What to search for
|
|
- `roles`: Optional filter by message role (user, assistant, tool)
|
|
- `limit`: Maximum number of results
|
|
- `start_date`, `end_date`: ISO 8601 date/datetime filters (inclusive)
|
|
|
|
**Returns:**
|
|
Matching messages with role and content, ordered by relevance.
|
|
|
|
**Example queries:**
|
|
- "What did the user say about deployment?"
|
|
- "Find previous responses about error handling"
|
|
- "Search tool outputs from last week"
|
|
|
|
## Archival Memory
|
|
|
|
Archival memory stores information long-term outside the context window. See the [Archival Memory documentation](/guides/agents/archival-memory-overview) for details.
|
|
|
|
### archival_memory_insert
|
|
|
|
Add content to archival memory for long-term storage.
|
|
|
|
**Parameters:**
|
|
- `content`: Text to store
|
|
- `tags`: Optional tags for organization
|
|
|
|
**Common uses:**
|
|
- Storing reference information for later
|
|
- Saving important context that doesn't fit in memory blocks
|
|
- Building a knowledge base over time
|
|
|
|
### archival_memory_search
|
|
|
|
Search archival memory using semantic (embedding-based) search.
|
|
|
|
**Parameters:**
|
|
- `query`: What to search for semantically
|
|
- `tags`: Optional tag filters
|
|
- `tag_match_mode`: "any" or "all" for tag matching
|
|
- `top_k`: Maximum results
|
|
- `start_datetime`, `end_datetime`: ISO 8601 filters (inclusive)
|
|
|
|
**Returns:**
|
|
Matching passages with timestamps and content, ordered by semantic similarity.
|
|
|
|
## Deprecated Tools
|
|
|
|
These tools are still available but deprecated:
|
|
|
|
| Tool | Use Instead |
|
|
|------|-------------|
|
|
| `send_message` | Agent responses (no tool needed). See [legacy architectures](/guides/legacy/memgpt_agents_legacy) |
|
|
| `core_memory_append` | `memory_insert` with `insert_line=-1` |
|
|
| `core_memory_replace` | `memory_replace` |
|
|
|
|
## Related Documentation
|
|
|
|
- [Memory Blocks](/guides/agents/memory-blocks)
|
|
- [Archival Memory](/guides/agents/archival-memory-overview)
|
|
- [Utilities](/guides/agents/prebuilt-tools)
|
|
- [Multi-Agent Tools](/guides/agents/multiagent)
|
|
- [Custom Tools](/guides/agents/custom-tools)
|