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_FILES

List all agent prompt files in the project

Params: projectId

agent_READ_AGENT_FILE

Read the contents of an agent file

Params: projectId, fileName

agent_SET_AGENT_FILE

Create or update an agent file

Params: projectId, fileName, content

agent_RENAME_AGENT

Rename an agent file

Params: projectId, oldName, newName

agent_INITIALIZE_AGENTS

Initialize default agent templates

Params: projectId

Version Control

Manage prompt versions for testing and rollback

agent_LIST_AGENT_VERSIONS

List all versions of an agent file

Params: projectId, fileName

agent_REVERT_AGENT_VERSION

Revert to a previous version

Params: projectId, fileName, versionId

agent_SET_DEFAULT_VERSION

Set which version is used by default

Params: projectId, fileName, versionId

Execution

Execute stored prompts

agent_CALL_STORED_PROMPT

Execute an agent prompt with variables

Params: projectId, fileName, variables?, options?

Agent File Format

Agent files support variables that get replaced at execution time:

summarize.txt
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

  1. 1Create initial prompt with agent_SET_AGENT_FILE
  2. 2Test with agent_CALL_STORED_PROMPT
  3. 3Make changes (creates new version automatically)
  4. 4Compare versions with agent_LIST_AGENT_VERSIONS
  5. 5Set the best version as default with agent_SET_DEFAULT_VERSION

Safe prompt updates

  1. 1Make changes with agent_SET_AGENT_FILE (creates new version)
  2. 2Test the new version
  3. 3If issues, revert with agent_REVERT_AGENT_VERSION
  4. 4If good, set as default for production