refresh_session
Refresh your API key if it's expiring. Returns a new api_key valid for 90 days. Your old key is deactivated.
This record as markdown: /tools/io-github-wirternow-agent-bank/refresh-session.md
What refresh_session does on Ai Agent Bank
AI agents use refresh_session to create or update resources in Ai Agent Bank, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Ai Agent Bank environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | string | Yes | Your current api_key |
agent_id | string | Yes | UUID of your agent |
Parameters from the server's own tool schema.
Why refresh_session is rated Medium
This tool modifies authentication credentials by generating a new API key and deactivating the old one. It is a reversible credential rotation operation (Write), not financial, destructive (the old key is deactivated but this is an expected side effect of rotation, not data loss), or execute. However, misuse could lock out legitimate users by deactivating their active key, giving it a medium severity.
From the tool's definition Refresh your API key if it's expiring. Returns a new api_key valid for 90 days. Your old key is deactivated.
Risk signalsHandles credentials or secrets (api_key)
Attacks that exploit this kind of access
The rule that runs refresh_session safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Ai Agent Bank, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For refresh_session, this is the rule to start with:
refresh_session stays usable, but capped: an agent stuck in a loop can't make hundreds of changes a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Ai Agent Bank, apply this rule, and every refresh_session call is checked against it from then on.
Questions about refresh_session
Refresh your API key if it's expiring. Returns a new api_key valid for 90 days. Your old key is deactivated. It is categorised as a Write tool in the Ai Agent Bank MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
refresh_session accepts 2 parameters: api_key, agent_id. Required: api_key, agent_id. The full parameter table on this page comes from the server's own tool schema.
Register the Ai Agent Bank MCP server in PolicyLayer and add a rule for refresh_session: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Ai Agent Bank. Nothing to install.
refresh_session is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the refresh_session rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for refresh_session. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
refresh_session is provided by the Ai Agent Bank MCP server (https://tdueqhfxyojmjgactdyc.supabase.co/functions/v1/mcp-server). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Ai Agent Bank, and thousands of servers like it.
This server
Across the catalogue