Business Hours Only Policy Template
Restrict AI agent access to LLM APIs to specific hours and days. Agents outside the allowed window receive a clear rejection — preventing overnight runaway costs and ensuring human oversight is available during all agent operations. Supports timezone-aware scheduling and per-agent overrides.
What this prevents
A data analysis agent was left running over a weekend while the engineering team was off. The agent encountered a data anomaly that caused it to retry increasingly complex queries, escalating from GPT-4o-mini to GPT-4o through fallback logic. By Monday, the agent had made 12,000 requests totaling $1,800 — with no one available to notice the alerts. A business-hours policy would have shut the agent down at 6 PM Friday, with an emergency-only agent available for truly urgent needs.
Policy template
Copy this into your govyn.yaml and adjust the values to match your requirements.
agents:
office_agent:
schedule:
timezone: Europe/Lisbon
allowed_hours:
weekdays: "09:00-18:00"
saturday: "10:00-14:00"
sunday: deny
holidays:
- "2026-12-25"
- "2026-01-01"
budget:
daily: $10.00
on_deny:
message: "Agent access is restricted outside business hours. Contact the team lead for emergency access."
emergency_agent:
schedule:
always: allow
budget:
daily: $2.00
approval:
require_for: [all] How it works
Agent sends a request to Govyn
The AI agent makes a standard LLM API call through the Govyn proxy, just as it would during normal business hours.
Govyn checks the current time against the schedule
The proxy looks up the agent's schedule policy, converts the current UTC time to the configured timezone (e.g. Europe/Lisbon), and checks whether the current hour falls within the allowed window.
Request is forwarded or denied
If the current time is within the allowed window, the request proceeds through normal policy checks (budget, model restrictions, etc.). If outside the window, the request is rejected with a configurable denial message.
Emergency override path
A separate emergency agent with an 'always: allow' schedule can be configured with strict approval requirements, giving your team a controlled escape valve for urgent situations.
Configuration options
| Option | Description | Example |
|---|---|---|
schedule.timezone | IANA timezone for schedule evaluation | Europe/Lisbon |
schedule.allowed_hours.weekdays | Allowed time range for Monday through Friday | 09:00-18:00 |
schedule.holidays | Specific dates to deny access (ISO 8601) | 2026-12-25 |
on_deny.message | Custom error message returned when access is denied | Agent access is restricted... |
Add this policy to your config
Start Govyn with this policy in under 5 minutes. No code changes needed.
Get startedRelated policy templates
Set daily and monthly spending limits for AI agents. Prevent runaway costs with hard budget caps enforced at the proxy level.
Instantly kill-switch all AI agent API access with a single command. Emergency lockdown policy for immediate agent shutdown.
Protect production environments from AI agent damage. Model restrictions, rate limits, and approval gates for high-risk operations.
Explore more
How the Meta email deletion incident could have been prevented with 4 lines of YAML, and why OpenClaw built-in limits are not enough.
INTEGRATIONGovern OpenClaw agents using Claude. Add budget enforcement, model policies, and conversation replay to your OpenClaw workflows.
INTEGRATIONAdd budget controls and policy enforcement to CrewAI multi-agent crews using OpenAI. Govern every agent in your crew independently.
COMPARISONCompare Govyn and AgentOps for AI agent management. Proxy-level governance vs SDK-based observability and tracing.