How to Use Environment Context
This guide shows how to set up location and datetime context injection for agents and MCP tools.
Prerequisites
Section titled “Prerequisites”- Daneel AI installed
- (Optional) An agent or MCP server configured
Enable datetime injection
Section titled “Enable datetime injection”Datetime injection is on by default. To verify or change it:
- Open Settings > Privacy.
- Check that Share date & timezone with agents is toggled on.
When enabled, every prompt sent to the AI includes the current date, time, and IANA timezone. No permission is needed.
Enable geolocation
Section titled “Enable geolocation”Geolocation is off by default and requires a one-time browser permission:
- Open Settings > Privacy.
- Toggle Share location with agents on.
- The browser will briefly switch to an extension tab and show a permission prompt: “Daneel AI wants to know your location.”
- Click Allow.
- Focus returns to your page automatically.
If you click Block, the toggle stays off. You can retry later or enable location in Chrome’s site settings for the extension.
Mark an MCP server as location-aware
Section titled “Mark an MCP server as location-aware”If you use an MCP server whose tools benefit from knowing your location (e.g., Google Maps, a weather API):
- Open Settings > MCP.
- Find the server in the Registered Servers list.
- Click the
locationbadge next to the server name. It turns blue when active. - Optionally click the
datetimebadge too (though datetime is injected by default for all MCP-connected flows).
Any agent that binds this server will automatically inherit the location requirement — no per-agent configuration needed.
Configure an agent with context overrides
Section titled “Configure an agent with context overrides”If you want an agent to always receive location regardless of its MCP servers, or to opt out of datetime:
- Open Settings > Agents.
- Create or edit an agent.
- Scroll to the Context section at the bottom of the editor.
- Set the checkboxes:
- Uses location — three states: checked (always inject), unchecked (never inject), indeterminate (inherit from servers)
- Uses date & time — same three states
Click through the checkbox to cycle: indeterminate (inherit) → checked (force on) → unchecked (force off) → indeterminate.
Example: travel planner agent
Section titled “Example: travel planner agent”A practical configuration for a location-aware agent:
- Enable geolocation in Settings > Privacy.
- Create an agent in Settings > Agents:
- Name: Travel Planner
- Purpose: Plan trips and find local attractions
- Persona: “You are an experienced travel planner who knows local customs, transportation, and dining.”
- Task: “Help users plan trips, find nearby attractions, and suggest restaurants. Always consider their current location and local time when making recommendations.”
- Context: Uses location = checked, Uses date & time = checked
- Attach the agent to a chat conversation.
- Ask: “What restaurants are open near me right now?”
The AI will see your city and current time in its context and respond accordingly.
Verify what the AI sees
Section titled “Verify what the AI sees”To confirm context injection is working, ask the agent directly:
“What is my current location and the current date and time?”
The AI will report the injected values from the ## Environment Context section of its system prompt.
Troubleshooting
Section titled “Troubleshooting”Location not appearing:
- Check that “Share location with agents” is on in Settings > Privacy
- Check that the agent has “Uses location” checked, or that a bound MCP server has the
locationbadge active - Verify you granted browser geolocation permission (check Chrome’s address bar for the location icon)
Permission prompt never appeared:
- The prompt shows on the extension’s host tab. If it was blocked by a popup blocker, navigate to
chrome://settings/content/locationand allow the extension
Wrong city displayed:
- Nominatim resolves based on WiFi/IP positioning, which can be approximate. This is normal — the goal is city-level context, not street-level precision.
Next steps
Section titled “Next steps”- Environment Context — how the three-tier architecture works
- Privacy Model — what data leaves your machine
- MCP and Tool Calling — how agents use tools with context