Agent Tools
9 tools for managing stored AI prompts — create, version, and execute reusable prompts.
What are Agent Files?
Agent files are stored AI prompts that can be versioned, tested, and executed programmatically. They're useful for building AI-powered features in your application with consistent, maintainable prompts.
File Management
Create and manage prompt files
agent_LIST_AGENT_FILESList all agent prompt files in the project
Params: projectId
agent_READ_AGENT_FILERead the contents of an agent file
Params: projectId, fileName
agent_SET_AGENT_FILECreate or update an agent file
Params: projectId, fileName, content
agent_RENAME_AGENTRename an agent file
Params: projectId, oldName, newName
agent_INITIALIZE_AGENTSInitialize default agent templates
Params: projectId
Version Control
Manage prompt versions for testing and rollback
agent_LIST_AGENT_VERSIONSList all versions of an agent file
Params: projectId, fileName
agent_REVERT_AGENT_VERSIONRevert to a previous version
Params: projectId, fileName, versionId
agent_SET_DEFAULT_VERSIONSet which version is used by default
Params: projectId, fileName, versionId
Execution
Execute stored prompts
agent_CALL_STORED_PROMPTExecute an agent prompt with variables
Params: projectId, fileName, variables?, options?
Agent File Format
Agent files support variables that get replaced at execution time:
You are a helpful assistant that summarizes text.
Summarize the following content in {{style}} style:
{{content}}
Keep the summary under {{maxWords}} words.Then call it with variables:
{
"projectId": "abc123",
"fileName": "summarize",
"variables": {
"style": "bullet points",
"content": "The quick brown fox...",
"maxWords": "50"
}
}Use Cases
Content Generation
Store prompts for blog posts, product descriptions, emails, etc. Iterate on prompts without code changes.
Data Extraction
Create prompts that extract structured data from unstructured text. Version them as requirements change.
Chatbot Personalities
Define different assistant personalities or domains. A/B test different versions.
Code Generation
Store prompts for generating boilerplate code, tests, or documentation.
Common Patterns
Iterating on prompts
- 1Create initial prompt with agent_SET_AGENT_FILE
- 2Test with agent_CALL_STORED_PROMPT
- 3Make changes (creates new version automatically)
- 4Compare versions with agent_LIST_AGENT_VERSIONS
- 5Set the best version as default with agent_SET_DEFAULT_VERSION
Safe prompt updates
- 1Make changes with agent_SET_AGENT_FILE (creates new version)
- 2Test the new version
- 3If issues, revert with agent_REVERT_AGENT_VERSION
- 4If good, set as default for production