Skip to content

Agents and the API

Your coding agents keep the record. You decide what counts.

Two ways, and you can use both. Install one hook and the time a project consumes — yours and your agents' — records itself, attributed and categorized. Or just ask: "start a timer on this" is a sentence your agent can act on, and it works out the project, the category and the description from what it is already doing. Reviewable before any of it counts, either way.

Request access

Shyre is in early access and accounts are set up by hand. Tell us what you work on and we'll be in touch.

Setup is one evening, once

Each developer does this once, on their own machine. Nothing is deployed and nothing runs on a server.

  1. A token in your shell

    Each developer exports one key from their shell profile. It's their identity, the same for every repository.

  2. A plugin, or one installer

    Claude Code installs it as a plugin; Codex and Cursor get the same runtime from one installer command. Either way the hooks fire for every session in every repository.

  3. Sessions emit heartbeats

    Tool calls, prompts and completed subagents leave precise activity marks as the session runs.

  4. Hours appear

    Shyre groups the activity into attributed, categorized time, ready to review before any of it counts.

One key and one install turn work already happening into hours. Nobody fills in a form.

Or just ask it

The hook records without being asked — that is the first way. The second is that you can simply say so. Shyre ships an MCP server on every account, so "start a timer on this" is a sentence your agent can act on, and it fills in the rest from what it can already see.

You say it in words
“Start a timer on this.” “Log the last hour to the migration.” “What am I tracking right now?” No form, no project picker, no switching windows to the thing that tracks the work you were already doing.
It works out which project
It reads the repository you are in and matches it against your live project list — which comes back with each project’s own categories, so the entry lands in the right one instead of defaulting to whatever is first.
It writes the description
It is holding the branch, the ticket and the diff. So the line on your timesheet says what the work actually was, rather than “development” — and the ticket key links itself.
It cannot touch your timer
An agent starting a timer while yours is running is refused, not silently swapped. It cannot stop yours either — the database rejects a stop on any timer an agent did not start. It keeps its own record beside yours; it never edits yours.

It infers, so it can infer wrong. Every entry it writes is a draft you can correct or strike — the same review the automatic ones get.

Two ways, one record. Ask when you want to be explicit; let the hook catch the rest.

What actually gets measured

Most time-tracking marketing is vague about this on purpose. Here is the whole mechanism, because it is the first thing anyone will ask.

Activity, sampled
Every tool call, prompt and subagent finish appends a heartbeat on the developer's machine, and the entry is the sum of the gaps between them. The marks come from what the agent did — no keystrokes, no screenshots, no idle-mouse detection, nothing that watches a person.
Idle time, dropped
Any gap longer than the idle cap is thrown away. Lunch, a meeting, a laptop left open overnight — none of it becomes an hour.
Machine hours, counted and labeled
A long unattended run emits a dense stream of tool-call heartbeats, so it becomes time — deliberately, because it is time the project really consumed. It is also not a person's attention, and it never arrives as one: every entry names the agent that produced it, so agent hours are never quietly folded into somebody's. Whether those hours belong on a client's invoice, or in what a project cost your team, is a decision this makes visible rather than one it makes for you.
Attribution, immutable
Which agent, which session, on whose behalf. The database refuses to let it be edited afterwards, including by an administrator.

What stops it counting twice

Two recorders and one session is the ordinary way to invent an hour. Both cases are refused, and neither is refused silently.

The backstop stands down
An agent can log its own work through the API, and the hook logs the session that agent just finished. Left alone, that is the same hours twice. So before it posts, the hook asks what is already recorded for that span — and when the agent has covered it, the hook writes nothing at all.
Overlap is refused, with the fix attached
Two entries cannot claim the same minute on the same project. A conflicting write is rejected, and the rejection names the window that blocked it and the earliest start that would be accepted — so a machine caller corrects itself in one retry instead of guessing at the boundary.

This is the whole payload

“No source code leaves the machine” is easy to write. Here is the request.

The recorder is one Node file you can read before you run, shipped inside the Claude Code plugin and installed for other agents by its own installer. When a session ends it sends nine fields for each run of activity: the project, a start time, an end time, a fixed one-line description, the agent's label, the session id, a key that stops the same run being counted twice, and two meters — how long the machine was working, and how long it sat waiting on you. No file names. No prompts. No diff. Nothing that says what the code does.

Between beats it keeps two local files per session under ~/.shyre — a small header with the repository and working directory, and a list of timestamps, each tagged with which hook wrote it. At session end those become a spool file per run of activity, kept until delivered and for at most seven days. It also appends a line to a local log (~/.shyre/refusals.log, or $SHYRE_HOOK_LOG) whenever a run's time is refused, already covered, or belongs to a repository no project names, so time can never go missing silently; that file records the project and the working window, and it persists until you delete it.

Two meters, never added to your hours

The two meters partition the session: every moment inside it is either the machine working or the agent waiting on you — nothing is counted twice and nothing is left out. (They are each rounded down to the minute, so the two printed figures can land a minute under the recorded time.) Neither is ever summed into your hours, multiplied by a rate, or placed on an invoice — they sit beside the entry, not inside it. The waiting figure is not wasted time; you are usually reading the diff. It is there because it is the one number you can act on: it tells you when you were the bottleneck. Both meters come out in the CSV export, as their own columns.

{
  "project_id":     "…",
  "start_time":     "…",
  "end_time":       "…",
  "description":    "Claude Code session — active time
                     (idle gaps excluded); see transcript",
  "agent_label":    "Claude Code",
  "session_ref":    "…",
  "idempotency_key": "…",
  "agent_runtime_min": 47,
  "agent_wait_min":    12
}

What the key can reach, and what it cannot

You are about to hand a coding agent write access to the record you bill from. These are the walls.

  • It cannot touch time a person logged

    Edit and delete are refused on any entry whose recorded origin is not an agent.

  • It cannot see a rate

    Not the customer's, not a colleague's, not the cost of an hour.

  • It cannot publish, and cannot retract

    Agent-posted release notes arrive as drafts. Publishing stays a human act.

  • It cannot take your timer

    Refused while any timer runs; stopping a person's takes an explicit override.

  • It cannot read across the team

    Rates are masked by role and developers do not read each other's entries. A key inherits the limits of the person it belongs to; it never exceeds them.

The API is not an upgrade.

A REST surface and an MCP server, on every account, at the one price.

API access is the classic thing sold as a tier. It is the feature that turns a $9 plan into a $14 plan, because the people who ask for it are the people who have already committed. Shyre's is on from the first person, at the same rate, because there is no level to move you up to.

One implementation behind two transports, so a coding agent connects to it directly and a shell script gets the same endpoints. It covers the time record and the release notes on top of it: read your project context, start and stop a timer, log a finished block, correct one, draft a release. Authentication is a personal access token in an Authorization header — never a query string, never a cookie, never a body field.

  • One key per person, not one per team

    A key is an individual's identity across every repository they work in, so an entry always names who it was logged on behalf of.

  • It reaches the time record, not the whole account

    Today the surface is time and releases — the parts an agent needs to do its own bookkeeping. Invoicing and customer records are not on it yet. You can still export them; you cannot yet script them.

  • Built for agents, useful to anyone

    The agent hooks kit is one Node file on top of it, the same file for every agent. Anything you can do from a terminal, you can do to your own time record.

Wire it up in an evening. Turn it off in a click.

Integrations stay off until an owner switches them on, and switching them back off refuses every existing key on its next call. Nothing about this is a one-way door.