Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .agents/skills/agentdrive/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: agentdrive
description: Use AgentDrive to read a personal vehicle and send parked commands through the agentdrive program. Use when the user asks about battery, climate, lock state, tyre pressure, a health check, the daily vehicle report, a coarse area, an in-car charging timetable, charging current, a departure time that preconditions the cabin, sentry mode, seat or steering heat, defrost, cabin preconditioning, the rear trunk, the front trunk, remote start, or a parked command such as flash lights, lock, or charging. Also use it when the user has more than one car, a family member asks for an action the owner must approve, whether the battery is enough for a trip, a charge limit, charging habits, a home tariff, or a weekly, monthly, or yearly chart. Do not sign vehicle commands in this skill.
description: Use AgentDrive to read a personal vehicle and send parked commands through the agentdrive program. Use when the user asks about battery, climate, lock state, tyre pressure, a health check, the daily vehicle report, a coarse area, an in-car charging timetable, charging current, a departure time that preconditions the cabin, sentry mode, seat or steering heat, seat cooling, automatic seat climate, defrost, cabin preconditioning, climate keeper, bioweapon defense mode, the charge port, official charging history or an invoice, a software update, the rear trunk, the front trunk, remote start, or a parked command such as flash lights, lock, or charging. Also use it when the user has more than one car, a family member asks for an action the owner must approve, whether the battery is enough for a trip, a charge limit, charging habits, a home tariff, or a weekly, monthly, or yearly chart. Do not sign vehicle commands in this skill.
---

# AgentDrive
Expand Down Expand Up @@ -39,9 +39,9 @@ Security trade-off of a shared key: every agent that can read the private key fi
1. `agentdrive doctor`
2. `agentdrive check` — the read-only vehicle status check. It does not wake a sleeping vehicle and it does not send a command.
3. `agentdrive where` — a coarse area: suburb or locality, state or region, and country. It does not wake a sleeping vehicle and it does not send a command. A rounded point is sent to Nominatim. `agentdrive where --precise` prints precise latitude and longitude and a map link when the car is already online. It still does not wake the car. Precise coordinates are not written to the local history. Do not copy them into memory.
4. A vehicle command only after doctor and check have finished, and only when the user asks. Park and speed 0 are required. Unlock, turning sentry off, the rear trunk, the front trunk, remote start, charging changes, and setting or removing a departure schedule need a fresh confirmation. A schedule cannot supply that confirmation and cannot run sentry off, the trunk, the front trunk, remote start, or a departure schedule change.
4. A vehicle command only after doctor and check have finished, and only when the user asks. Park and speed 0 are required. Unlock, turning sentry off, the rear trunk, the front trunk, remote start, charging changes, setting or removing a departure schedule, climate keeper keep, dog, and camp, bioweapon defense on, the charge port, and scheduling or cancelling a software update need a fresh confirmation. A schedule cannot supply that confirmation and cannot run those commands.

`agentdrive sentry-on` and `agentdrive sentry-off` change sentry mode. Both wake a sleeping car: if the vehicle list says the car is not online, they send one wake and poll for up to 45 seconds, then send the signed command. `sentry-off` needs a fresh confirmation that names turning sentry off, for example `I confirm turn sentry off`. A schedule cannot supply that confirmation and cannot run `sentry-off`. `agentdrive check`, `agentdrive report`, `agentdrive where`, history, `agentdrive advice`, and `agentdrive tariff` do not wake a sleeping car. Advice does not change a charge limit, a timetable, or preconditioning.
`agentdrive sentry-on` and `agentdrive sentry-off` change sentry mode. Both wake a sleeping car: if the vehicle list says the car is not online, they send one wake and poll for up to 45 seconds, then send the signed command. `sentry-off` needs a fresh confirmation that names turning sentry off, for example `I confirm turn sentry off`. A schedule cannot supply that confirmation and cannot run `sentry-off`. `agentdrive check`, `agentdrive report`, `agentdrive where`, history, official charging history, software status, `agentdrive advice`, and `agentdrive tariff` do not wake a sleeping car. Advice does not change a charge limit, a timetable, or preconditioning.

`agentdrive seat-heat`, `agentdrive steering-heat`, `agentdrive defrost-on`, `agentdrive defrost-off`, and `agentdrive precondition` are parked climate commands. They use the same confirmation pattern as climate on, climate off, and set temperature. `seat-heat` takes a seat the signed tool accepts (`front-left`, `front-right`, `2nd-row-left`, `2nd-row-center`, `2nd-row-right`, `3rd-row-left`, `3rd-row-right`) and a level (`off`, `low`, `medium`, or `high`). `steering-heat` is `on` or `off`. Defrost is max defrost, on or off, for the front and rear together. `precondition` starts cabin preconditioning now. It does not add a departure schedule. A departure time is `agentdrive departure`.

Expand All @@ -51,6 +51,10 @@ Security trade-off of a shared key: every agent that can read the private key fi

`agentdrive departure show` reads the departure schedules and does not wake a sleeping vehicle. `agentdrive departure set` and `agentdrive departure remove` change them. Each change needs a fresh confirmation, for example `I confirm departure schedule set` or `I confirm departure schedule remove`. A scheduled job cannot supply that confirmation and cannot run those two commands. `departure show` is a read. The schedule preconditions the cabin by a time, on selected days, at a place. Latitude and longitude are optional. Omit both and the command uses the car's current location after the same wake other parked changes use. If that location read says the car is asleep, it is not woken again: say the car must be online, or pass coordinates. It does not set a battery switch or an off-peak charging time. `precondition` is still the command that starts the cabin now. Precise coordinates are not written to the local history.

`agentdrive climate-keeper off` turns climate keeper off and does not need a confirmation. `agentdrive climate-keeper keep`, `dog`, and `camp` need a fresh confirmation because they use energy, for example `I confirm climate keeper keep`, `I confirm climate keeper dog`, or `I confirm climate keeper camp`. `agentdrive charge-port open` and `agentdrive charge-port close` need a fresh confirmation, for example `I confirm open charge port` or `I confirm close charge port`. If close fails because a cable is plugged in, say that and do not send it again. `agentdrive seat-cool <seat> <level>` sets front-seat cooling (`front-left` or `front-right`, level `off`, `low`, `medium`, or `high`). `agentdrive seat-climate <seat> on` or `off` sets automatic seat climate (`front-left`, `front-right`, or `both`). If the car has no seat cooling, or the climate is not on, say so and do not keep retrying. `agentdrive bioweapon off` does not need a confirmation. `agentdrive bioweapon on` needs one, for example `I confirm turn bioweapon defense on`. If the car does not support bioweapon defense mode, say so. `agentdrive software` shows the installed version, the update status, and official release notes. It does not wake a sleeping car: say the car is asleep. `agentdrive software schedule <delay>` and `agentdrive software cancel` need a fresh confirmation, for example `I confirm schedule software update` or `I confirm cancel software update`. A delay is `2h`, `10m`, `30s`, a whole number of seconds, or `now`.

`agentdrive charging-history` is the official account charging history. It does not wake a car. Show the date, site name, energy, and cost as Tesla returns them, and include the sentence `Home charging is not included`. Do not store site coordinates or a VIN. `agentdrive charging-invoice <id> --save` writes that PDF under the config home. Without `--save`, do not write the file.

`agentdrive trunk-open` and `agentdrive trunk-close` open and close the rear trunk. Closing works when the vehicle can close the rear trunk. `agentdrive frunk-open` opens the front trunk. The front trunk cannot be closed from AgentDrive. `agentdrive remote-start` enables keyless driving so the car can be driven without the phone key for a short time. It does not drive the car, it does not start an engine, and it does not ask for a password. Each command needs a fresh confirmation that names the action: open rear trunk, close rear trunk, open frunk, or enable remote start. Do not call `tesla-control` for these. The shared core signs them.

`agentdrive status` answers a direct question and may wake a sleeping vehicle. It is still not a lock, unlock, climate, or charging command. Use `agentdrive check` for the check that must happen first.
Expand Down Expand Up @@ -86,7 +90,7 @@ agentdrive family remove rider

`charging` means the charging changes: start, stop, charge limit, charging current, and the in-car timetable changes. Low-risk actions the owner allowed, such as status or lock, run directly. Run them with `--as <handle>`.

Unlock and charging changes are not run for a family member, even if the owner allowed the request and even if a confirmation sentence is on the command. Turning sentry off, the trunk, the front trunk, remote start, and departure changes are the same. The command writes a pending request and prints relay text. Read that text to the owner. Do not send it yourself, and do not approve it yourself.
Unlock and charging changes are not run for a family member, even if the owner allowed the request and even if a confirmation sentence is on the command. Turning sentry off, the trunk, the front trunk, remote start, departure changes, climate keeper keep, dog, or camp, bioweapon defense on, a charge-port open or close, and scheduling or cancelling a software update are the same. The command writes a pending request and prints relay text. Read that text to the owner. Do not send it yourself, and do not approve it yourself.

```bash
agentdrive --as rider --car daily unlock
Expand All @@ -104,7 +108,7 @@ Approve runs the action once. The car must still be in Park at speed 0. A reques

## Health check

On install, schedule a routine that runs `agentdrive check --json` every 30 minutes. Exit 0 means there is nothing new to report, including when the vehicle is asleep and when the same alerts are still active, so stay quiet. Exit 1 means a new alert the user should hear. Notify only when the exit code is 1. The same alert stays quiet until it clears and later returns. Do not schedule unlock, turning sentry off, the trunk, the front trunk, remote start, a charging change, or a departure schedule change. `charge-amps`, `charge-schedule set`, and `charge-schedule remove` are charging changes. `departure set` and `departure remove` are departure schedule changes. `sentry-off` is a sensitive command. Do not put `agentdrive report` or `agentdrive history due` on that health-check loop. When the car is already online, `check` also saves local history, including when there is nothing new to notify. It does not wake the car to do that. AgentDrive does not run that job and does not install cron.
On install, schedule a routine that runs `agentdrive check --json` every 30 minutes. Exit 0 means there is nothing new to report, including when the vehicle is asleep and when the same alerts are still active, so stay quiet. Exit 1 means a new alert the user should hear. Notify only when the exit code is 1. The same alert stays quiet until it clears and later returns. An energy-mode alert is the exception: climate left on, climate keeper keep, dog, or camp, or bioweapon defense mode, while the car is parked and no one is in the driver seat, repeats at most once an hour while that mode stays on and stops when the mode turns off. If someone is in the driver seat, that alert is not sent, and the parked-and-unlocked alert is not sent. The driver-seat reading covers only the driver seat. It is not a guarantee that nobody is inside. There is no rear-seat, passenger, child, or pet detection. Do not schedule unlock, turning sentry off, the trunk, the front trunk, remote start, a charging change, a departure schedule change, climate keeper keep, dog, or camp, bioweapon defense on, the charge port, or a software update. `charge-amps`, `charge-schedule set`, and `charge-schedule remove` are charging changes. `departure set` and `departure remove` are departure schedule changes. `sentry-off` is a sensitive command. Do not put `agentdrive report` or `agentdrive history due` on that health-check loop. When the car is already online, `check` also saves local history, including when there is nothing new to notify. It does not wake the car to do that. AgentDrive does not run that job and does not install cron.

## Morning history

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ You say what you want. The AI agent runs AgentDrive on your computer. Reads use

Say it in a sentence. The AI agent does the rest.

**Run the parked car from the chat.** Lock or unlock it, turn the climate on or off, set the temperature, heat a seat, heat the steering wheel, turn defrost on or off, or precondition the cabin. Turn sentry mode on or off. Open the rear trunk and close it when the car can, open the front trunk (the frunk), and enable remote start so the car can be driven without the phone key. Start or stop charging, set a charge limit, set the charging current, and schedule cabin warm-up before you leave. Flash the lights or honk. Unlock, turning sentry off, charging, the trunk, the front trunk, and remote start each wait for a confirmation. You can also set the car's own charging timetable, or ask which area the car is parked in. If several cars share the account, give each a nickname and say which one you mean. A family member can ask for a change. Unlock and charging changes wait until you approve them.
**Run the parked car from the chat.** Lock or unlock it, turn the climate on or off, set the temperature, heat a seat, cool a front seat, heat the steering wheel, turn defrost on or off, or precondition the cabin. Set climate keeper to keep, dog, or camp, or turn it off. Turn bioweapon defense mode on or off. Turn sentry mode on or off. Open the rear trunk and close it when the car can, open the front trunk (the frunk), and enable remote start so the car can be driven without the phone key. Open or close the charge port. Start or stop charging, set a charge limit, set the charging current, and schedule cabin warm-up before you leave. Ask for the official charging history and an invoice, or for the software version, release notes, and a scheduled update. Flash the lights or honk. Unlock, turning sentry off, charging, the trunk, the front trunk, remote start, climate keeper, bioweapon defense, the charge port, and a software update each wait for a confirmation. You can also set the car's own charging timetable, or ask which area the car is parked in. If several cars share the account, give each a nickname and say which one you mean. A family member can ask for a change. Unlock, charging changes, climate keeper, bioweapon defense, the charge port, and a software update wait until you approve them.

**Get a health alert when something new needs you.** Tyre pressure, a low battery, a charge problem, or the car left unlocked or open. You hear about it when it is new. The same alert then stays quiet until it clears and comes back.
**Get a health alert when something new needs you.** Tyre pressure, a low battery, a charge problem, or the car left unlocked or open. You hear about it when it is new. The same alert then stays quiet until it clears and comes back. If someone appears to be in the driver seat, you are not told the car is unlocked. That reading covers only the driver seat and is not a guarantee nobody is inside. Climate, climate keeper, or bioweapon defense left on while the car is parked and the driver seat is empty is mentioned at most once an hour until it is turned off.

**Review how the car was used.** Ask for a usage review, or receive a morning briefing: the previous day, the previous week on Monday, the previous month on the 1st, and the previous year on 1 January. A week, a month, or a year includes a short summary and a chart saved on this computer. Ask whether the battery is enough for a trip, or whether charging habits and your home electricity hours suggest a change. Some mornings include a short tip, a service reminder when one is due, and on Monday one official Tesla note when there is something new.

Expand Down
1 change: 1 addition & 0 deletions config/regions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ personal_endpoints:
nearby_charging_sites: /api/1/vehicles/{vehicle_id}/nearby_charging_sites
charging_history: /api/1/dx/charging/history
charging_invoice: /api/1/dx/charging/invoice/{invoice_id}
release_notes: /api/1/vehicles/{vehicle_id}/release_notes

# Business-only routes. The client refuses these even if a caller asks.
blocked_endpoints:
Expand Down
3 changes: 2 additions & 1 deletion config/scopes.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# OAuth scope sets. vehicle_location is the Fleet API scope for a location read.
# Charging management is omitted until the owner asks for it.
# vehicle_charging_cmds is the scope for official charging history and invoices.
version: 1

default:
Expand All @@ -9,6 +9,7 @@ default:
- vehicle_device_data
- vehicle_location
- vehicle_cmds
- vehicle_charging_cmds

optional:
charging: vehicle_charging_cmds
12 changes: 12 additions & 0 deletions config/vehicles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ capabilities:
- defrost_on
- defrost_off
- cabin_precondition
- climate_keeper_off
- seat_cooler
- auto_seat_climate
- bioweapon_off
sensitive_commands:
- unlock
- remote_start
Expand All @@ -68,6 +72,14 @@ capabilities:
- charging_schedule_remove
- departure_schedule_set
- departure_schedule_remove
- climate_keeper_keep
- climate_keeper_dog
- climate_keeper_camp
- charge_port_open
- charge_port_close
- software_schedule
- software_cancel
- bioweapon_on
charging_reads:
- nearby_charging_sites
- charging_history
Expand Down
Loading
Loading