Overview
Custom actions allow you to create reusable AI workflows tailored to your specific needs. Each action can have its own prompt, system prompt, temperature settings, and behavior.The LocalGPTAction Interface
Actions are defined using theLocalGPTAction interface:
Field Descriptions
The display name of the action that appears in the context menu and Action Palette.
The main instruction sent to the AI. Can include template keywords like
{{=SELECTION=}} and {{=CONTEXT=}}.Controls randomness/creativity (0-2). If not set, uses the default creativity setting. Lower values are more deterministic.
The system prompt that defines the AI’s role and behavior. This is sent as the system message to guide the AI’s overall approach.
When
true, the AI’s response replaces the selected text. When false (default), the response is appended after the selection.When
true, creates a visual separator in the actions list instead of an executable action.Metadata for community actions. Automatically managed when installing actions from the community library.
Creating Actions in Settings
Method 1: Manual Creation
- Open Settings → Local GPT
- Scroll to the Actions section
- Click Add Action
- Fill in the action fields:
- Name: A descriptive name for your action
- System Prompt: (Optional) Define the AI’s role
- Prompt: The main instruction
- Replace selected text: Toggle on to replace instead of append
- Click Save
Action names must be unique. If you try to save an action with a duplicate name, you’ll see an error message.
Method 2: Quick Add
Use the Quick Add field for faster action creation using a special format: Format:Method 3: Community Actions
- Click Community Actions button
- Browse available actions
- Click Install on any action you want to use
- The action is automatically added to your list
Community actions are automatically updated to the latest version. To prevent auto-updates, modify the Prompt or System Prompt fields.
Action Field Examples
Example 1: Code Documentation Generator
Example 2: Grammar Fixer with Context
Example 3: Meeting Notes Summarizer
Example 4: Enhanced Context Action
Example 5: Creative Rewriter
Default Actions
Local GPT comes with these default actions:Temperature Settings
Thetemperature field controls the creativity/randomness of responses:
0.0 - 0.3
Deterministic: Consistent, factual outputs. Best for grammar fixes, code documentation, data extraction.
0.4 - 0.6
Balanced: Good mix of consistency and variety. Best for summarization, rewriting, Q&A.
0.7 - 1.0
Creative: More varied, creative outputs. Best for brainstorming, creative writing, idea generation.
1.0+
Highly Creative: Maximum randomness. Use sparingly for experimental or highly creative tasks.
Replace Mode
Thereplace field determines how the AI’s response is inserted:
Replace: false (default)
Replace: true
Managing Actions
Editing Actions
- Click Edit next to any action in the settings
- Modify the fields as needed
- Click Save
If you edit a community action, it will stop receiving automatic updates. This allows you to customize it without losing your changes.
Deleting Actions
- Click Edit on the action you want to delete
- Click Remove
- Click Remove again to confirm (button turns red)
Reordering Actions
Desktop:- Drag and drop actions using the grip handle (⋮⋮) on the left
- Use the chevron up/down buttons to move actions
Creating Separators
- Click Add Separator
- A visual separator is added to organize your actions list
- Drag to position it where needed
Sharing Actions
Every action has a copy button that generates a shareable string:- Click the Copy icon next to any action
- Share the copied text with others
- Recipients can paste it into the Quick Add field
Best Practices
Action Naming
- Use emojis to make actions visually distinct (🪄, ✍️, 📝, 🧠)
- Keep names short and descriptive
- Group related actions with similar emoji/prefix
System Prompts
- Define the AI’s role clearly (“You are a…”)
- Set expectations for output format
- Include constraints or guidelines
- Keep it focused and specific
Main Prompts
- Be clear and specific about what you want
- Use template keywords for flexibility
- Provide examples when helpful
- Structure complex prompts with headers
Performance Tips
- Shorter prompts = faster responses
- Use
replace: truewhen you don’t need to keep the original - Avoid overly complex system prompts that might confuse the model
- Test actions with different models to find the best fit
Troubleshooting
Action Not Appearing in Menu
- Check that the action name is not empty
- Ensure the action was saved successfully
- Try reloading Obsidian
Unexpected Output
- Review your system prompt for clarity
- Check template keyword placement
- Adjust temperature for more/less variation
- Try a different AI model
Performance Issues
- Simplify overly complex prompts
- Use a faster model for the action
- Reduce context limit if using Enhanced Actions
- Check your AI provider connection
Related Resources
Prompt Templating
Master template keywords for dynamic prompts
AI Providers Setup
Configure AI models and providers