Agent Profile History
Overview
The admin-agent-profile-history tool returns the complete version history for a specific agent, including all past prompts and LLM parameter overrides. This is essential for auditing changes and debugging behavior differences across versions.
Tool ID: admin-agent-profile-history
The examples use the direct runtime/operator route. Replit/Admin UI browser
code should call the Admin UI BFF instead: local /admin-api/*, testing
/dashboard/admin-api/*.
Input Schema
{
agentId: string; // Agent identifier to retrieve history for
}
Example Usage
curl -s -X POST "${MASTRA_BASE_URL}/admin/tools/agent-profile-history" \
-H "Content-Type: application/json" \
-H "Ocp-Apim-Subscription-Key: $SUBSCRIPTION_KEY" \
-d '{"data": {"agentId": "k12-safety-agent"}}'
const response = await fetch(`${MASTRA_BASE_URL}/admin/tools/agent-profile-history`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${process.env.BEARER_TOKEN}`,
},
body: JSON.stringify({
data: { agentId: 'k12-safety-agent' }
})
});
const history = await response.json();
history.forEach(version => {
console.log(`v${version.version} - ${version.createdAt} by ${version.createdBy}`);
console.log(`Current: ${version.IsCurrent ? 'Yes' : 'No'}`);
});
Output
Returns an array of all profile versions (sorted by version descending):
[
{
agentId: string;
version: number;
promptHash: string;
systemPrompt: string;
llmOverrides?: object;
IsCurrent: boolean; // True for active version
createdAt: string;
createdBy: string;
},
// ... older versions
]
Use Cases
- Debugging: Compare current behavior with previous versions
- Auditing: Track who changed prompts and when
- Rollback: Identify the previous working prompt for restoration
- Change Analysis: Understand prompt evolution over time
Related Tools
- Update Agent Profile - Create new versions
- List Agent Profiles - View current profiles