2025-02-13 15:03:33 -05:00
---
title: Memory Extension
2025-11-07 13:27:57 -08:00
description: Use Memory MCP Server as a goose Extension
2025-02-13 15:03:33 -05:00
---
import Tabs from '@theme/Tabs ';
import TabItem from '@theme/TabItem ';
import YouTubeShortEmbed from '@site/src/components/YouTubeShortEmbed ';
2025-07-17 12:57:53 -04:00
import GooseBuiltinInstaller from '@site/src/components/GooseBuiltinInstaller ';
2025-02-13 15:03:33 -05:00
2025-02-19 13:26:17 -05:00
<YouTubeShortEmbed videoUrl="https://youtube.com/embed/BZ0yrSLXQwk" />
2025-02-13 15:03:33 -05:00
2025-11-07 13:27:57 -08:00
The Memory extension turns goose into a knowledgeable assistant by allowing you to teach it personalized key information (e.g. commands, code snippets, preferences and configurations) that it can recall and apply later. Whether it’ s project-specific (local) or universal (global) knowledge, goose learns and remembers what matters most to you.
2025-02-13 15:03:33 -05:00
2025-11-07 13:27:57 -08:00
This tutorial covers enabling and using the Memory MCP Server, which is a built-in goose extension.
2025-02-13 15:03:33 -05:00
## Configuration
<Tabs groupId="interface">
2025-10-21 20:52:00 +01:00
<TabItem value="ui" label="goose Desktop" default>
2025-07-17 12:57:53 -04:00
<GooseBuiltinInstaller
extensionName="Memory"
description="Store and recall personalized information for consistent assistance"
/>
2025-04-29 12:21:06 -04:00
</TabItem>
2025-10-21 20:52:00 +01:00
<TabItem value="cli" label="goose CLI">
2025-02-13 15:03:33 -05:00
2025-11-07 13:27:57 -08:00
2025-02-13 15:03:33 -05:00
1. Run the `configure` command:
```sh
goose configure
` ``
2025-11-07 13:27:57 -08:00
2. Choose to ` Toggle Extensions`
2025-02-13 15:03:33 -05:00
` ``sh
┌ goose-configure
│
◇ What would you like to configure?
2025-11-07 13:27:57 -08:00
│ Toggle Extensions
2025-02-13 15:03:33 -05:00
│
2025-11-07 13:27:57 -08:00
◆ Enable extensions: (use "space" to toggle and "enter" to submit)
2025-02-13 15:03:33 -05:00
// highlight-start
2025-11-07 13:27:57 -08:00
│ ● memory
2025-04-29 12:48:41 -06:00
// highlight-end
2025-11-07 13:27:57 -08:00
|
└ Extension settings updated successfully
2025-04-29 12:48:41 -06:00
` ``
2025-02-13 15:03:33 -05:00
</TabItem>
</Tabs>
2025-02-14 16:28:07 -05:00
## Why Use Memory?
2025-11-07 13:27:57 -08:00
With the Memory extension, you’ re not just storing static notes, you’ re teaching goose how to assist you better. Imagine telling goose:
2025-02-14 16:28:07 -05:00
2025-02-17 11:31:39 -06:00
> _learn everything about MCP servers and save it to memory._
Later, you can ask:
> _utilizing our MCP server knowledge help me build an MCP server._
2025-02-14 16:28:07 -05:00
2025-11-07 13:27:57 -08:00
goose will recall everything you’ ve saved as long as you instruct it to remember. This makes it easier to have consistent results when working with goose.
2025-02-14 16:28:07 -05:00
2025-11-07 13:27:57 -08:00
goose loads all saved memories at the start of a session and includes them in every prompt sent to the LLM. For large or detailed instructions, store them in files and instruct goose to reference those files:
2025-08-06 13:11:06 -06:00
> _Remember that if I ask for help writing JavaScript, I want you to refer to "/path/to/javascript_notes.txt" and follow the instructions in that file._
2025-03-20 07:59:18 -04:00
## Trigger Words and When to Use Them
2025-11-07 13:27:57 -08:00
goose also recognizes certain trigger words that signal when to store, retrieve, or remove memory.
2025-03-20 07:59:18 -04:00
| **Trigger Words** | **When to Use** |
|---------------------|----------------|
| remember | Store useful info for later use |
| forget | Remove a stored memory |
| memory | General memory-related actions |
| save | Save a command, config, or preference |
| remove memory | Delete specific stored data |
| clear memory | Wipe all stored memories |
| search memory | Find previously stored data |
| find memory | Locate specific saved information |
2025-02-13 15:03:33 -05:00
## Example Usage
2025-11-07 13:27:57 -08:00
In this example, I’ ll show you how to make goose a knowledgeable development assistant by teaching it about your project’ s API standards. With the Memory extension, goose can store structured information and recall it when needed, helping you stay consistent in your work.
2025-02-14 16:28:07 -05:00
2025-11-07 13:27:57 -08:00
This means you no longer have to repeat yourself. goose will remember your project’ s requirements and automatically apply them to new tasks.
2025-02-13 15:03:33 -05:00
2025-03-20 07:59:18 -04:00
:::tip
2025-11-07 13:27:57 -08:00
If you frequently work with API standards or other structured knowledge, goose may automatically suggest saving them to memory for you when it detects a pattern in your workflow.
2025-03-20 07:59:18 -04:00
:::
2025-02-13 15:03:33 -05:00
<Tabs groupId="interface">
2025-10-21 20:52:00 +01:00
<TabItem value="ui" label="goose Desktop" default>
2025-11-07 13:27:57 -08:00
1. Open a new session in goose Desktop
2025-04-29 12:21:06 -04:00
</TabItem>
2025-10-21 20:52:00 +01:00
<TabItem value="cli" label="goose CLI">
2025-02-13 15:03:33 -05:00
2025-11-07 13:27:57 -08:00
1. Open a terminal and start a new goose session:
2025-02-13 15:03:33 -05:00
` ``sh
goose session
` ``
</TabItem>
</Tabs>
2025-11-07 13:27:57 -08:00
### Step 1: Teach goose Your API Standards
#### goose Prompt #1
2025-02-14 16:28:07 -05:00
` ``
2025-11-07 13:27:57 -08:00
goose, learn our API development standards:
2025-02-14 16:28:07 -05:00
- All endpoints must use TypeScript interfaces
- Error responses follow RFC 7807 Problem Details spec
- Rate limiting headers are required
- Authentication uses JWT in Authorization header
- All endpoints need OpenAPI documentation
Remember this so you can help me follow these practices.
` ``
2025-11-07 13:27:57 -08:00
#### goose Output
2025-02-14 16:28:07 -05:00
` ``
I've learned your API standards. I'll help enforce these requirements when working on API endpoints.
Storing in:
- Category: development_standards
- Tags: #api #typescript #security #documentation
- Scope: global (these are general standards)
I can now help with:
- API endpoint implementation
- Error handling patterns
- Authentication flows
- Documentation requirements
` ``
### Step 2: Use Stored Knowledge to Create a New API Endpoint
2025-11-07 13:27:57 -08:00
#### goose Prompt # 2
2025-02-14 16:28:07 -05:00
` ``
Help me create a new endpoint for user preferences
` ``
2025-11-07 13:27:57 -08:00
#### goose Output
2025-02-14 16:28:07 -05:00
` ``
I see you need a new endpoint. Based on our API development standards that I have stored in memory, I'll ensure it meets all our requirements.
[.. Checking stored API standards ...]
I've included all our required elements:
✅ TypeScript interfaces
✅ RFC 7807 error response format
✅ Rate limiting
✅ JWT auth header
✅ OpenAPI documentation
Here's your compliant endpoint:
interface UserPreferences {
userId: string;
theme: 'light' | 'dark';
notifications: boolean;
timezone: string;
}
interface ErrorResponse {
type: string;
title: string;
status: number;
detail: string;
instance: string;
}
@Route('/api/users/:userId/preferences')
class UserPreferencesController {
@Get()
@RateLimit(100) // Adding required rate limiting
@OpenAPI({ ... }) // Including mandatory OpenAPI docs
async getUserPreferences(
@Header('Authorization') token: string, // JWT auth as per our standard
@Param('userId') userId: string
): Promise<UserPreferences | ErrorResponse> {
// Implementation following our error handling pattern
}
}
Would you like me to implement the full endpoint logic?
2025-08-06 13:11:06 -06:00
` ``