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
51 changes: 49 additions & 2 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. 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, 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 or a family member asks for an action the owner must approve. Do not sign vehicle commands in this skill.
---

# AgentDrive
Expand Down Expand Up @@ -55,6 +55,53 @@ Security trade-off of a shared key: every agent that can read the private key fi

`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.

## Which car

`agentdrive cars` lists the cars on the account. It does not wake a car and it does not print a full VIN. A masked tail is enough to tell them apart.

With one car, do not ask for a nickname and do not pass `--car`. The commands stay as they are.

With several cars, ask the owner for a nickname for each car, then run `agentdrive cars name <tail> <nickname>`. The tail is the last four characters from `agentdrive cars`. Set a default only when the owner chooses one: `agentdrive cars default <nickname>`. `agentdrive cars clear-default` clears it.

Pass `--car <nickname>` on a command for one car. `--car` can sit before or after the command name. If several cars are saved and there is no default and no `--car`, a command that would act on one car refuses. Do not guess.

When a nickname is in use, a confirmation-required command names that car. The sentence has to include `confirm`, the action, and the nickname. Example: `I confirm unlock on daily`. `I confirm unlock` is not enough for that car, and a sentence that names a different nickname does not apply. The result line names the car too, for example `OK: unlock on daily`. With one car and no `--car`, keep the existing sentence, such as `I confirm unlock`.

Health checks, alert memory, briefings, and the local history are per car. The first car that is named keeps history that was already saved. With several cars, schedule `agentdrive check --json --car <nickname>` once per car. The same alert on two cars is two alerts. The morning job runs `agentdrive history due --car <nickname>` once per car and you send each briefing on its own. With one car, `agentdrive check --json` and `agentdrive history due` stay as they are. Those commands still do not wake the car.

## Family members

The owner registers a handle and the actions that handle may ask for.

```bash
agentdrive family add rider
agentdrive family allow rider lock
agentdrive family allow rider status
agentdrive family allow rider unlock
agentdrive family allow rider charging
agentdrive family list
agentdrive family revoke rider lock
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.

```bash
agentdrive --as rider --car daily unlock
```

The owner approves or denies with the id from that text:

```bash
agentdrive request list
agentdrive request approve <id>
agentdrive request deny <id>
```

Approve runs the action once. The car must still be in Park at speed 0. A request expires 10 minutes after it is created. Expired, denied, and already used requests do not run. A family member cannot approve or deny their own request. Do not pass `--as` on `request approve` or `request deny`.

## 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.
Expand All @@ -71,4 +118,4 @@ The same job is used for every shell-capable AI agent. Do not invent a second mo

## Secrets

Never put a private key, token, client secret, authorization code, or VIN in this skill, in the AI agent's memory, or in chat.
Never put a private key, token, client secret, authorization code, or VIN in this skill, in the AI agent's memory, or in chat. Car nicknames and family handles live in the config home. Do not copy `cars.yaml`, `family.yaml`, or `requests.json` into chat or into the git repo.
6 changes: 6 additions & 0 deletions .agents/skills/agentdrive/config/runtime.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,9 @@ token_file: 'C:\Users\<you>\agentdrive-key\tokens.json'
# report_schedule:
# enabled: true
# time: "07:30"
#
# Car nicknames and family members are not stored in this file.
# `agentdrive cars name` writes $AGENTDRIVE_HOME/cars.yaml.
# `agentdrive family add` writes $AGENTDRIVE_HOME/family.yaml.
# Pending family requests are $AGENTDRIVE_HOME/requests.json.
# Do not commit those files.
2 changes: 2 additions & 0 deletions .agents/skills/agentdrive/prompts/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ If I ask to turn the briefing off, run `agentdrive report-schedule disable` and
AgentDrive stores the time and does not run in the background.
The same daily job is used for every shell-capable AI agent.
Keep every secret in the config home or in the existing key and token files.
If several cars are on the account, ask for a nickname for each and pass `--car <nickname>`. With one car, do not. A confirmation then names the car, for example `I confirm unlock on daily`.
If a family member asks for unlock or a charging change, run it with `--as <handle>` and relay the pending-request text to the owner. The owner approves with `agentdrive request approve <id>`. Do not approve it yourself.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ config/profile.local.yaml
config/host.yaml
config/runtime.yaml

# Private multi-car and family state. These belong in $AGENTDRIVE_HOME only.
/cars.yaml
/family.yaml
/requests.json

# Editor and OS noise
.DS_Store
.idea/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ 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.
**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.

**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.

Expand Down
4 changes: 3 additions & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ A private key that is already paired with another agent you trust can be the key

AgentDrive refuses a state-changing command unless the vehicle reports shift state Park and speed 0. It then reads the vehicle again. If that read does not match the command you asked for, the result is a failure, and the command is not sent a second time.

These actions are sensitive: unlock, remote start, opening the front trunk, opening or closing the rear trunk, sentry mode off, any charging change, and setting or removing a departure schedule. Each one needs an explicit confirmation for that action. A previous "yes" does not carry over. A schedule cannot confirm them, cannot skip the check, and cannot run remote start, the rear trunk, the front trunk, sentry mode off, or a departure schedule change. Turning sentry mode on, seat heat, steering-wheel heat, defrost, and preconditioning the cabin now are parked commands. They are not on this sensitive list.
These actions are sensitive: unlock, remote start, opening the front trunk, opening or closing the rear trunk, sentry mode off, any charging change, and setting or removing a departure schedule. Each one needs an explicit confirmation for that action. A previous "yes" does not carry over. A schedule cannot confirm them, cannot skip the check, and cannot run remote start, the rear trunk, the front trunk, sentry mode off, or a departure schedule change. When more than one car is in use, the confirmation also names that car, so it cannot be applied to a different one. Turning sentry mode on, seat heat, steering-wheel heat, defrost, and preconditioning the cabin now are parked commands. They are not on this sensitive list.

A family member can be allowed to ask for an action. Unlock and charging changes are not run for them. AgentDrive saves a pending request for 10 minutes. You approve or deny it. A family member cannot approve their own request. An expired, denied, or already used request cannot run.

Remote commands that can unlock a vehicle create a real theft risk if the credentials leak. Do not leave valuables in the vehicle. After an unlock, confirm that the vehicle is locked again. Prefer leaving sentry mode on when the vehicle is parked somewhere unfamiliar.

Expand Down
6 changes: 6 additions & 0 deletions config/runtime.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,9 @@ token_file: 'C:\Users\<you>\agentdrive-key\tokens.json'
# report_schedule:
# enabled: true
# time: "07:30"
#
# Car nicknames and family members are not stored in this file.
# `agentdrive cars name` writes $AGENTDRIVE_HOME/cars.yaml.
# `agentdrive family add` writes $AGENTDRIVE_HOME/family.yaml.
# Pending family requests are $AGENTDRIVE_HOME/requests.json.
# Do not commit those files.
Loading
Loading