# Keito — LLM Documentation Pack > Product, developer, API, CLI, SDK, and AI agent workflow docs for Keito. This file is a curated full-text context pack, not a dump of every Keito page. Core implementation and workflow docs are included in full; large, volatile, or niche references are summarized or linked to keep ingestion predictable. Marketing pages, landing pages, blog content, changelogs, and generated SEO pages are intentionally omitted. Use /llms.txt as the compact index. --- # Core Product Workflows Workspace setup, time tracking, project setup, client access, expenses, and invoicing. --- ## Setting Up Your Account source: https://keito.ai/docs/getting-started/setting-up-your-account markdown: https://keito.ai/docs/getting-started/setting-up-your-account.md llm_mode: full # Setting Up Your Account Get your Keito workspace ready in just a few steps. ## Creating Your Workspace When you sign up for Keito, you'll be guided through a short onboarding wizard: 1. **Company details** — Enter your company name, invoice address, timezone, currency, and week start day. 2. **Choose your plan** — Select a subscription plan or start with a free trial. 3. **Preferences** — Keito auto-detects your timezone and currency based on your location. You can adjust these at any time. Once complete, you'll land on the Time Tracking page, ready to start logging hours. All workspaces use `https://app.keito.ai`; Keito does not create a separate company URL or configurable subdomain. ## Configuring Your Workspace After setup, head to **Settings** to fine-tune your workspace: ### Personal Preferences - **Timezone** — Set the timezone for your own account. - **Clock display** — Use a 12-hour or 24-hour clock. - **Default views** — Choose how the Time and Projects pages open. - **Standard work week** — Set your personal weekly capacity. ### Workspace Locale and Formatting - **Week start day** — Administrators can choose Saturday, Sunday, or Monday. - **Currency** — Set your base currency for invoicing and rates. - **Date format** — Choose how dates appear across the workspace. - **Duration format** — Display tracked time as decimal hours or hours and minutes. ### Time Tracking Defaults - **Timer mode** — Track running time as a duration or with start and end timestamps. - **Weekly capacity** — Set the default work week hours for your team. - **Require notes** — Optionally enforce notes on every time entry. - **Rounding** — Round time entries to the nearest 5, 6, 10, 15, or 30 minutes, or leave rounding off. ### Invoice Details and Branding Invoice-facing settings are under **Invoices > Configure** rather than the main Settings page: - **Company Information** — Update the company name and invoice address. - **Appearance** — Upload a logo and configure invoice and estimate presentation. ## Next Steps - [Invite your team](/docs/getting-started/inviting-your-team) - [Log your first time entry](/docs/getting-started/your-first-time-entry) --- ## Inviting Your Team source: https://keito.ai/docs/getting-started/inviting-your-team markdown: https://keito.ai/docs/getting-started/inviting-your-team.md llm_mode: full # Inviting Your Team Add team members and client stakeholders to your Keito workspace so the right people can track time, collaborate on projects, or view selected project progress. If you are inviting an external accountant, use the owner-only [Invite and Manage an Accountant](/docs/accountant-access/invite-manage) flow instead of giving them Administrator access. ## Sending Invitations 1. Navigate to **Team** from the main menu. 2. Click **Invite Members**. 3. Enter the email addresses of the people you'd like to invite. 4. For each person, you can optionally pre-fill: - **Name** — First and last name - **Role** — Member, Manager, or Administrator - **Hourly rate** — Their default billing rate - **Weekly capacity** — Hours per week they're expected to work - **Type** — Employee, Contractor, or Client 5. Click **Send Invitations**. Invitees receive an email with a link to create their account and join your workspace. If the email address already belongs to a Keito account in another workspace, send the invitation to that same address. The person accepts it through the normal invitation flow; Keito adds the new workspace to their existing identity instead of asking them to create a duplicate account. See [Working Across Multiple Workspaces](/docs/team-management/multiple-workspaces). ## Employee, Contractor, or Client Choose the type that matches the person's relationship to your organisation: | Type | Use for | Typical access | |------|---------|----------------| | Employee | Internal staff | Track time, submit expenses, and work across assigned projects. | | Contractor | External delivery workers | Track time and expenses on assigned projects, usually with rates and capacity. | | Client | Client stakeholders | View selected projects without internal team permissions. | If you are inviting a client to see a specific project, the recommended flow is from **Projects > Edit project > Project member permissions**. That lets you send the invite and set the client's project permissions in one place. See [Client Project Access](/docs/clients/client-project-access). ## Bulk Invitations Need to invite many people at once? You can add multiple email addresses and configure each person's details before sending all invitations in one batch. ## What Happens Next When a team member accepts their invitation: 1. They create their Keito account via the setup link. 2. They're automatically added to your workspace with the role you assigned. 3. They can immediately start tracking time on any projects they're assigned to. When a client accepts a project invite, Keito applies the pending project assignment from the invitation. They can view only the projects you assigned to them. ## Invitation Status Track the status of your invitations from the Team page: - **Pending** — Invitation sent, not yet accepted - **Active** — Member has joined and is using the workspace - **Archived** — Member has been deactivated ## Next Steps - [Create your first time entry](/docs/getting-started/your-first-time-entry) - [Set up projects](/docs/projects/creating-projects) for your team to track against - [Configure roles and permissions](/docs/team-management/roles-permissions) - [Work across multiple workspaces](/docs/team-management/multiple-workspaces) - [Invite clients to projects](/docs/clients/client-project-access) --- ## Your First Time Entry source: https://keito.ai/docs/getting-started/your-first-time-entry markdown: https://keito.ai/docs/getting-started/your-first-time-entry.md llm_mode: full # Your First Time Entry Start tracking time in Keito — it only takes a few seconds. ## Before You Begin To log time, you'll need at least one project set up. If you haven't created any yet, head to [Creating Projects](/docs/projects/creating-projects) first. ## Using the Timer The fastest way to track time is with the built-in timer: 1. Go to the **Time** page. 2. Select a **Project** and **Task** from the dropdowns. 3. Optionally add a **note** describing what you're working on. 4. Click the **Start Timer** button. 5. Work on your task — the timer runs in the background and persists even if you close the browser. 6. When you're done, click **Stop** to save the entry. Only one timer can run at a time. Starting a new timer will stop the current one. ## Manual Entry Prefer to log time after the fact? Use manual entry: 1. Go to the **Time** page. 2. Select your **Project** and **Task**. 3. Enter the duration: - **Decimal format:** Type `2.5` for two and a half hours. - **Hours:Minutes format:** Type `2:30` for the same duration. 4. Add a note if needed. 5. Click **Save**. ## Start/End Time Mode For precise time logging, switch to Start/End time mode: 1. Enter your **start time** and **end time**. 2. Keito automatically calculates the duration. 3. Cross-midnight entries are supported (e.g., 11:00 PM to 1:00 AM). ## Billable vs Non-Billable Each entry can be marked as billable or non-billable. By default, entries inherit the billable setting from the task, but you can override this per entry. Billable entries contribute to invoiceable amounts on reports and invoices. ## Editing and Deleting Entries - Click on any entry to edit its details. - Use the delete option to remove an entry entirely. - Entries that have been approved or invoiced are locked and cannot be edited. ## Day View vs Week View Keito offers two ways to view your time: - **Day view** — See all entries for a single day with a running total. - **Week view** — A grid showing hours per project and task across the entire week. Great for filling in time at the end of the week. Learn more about the [Week View](/docs/time-tracking/week-view). ## Next Steps - [Learn about timers vs manual entry](/docs/time-tracking/timers-vs-manual) - [Submit your timesheet for approval](/docs/time-tracking/submitting-timesheets) - [Log an expense](/docs/expenses/logging-expenses) --- ## Understanding Agent Entries source: https://keito.ai/docs/getting-started/agent-entries markdown: https://keito.ai/docs/getting-started/agent-entries.md llm_mode: full # Understanding Agent Entries Keito supports AI agents as first-class team members. When an agent integration tracks time or logs expenses through the API, SDKs, CLI agent commands, or Agent Skill, those entries appear in your workspace alongside human entries with clear visual indicators. Regular CLI timer entries appear separately with the CLI source. ## What Are Agent Entries? Agent entries are time entries and expenses created by AI agents like Claude Code, Codex, or custom bots through the Keito API, SDKs, CLI `session-record` command, or Agent Skill. CLI entries are time entries created by regular command-line timer and manual commands. Both flow through the same pipeline as human entries: projects, tasks, rates, approvals, invoices, and reports. ## How to Spot Them - **Violet "Agent" badge** — appears on time entries and expenses created by agents in the day view, week view, and expenses list. - **Amber "CLI" badge** — appears on entries created via the Keito CLI. - **No badge** — entries created through the web UI (the default). ## Filtering by Source In any list view, use the source filter to show only entries from a specific source: - **All** — everything (default) - **Web** — entries from the web UI - **CLI** — entries from the command-line tool - **API** — entries from direct API calls - **Agent** — entries from AI agents Regular CLI timer commands send time entries with `source=cli`. The Agent Skill and `keito time session-record` create `source=agent` entries with structured metadata. ## What This Means for Your Workflow - **Approvals**: Agent entries go through the same approval workflow. Managers review and approve them like human timesheets. - **Invoicing**: Agent work appears on invoices with clear labelling. Clients see what was done by humans and what was done by agents. - **Reports**: Filter reports by source to see agent hours vs. human hours, LLM costs by project, and agent productivity metrics. ## Next Steps - [Managing Agent Users](/docs/team-management/agent-users) — set up agent profiles with rates and project assignments. - [LLM Usage Expenses](/docs/expenses/llm-usage) — understand how token costs are tracked. - [Keito Agent Skill](/docs/integrations/skills) — install automatic Codex and Claude Code session tracking. - **For developers**: [Developer Overview](/docs/developer/introduction) — start integrating agents with the Keito API. --- ## Tracking Time source: https://keito.ai/docs/time-tracking/tracking-time markdown: https://keito.ai/docs/time-tracking/tracking-time.md llm_mode: full # Tracking Time Keito provides flexible options for recording how your team spends their hours. Whether you prefer real-time timers or logging time after the fact, everything ends up in the same place — organised by project and task. ## How Time Entries Work Every time entry in Keito includes: - **Date** — When the work was performed - **Project** — Which project the work belongs to - **Task** — The specific type of work (e.g., Design, Development, Meetings) - **Duration** — How long you worked - **Notes** — Optional context about what you did - **Billable status** — Whether the time is chargeable to the client ## Entry Methods ### Timer Click start, work, click stop. The timer runs in the background and persists across page refreshes and browser sessions. You can only run one timer at a time. By default, timers start at the current time. If an administrator enables **Past timer starts** in [Company Settings](/docs/settings/company-settings), team members can start a timer from a selected past date and optional start time. Future start times are not allowed. ### Duration Entry Type the hours directly: - **Decimal:** `1.5` = 1 hour 30 minutes - **Hours:Minutes:** `1:30` = 1 hour 30 minutes ### Start/End Time Enter a start and end time, and Keito calculates the duration. Supports entries that cross midnight. ## Quick Actions - **Copy** — Duplicate an entry to quickly log similar work. - **Restart** — Start a new timer based on an existing entry's project and task. - **Edit** — Modify any unlocked entry's details. - **Delete** — Remove an entry entirely. ## Choosing Projects and Tasks The Track time dialog lets each person choose between recent-first and fully alphabetical project/task pickers. Favourites remain available with either option. See [Project and Task Picker Ordering](/docs/time-tracking/project-task-picker-ordering) for the complete ordering, grouping, search, and keyboard rules. ## Entry Locking Entries become locked (read-only) when they are: - **Approved** — After a manager approves a submitted timesheet - **Invoiced** — After the time has been included on an invoice - **Auto-locked** — If your workspace has entry locking enabled after a set number of days Locked entries cannot be edited or deleted through the ordinary entry actions. When eligible approved or closed historical time has the wrong project, task, or billability, a workspace owner or administrator can use [Administrator Corrections](/docs/time-tracking/administrator-corrections) without removing its approval or recognised lock history. When **Entries > Actions > Move selected to project** skips approved or closed rows, the preview says how many can be moved that way and offers owners and administrators a **Switch to Administrator correction** button that keeps the same selection and destination; managers and members are asked to involve an administrator. ## Time Rounding Time rounding is off by default. If an administrator enables it in **Settings -> Preferences -> Time rounding**, Keito can round each entry to the nearest increment or always up to the next increment: - 5 minutes - 6 minutes (1/10 hour) - 10 minutes - 15 minutes (1/4 hour) - 30 minutes Keito keeps the actual duration of each entry. The rounded value is calculated separately and is used for totals, budgets, reports, and new invoice quantities. Changing a rounding setting does not overwrite the actual duration. When rounding changes an entry, the day and week timesheets keep rounded time as the primary value and identify the actual time alongside it. The Detailed Time report shows separate **Actual** and **Rounded** columns. Rounding is applied to each entry before entries are added together. For example, with nearest 15-minute rounding, two separate 8-minute entries each round to 15 minutes, so the rounded total is 30 minutes while the actual total is 16 minutes. CSV and Excel detailed-time exports keep the existing **Hours** column as the rounded value for compatibility and add **Actual Hours** and **Rounded Hours** columns when rounding is enabled. Client-facing PDF reports continue to use rounded time. Already-created invoice line items keep their saved quantities. Workspace administrators should choose a rounding policy appropriate for their contracts and applicable record-keeping rules. ## Daily and Weekly Totals The time page shows your running totals: - **Daily total** — Sum of all entries for the selected date - **Weekly total** — Sum of all entries for the current week These help you stay on track with your weekly capacity target. ## Filtering Entries Administrators and managers can filter the time view by: - Team member - Client - Project - Task - Billable status - Approval status - Date range --- ## Timers vs Manual Entry source: https://keito.ai/docs/time-tracking/timers-vs-manual markdown: https://keito.ai/docs/time-tracking/timers-vs-manual.md llm_mode: summary Summary: Keito supports two primary approaches to time tracking. Full Markdown: https://keito.ai/docs/time-tracking/timers-vs-manual.md --- ## Restarting Timers source: https://keito.ai/docs/time-tracking/restarting-timers markdown: https://keito.ai/docs/time-tracking/restarting-timers.md llm_mode: summary Summary: Choose whether restarting a stopped timer accumulates time on the same entry or creates a new entry. Full Markdown: https://keito.ai/docs/time-tracking/restarting-timers.md --- ## Week View source: https://keito.ai/docs/time-tracking/week-view markdown: https://keito.ai/docs/time-tracking/week-view.md llm_mode: summary Summary: The Week View gives you a bird's-eye perspective of your time across an entire week. Full Markdown: https://keito.ai/docs/time-tracking/week-view.md --- ## Submitting Timesheets source: https://keito.ai/docs/time-tracking/submitting-timesheets markdown: https://keito.ai/docs/time-tracking/submitting-timesheets.md llm_mode: full # Submitting Timesheets When the Approvals feature is enabled, team members submit their time entries for manager review before they're considered final. ## How Submission Works 1. Track your time throughout the week as normal. 2. When your timesheet is complete, click **Submit for Approval**. 3. All unsubmitted entries for the selected period are bundled and sent to your manager. 4. You'll be notified when your timesheet is approved or rejected. ## Submission Scope When you submit, all of your **unsubmitted** time entries within the current period are included. You don't need to select individual entries — the submission covers everything that hasn't been submitted yet. ## What Happens After Submission Once submitted, your entries move to the **Submitted** state: - You can still view your submitted entries but cannot edit them. - Your manager receives a notification to review your timesheet. - The entries remain in Submitted state until your manager takes action. ## Approval Outcomes Your manager will either: - **Approve** — Entries are locked and can be included in invoices and reports. - **Reject** — Entries return to an editable state. You'll receive a notification explaining why, and can make corrections before resubmitting. ## Reminders If your administrator has configured timesheet reminders, you'll receive email notifications: - **Reminder** — A nudge to submit before the deadline (e.g., Friday at 9 AM). - **Deadline** — A final reminder when the submission window is closing (e.g., Friday at 5 PM). ## Tips - Submit regularly (daily or weekly) rather than letting entries accumulate. - Add notes to your entries so your manager has context when reviewing. - If you realize you missed time after submitting, log additional entries and submit again — your manager will see the new batch separately. ## Without Approvals If the Approvals feature is not enabled in your workspace, time entries are considered final as soon as they're saved. There's no submission step required. --- ## Approving Time source: https://keito.ai/docs/time-tracking/approving-time markdown: https://keito.ai/docs/time-tracking/approving-time.md llm_mode: full # Approving Time Managers and administrators can review and approve submitted timesheets from their team. ## Accessing the Approval Queue Navigate to **Time > Approval** to see all pending timesheet submissions from your team. The queue shows: - Team member name - Period covered - Total hours submitted - Breakdown of billable vs non-billable hours ## Reviewing a Submission Click on a team member's submission to see the full details: - Individual time entries with projects, tasks, and notes - Daily totals for the period - Any entries that look unusual (e.g., overtime, missing notes) ## Taking Action For each submission, you can: ### Approve Click **Approve** to accept the timesheet. This: - Locks the entries from further editing - Makes the time available for invoicing - Notifies the team member that their timesheet was approved ### Reject Click **Reject** to send the timesheet back for corrections. You can include a reason for the rejection. This: - Returns entries to an editable state - Notifies the team member with your feedback - The member can then correct and resubmit ## Bulk Actions When multiple team members have pending submissions, you can approve or reject several at once: 1. Select the submissions you want to act on. 2. Choose **Approve Selected** or **Reject Selected**. 3. For bulk rejections, you can add a shared note. ## Who Can Approve - **Managers** can approve timesheets from their assigned teammates only. - **Administrators** can approve any timesheet in the workspace. The teammate assignment is configured under [Team Management](/docs/team-management/managing-members). ## Withdrawing Approvals If a manager has the "Withdraw Approvals" permission, they can undo a previous approval: - The entries return to Submitted state. - The team member is notified. - This is useful when an error is discovered after approval. ## Correcting Approved Time Owners and administrators can open an approved time entry from the approval review screen, withdraw approval for that single entry, edit it on the teammate's timesheet, and approve it again. See [Correcting Approved Time](/docs/time-tracking/correcting-approved-time) for the full workflow and locking rules. When historical time only needs a different project, task, or billability classification and its approval and recognised lock history must stay in place, use [Administrator Corrections](/docs/time-tracking/administrator-corrections) instead. Adding missing time to an approved week remains a separate reopening workflow. ## Approval and Invoicing Approved time entries become available for inclusion on invoices. Until time is approved, it won't appear in the invoicing workflow (when approvals are enabled). --- ## Correcting Approved Time source: https://keito.ai/docs/time-tracking/correcting-approved-time markdown: https://keito.ai/docs/time-tracking/correcting-approved-time.md llm_mode: summary Summary: How owners and administrators can correct approved teammate time without deleting and recreating entries. Full Markdown: https://keito.ai/docs/time-tracking/correcting-approved-time.md --- ## Administrator Corrections source: https://keito.ai/docs/time-tracking/administrator-corrections markdown: https://keito.ai/docs/time-tracking/administrator-corrections.md llm_mode: summary Summary: Move eligible historical time to the correct project and task while preserving approval, closure, and lock history. Full Markdown: https://keito.ai/docs/time-tracking/administrator-corrections.md --- ## Agent & CLI Time Entries source: https://keito.ai/docs/time-tracking/agent-cli-entries markdown: https://keito.ai/docs/time-tracking/agent-cli-entries.md llm_mode: full # Agent & CLI Time Entries Time entries created by agents and the CLI work exactly like manual entries — with two additional fields that provide context about their origin. ## The source Field Every time entry has a `source` field indicating how it was created: - `web` — created in the Keito web app - `cli` — created via the Keito CLI - `api` — created via a direct API call - `agent` — created by an AI agent - `calendar` — created by a calendar integration - `desktop` — created by the Keito desktop app This field is set automatically by each integration. Regular CLI timer and manual commands create `source=cli` entries. Agent lifecycle hooks should use `keito time session-record`, which creates `source=agent` entries by default. ## The metadata Field Agent and API entries can include a `metadata` JSON object with contextual information: | Field | Description | Example | |---|---|---| | `agent_id` | Identifier for the agent | `review-bot-01` | | `agent_type` | Agent platform | `claude-code` | | `session_id` | Unique session identifier | `550e8400-e29b-...` | | `model` | LLM model used | `claude-opus-4-6` | Metadata is visible in the entry detail view and can be used for filtering in reports. The CLI can attach metadata with `keito time session-record --metadata`, plus convenience flags such as `--agent-id`, `--agent-type`, and `--skill`. For token costs and LLM usage expenses, use the API, Node SDK, or Python SDK. ## Visual Indicators Agent entries display a violet "Agent" badge. CLI entries display an amber "CLI" badge. These badges appear in: - Day view - Week view - Expenses list - Entry detail view ## Approving Agent Time Agent entries follow the same approval workflow as human entries. When reviewing timesheets, you can: 1. Filter by source to review only agent entries. 2. Check the metadata to understand what the agent did. 3. Approve, reject, or edit as needed. ## Related - [Tracking Time](/docs/time-tracking/tracking-time) — the basics of time entries - [Approving Time](/docs/time-tracking/approving-time) — the approval workflow - [Developer Overview](/docs/developer/introduction) — for building agent integrations - [Keito Agent Skill](/docs/integrations/skills) — automatic local agent session tracking --- ## Creating Projects source: https://keito.ai/docs/projects/creating-projects markdown: https://keito.ai/docs/projects/creating-projects.md llm_mode: full # Creating Projects Projects are the core organising unit in Keito. Every time entry and expense is associated with a project, which belongs to a client. ## Creating a New Project 1. Navigate to **Projects** and click **New Project**. 2. Fill in the required fields: - **Project name** — A clear, descriptive name - **Client** — The client this project belongs to (required) 3. Configure optional details: - **Project code** — A short identifier (e.g., "ACME-WEB") - **Start date** and **End date** — The project timeline - **Notes** — Internal notes about the project ## Project Types Choose the billing model that matches your client agreement: ### Time & Materials Bill the client based on actual hours worked at agreed rates. This is the most common project type for professional services. - Hours are tracked and billed at the configured rate. - The client pays for actual time spent. ### Fixed Fee A predetermined total fee for the project, regardless of hours worked. - You still track time for internal purposes and profitability analysis. - The fixed fee is the total invoiceable amount. ### Non-Billable Internal projects where no time or expenses are billed to a client. - Useful for internal meetings, training, admin time, or R&D. - Hours still count toward capacity and utilization metrics. ## Billing Configuration For billable projects, configure how rates are applied: ### Bill By Options | Option | Description | |--------|-------------| | Project rate | Uses only one shared hourly rate for all work on this project | | Task rates | Uses each project task's rate, with that task's default as a fallback | | Person hourly rate | Uses each person's dated global profile rate or one project-only override | | Non-billable | Stores no billable rate or amount | ### Setting Rates - **Project rate** — Enter one rate that applies to all entries. - **Task rates** — Set a rate for each task assigned to the project. - **Person hourly rate** — Choose each person's dated global profile source or one project-only override in **Project team**. Billing methods are mutually exclusive; missing rates stay visible instead of falling through. New entries snapshot their rate. Changes affect future time unless you explicitly reprice eligible uninvoiced time; invoice lines never change. See [Project Team](/docs/projects/project-team). ## Project Lifecycle ### Active Projects New projects start in an Active state. Team members can track time and expenses against active projects. ### Archiving Projects When a project is complete: 1. Open the project and click **Archive**. 2. The project no longer appears in active project lists or time entry dropdowns. 3. All historical data (entries, invoices, reports) is preserved. 4. Archived projects can be restored at any time. ## Next Steps - [Set up budgets](/docs/projects/budgets) to track spending - [Assign team members](/docs/projects/project-team) to the project - [Invite client stakeholders](/docs/clients/client-project-access) when they need project visibility - [Add tasks](/docs/projects/tasks) for work categorization --- ## Budgets & Tracking source: https://keito.ai/docs/projects/budgets markdown: https://keito.ai/docs/projects/budgets.md llm_mode: full # Budgets & Tracking Set budgets on your projects to monitor spending and get alerted before costs exceed expectations. ## Budget Types Choose the budget type that matches how you want to track spending: | Budget Type | Tracks | Best For | |-------------|--------|----------| | Total Hours | Total hours worked across the project | Time-capped engagements | | Total Fees | Total billable amount (hours × rates) | Fixed-budget projects | | Per-Task | Individual budget per task | Phased or scoped work | | Per-Person | Individual budget per team member | Resource-capped projects | | None | No budget tracking | Open-ended work | For **Total Hours** budgets, choose whether all tracked hours consume the budget or only hours marked billable. Existing projects continue to count all tracked hours unless **Billable hours only** is enabled on that project. ## Setting a Budget 1. Open the project and go to the budget section. 2. Select your budget type. 3. Enter the budget amount (hours or currency depending on type). 4. Optionally enable **monthly reset** to have the budget renew each month. 5. For a positive monthly hours budget, optionally set **Project activity chart** to **Monthly budget comparison**. ## Monthly Reset When enabled, the budget resets at the beginning of each month. This is useful for: - Retainer clients with a set monthly hour allocation - Ongoing support contracts - Monthly resource budgets Without monthly reset, the budget applies to the entire life of the project. ### Monthly budget comparison Projects use **Automatic (current behaviour)** by default. Automatic keeps the adaptive activity chart: daily for short ranges, weekly for medium ranges, and monthly for longer ranges. For Total Hours, Per-Task hours, and Per-Person hours budgets with monthly reset enabled, an administrator or manager with commercial-project editing access can opt an individual project into **Monthly budget comparison**. The chart compares consumed hours in every month with the project’s current configured monthly budget, includes zero-activity months, and marks the current month as month to date. Previous months are therefore recalculated if the current budget changes. Fee and internal-cost budgets continue to use Automatic. ## Stopping Time Tracking at the Budget For a **Total Hours** budget you can tell Keito to refuse time once the budget is used up, so nobody has to trim hours at month end. Open **Edit project > Budget** and tick **Stop time tracking when the budget is used up**. The option only appears for Total Hours budgets, it is off by default, and anyone who can edit the project can switch it on or off. How it works: - With **monthly reset** on, each calendar month is judged on its own, using the date of the entry. A late entry for last month counts against last month's hours, never the current month's. Without monthly reset the whole life of the project is judged together. - If **Billable hours only** is on, non-billable time neither counts nor is refused. - Any save that would take the project over its hours is refused with a message such as *"Adding 2:00 would take Client retainer over its October hours budget (0:30 left)."* This covers new entries in the Day and Week views, duplicates, edits that add time, moving time into the project from **Entries**, Administrator corrections, the public API, Slack and the Keito for Chrome extension. The Entries move preview lists such rows as skipped with **Destination project has used up its hours budget**. - A timer cannot be started or restarted on a project that has no hours left. A timer that is already running always stops normally, so it can run past the budget by its own length; the next start is then refused. - Shortening an entry, deleting it, moving it to another project, marking it non-billable and stopping a timer are never refused, even when the project is already over its hours. - Imports from Harvest, CSV and connected apps are not affected, because they mirror time that has already happened. To let the team keep logging, raise the budget, untick the option, or move the extra time to a project without a stop. The project page shows **Time tracking stops when this budget is used up** while the option is on, and the public API exposes it as `stop_tracking_at_budget` on projects. ## Over-Budget Notifications Configure an alert threshold to get notified before a project goes over budget: - **Default threshold:** 80% of budget consumed - **Customizable:** Set any percentage that works for you - **Notification recipients:** Active project managers. Fee alerts require permission to view project financials, and internal-cost alerts require permission to view internal costs. If no eligible project manager exists, active workspace owners and administrators receive the alert. Keito checks the threshold each morning at 8am in the workspace timezone. The first email arrives on the first morning after the project reaches the threshold. While the project stays above the threshold, non-monthly budgets repeat at most once every seven days and monthly budgets repeat at most once per calendar month. If usage drops below the threshold, the alert resets and can fire again after a later crossing. ## Including Expenses For fee-based budgets, you can optionally include expenses in the budget calculation: - **Enabled:** Both billable hours and billable expenses count toward the budget. - **Disabled:** Only billable hours are tracked against the budget. ## Budget Visibility Control who can see budget information: - **Visible to team** — All project members can see budget progress. - **Hidden from team** — Only managers and administrators can see budget details. Administrators can also grant an individual manager **See hour budgets and budget progress for projects they manage**. This grants only aggregate hours-budget information for projects where the person is an active project manager. It shows **Budget**, **Spent**, **Progress**, and **Remaining** on both the Projects list and project detail. It does not reveal rates, costs, invoices, uninvoiced amounts, fee budgets, budget export links, or task/person budget allocations. Existing non-financial activity export behavior is unchanged. Administrators can separately grant Members or Managers **See hour budgets and team hour progress for projects they are assigned to**. This applies only to active employee or contractor assignments on project-hours, task-hours, and person-hours budgets. It includes aggregate task and teammate hours (including historical contributors needed to reconcile the total), but never rates, money, expenses, invoices, approval state, notes, or individual time entries. The older managed-project permission remains limited to projects the Manager actively manages. On the Projects list, the grant adds **Budget**, **Spent**, **Progress**, and **Remaining** for eligible assigned projects and allows a current-period row to remain visible when only a teammate recorded time. The separate **Hours** column stays personal for a Member, so teammate activity does not become a per-person time disclosure. Fee budgets, projects without an hours budget, and unassigned projects remain redacted. Team-wide budget visibility is configured per project. The manager grant is configured from **Team > person > Permissions > Project finances**. ## Monitoring Budget Progress Track budget consumption from the project detail page: - **Budget total** — The full budget amount - **Spent** — How much has been used (hours or fees) - **Remaining** — What's left - **Percentage used** — Visual progress indicator You can also see budget status across all projects from the [Budget Report](/docs/reports/budget-reports). --- ## Project Team source: https://keito.ai/docs/projects/project-team markdown: https://keito.ai/docs/projects/project-team.md llm_mode: summary Summary: Assign team members to projects to control who can track time and how they are billed. Full Markdown: https://keito.ai/docs/projects/project-team.md --- ## Tasks source: https://keito.ai/docs/projects/tasks markdown: https://keito.ai/docs/projects/tasks.md llm_mode: summary Summary: Tasks categorise the type of work being done on a project. Full Markdown: https://keito.ai/docs/projects/tasks.md --- ## Managing Clients source: https://keito.ai/docs/clients/managing-clients markdown: https://keito.ai/docs/clients/managing-clients.md llm_mode: summary Summary: Clients represent the organizations you do work for. Full Markdown: https://keito.ai/docs/clients/managing-clients.md --- ## Client Project Access source: https://keito.ai/docs/clients/client-project-access markdown: https://keito.ai/docs/clients/client-project-access.md llm_mode: summary Summary: Invite external client contacts to view selected projects without giving them internal team access. Full Markdown: https://keito.ai/docs/clients/client-project-access.md --- ## Logging Expenses source: https://keito.ai/docs/expenses/logging-expenses markdown: https://keito.ai/docs/expenses/logging-expenses.md llm_mode: full # Logging Expenses ## Creating an Expense 1. Navigate to the **Expenses** page. 2. Click **Track expenses**. 3. Enter the **Date**, **Project**, and **Category**. For a standard category, enter the **Amount**. For a unit-based category, enter the quantity in the field named for the unit, such as Miles or Pages. Add **Notes** and change the **Billable** option if needed. 4. Optionally attach a receipt (see [Receipts & Attachments](/docs/expenses/receipts)). 5. Click **Save**. ## Adding Several Expenses Choose **Save & add another** to save and keep the form open. In the same browser tab, Keito keeps the **Project**, **Category**, and **Date**; clears the amount or units, notes, and receipt; resets **Billable**; and focuses the amount or units. The same defaults return when you reopen the form. Editing an expense does not replace them, and unavailable projects or categories are not preselected. ## Standard vs Unit-Based Categories **Standard categories** use a fixed amount, such as meals or software. **Unit-based categories** calculate the total from a quantity and an administrator-defined rate, such as miles driven or pages printed. For a unit-based expense, edit the quantity instead. The **Amount** field is calculated and read-only. See [Expense Categories](/docs/expenses/expense-categories). ## Billable Expenses **Billable** expenses can appear on client invoices and in billable reports. **Non-billable** expenses are tracked internally. You can override the project's default for each expense. ## Editing and Deleting - Select an unlocked expense or use its edit button to change its details. - For a standard expense, change the **Amount** directly. For a unit-based expense, change the quantity; Keito recalculates the amount from the category rate. - Use the delete option to remove an expense. **Uninvoiced** describes the billing state; it does not guarantee that an expense is editable. A padlock means the expense itself is locked. This can happen when the expense is approved or invoiced, still carries a lock from a Harvest import, or falls in a week whose timesheet was submitted or approved. Timesheet-week locks apply only on plans that include timesheet approvals, and only while expense locking is enabled. Hover over, focus, or tap the padlock to see the reason. Do not change workspace approval or timesheet-lock settings to edit one expense, because those settings affect the team's wider workflow. If a padlock is unexpected, contact support with the expense date and category so the lock can be checked. ### Imported expenses that are still locked A Harvest import keeps the lock an expense had in Harvest. When the padlock says an expense is still locked from your Harvest import, an owner or administrator can release it: 1. Go to **Entries** and open **Expenses**. 2. Select the imported expenses. 3. Choose **Actions** > **Unlock imported expenses**. 4. Review which expenses will be unlocked and which will be skipped, enter a reason, acknowledge the change, and confirm. Unlocking changes only the lock. The amount, project, category, and invoice status stay the same, and the change is recorded in the audit log. Expenses marked as invoiced are skipped; if one needs to change, use **Mark selected as uninvoiced** first, then unlock it. ## Expense Approval When Approvals is enabled, submit logged expenses for manager approval or rejection. Approved expenses are locked and available for invoicing. ## Filtering Filter by date range, project, client, category, billable status, or approval status. Managers and administrators can also filter by team member. --- ## Expense Categories source: https://keito.ai/docs/expenses/expense-categories markdown: https://keito.ai/docs/expenses/expense-categories.md llm_mode: summary Summary: Expense categories help you organise and classify different types of expenses across your projects. Full Markdown: https://keito.ai/docs/expenses/expense-categories.md --- ## Receipts & Attachments source: https://keito.ai/docs/expenses/receipts markdown: https://keito.ai/docs/expenses/receipts.md llm_mode: link Linked reference: Attach receipt images or documents to your expenses for record-keeping and client billing. Read this page when you need the full details: https://keito.ai/docs/expenses/receipts.md --- ## LLM Usage Expenses source: https://keito.ai/docs/expenses/llm-usage markdown: https://keito.ai/docs/expenses/llm-usage.md llm_mode: full # LLM Usage Expenses Keito includes a built-in "LLM Usage" expense category for tracking the cost of AI model usage. This category is automatically created in every workspace. ## How It Works LLM usage expenses use the unit-based expense model: quantity (tokens in thousands) × unit_price = total_cost For example: 45k tokens at £0.003/k = £0.135. The expense flows through the standard pipeline: it's allocated to a project, included in reports, and can be invoiced to clients. ## When LLM Expenses Are Created - **Automatically** — when an agent integration logs token usage via the API or SDKs. - **Manually** — you can create LLM usage expenses in the web UI like any other expense. The current Keito CLI tracks time only. Use the API, Node SDK, Python SDK, or web app for LLM usage expenses. ## What's Captured | Field | Description | |---|---| | `project_id` | The project the tokens were used for | | `quantity` | Token count (typically in thousands) | | `unit_price` | Cost per unit | | `total_cost` | Calculated total | | `notes` | Model name, context (e.g., "claude-opus-4-6: 25k input + 15k output") | | `metadata` | Structured token breakdown, session ID | ## Viewing LLM Costs 1. Go to **Expenses** and filter by category → "LLM Usage". 2. Use the source filter to see only agent-created expenses. 3. In **Reports → Expense Reports**, group by category to see total LLM spend across projects. ## Invoicing LLM Costs LLM expenses can be included on client invoices as a separate line item or grouped with other project expenses. See [Invoicing Agent Work](/docs/invoicing/agent-work) for details. --- ## Creating Invoices source: https://keito.ai/docs/invoicing/creating-invoices markdown: https://keito.ai/docs/invoicing/creating-invoices.md llm_mode: full # Creating Invoices Generate professional invoices from tracked time and expenses, or create free-form invoices with manual line items. ## Invoice Types ### From Time & Expenses Create invoices pre-populated with billable hours and expenses from your projects: 1. Go to **Invoices** and click **New Invoice**. 2. Select a **Client**. 3. Choose **Import from Time & Expenses**. 4. Select the project(s) and date range to include. 5. Choose how to group line items: - **By Project** — One line item per project - **By Task** — Grouped by task across projects - **By Person** — Grouped by team member - **Detailed** — Individual time entries as separate line items 6. Review and adjust the generated line items. 7. Save as draft or send. When you create an invoice from tracked time, those entries are marked as "billed" and won't appear in future import selections. ### Including documented work before approval By default, invoice creation only includes approved billable time and expenses. Administrators can opt in to including documented billable work before approval from **Invoices > Configure > Default Values**. When enabled, unsubmitted, submitted, and approved billable time and expenses are available for invoicing. Rejected items, running timers, and already billed items are excluded. The invoice flow still shows a pending-work banner so you can see which included items have not been submitted or approved yet. See [Documented Work Before Approval](/docs/invoicing/documented-work-before-approval) for details. ### Free-Form Invoices Create invoices with custom line items unrelated to tracked time: 1. Go to **Invoices** and click **New Invoice**. 2. Select a **Client**. 3. Add line items manually with descriptions, quantities, and unit prices. 4. Save or send. ### Zero-total invoices You can issue an ordinary invoice totaling exactly zero for pro bono work, a full discount, or an appropriate reconciliation. It shows **Paid** with nothing due without creating a payment record. See [Zero-Total Invoices](/docs/invoicing/zero-total-invoices) for the workflow, retainer boundaries, and accounting-copy limits. ## Invoice Details Every invoice includes: - **Invoice number** — Auto-generated using the workspace sequence or, when explicitly enabled, the selected client's annual sequence (for example, `2026-120-01`). Leave **Invoice ID** blank to use automatic numbering. A displayed expected ID is a preview until the draft is created. - **Client** — Who's being billed - **Issue date** — The date shown on the invoice. In client/year numbering mode, its calendar year determines which annual sequence is used. - **Due date** — When payment is expected (based on payment terms) - **Service period** — Optional start and end dates describing when the invoiced work was delivered - **Payment terms** — Upon Receipt, Net 15, Net 30, Net 45, Net 60, or Custom - **Subject** — Optional title or reference - **Purchase order** — Optional PO number for client reference ### Service period For invoices created from time and expenses, Keito suggests the service period from the earliest and latest dated items included. You can edit the dates or clear both fields to omit the service period from that invoice. Administrators can also hide service periods across invoice PDFs, public invoice links, and printouts under **Invoices > Configure > Appearance**. This global setting preserves any dates already saved on invoices. See [Invoice Settings](/docs/invoicing/invoice-settings#service-periods). ## Line Items Each line item on an invoice has: - **Type** — Service, Product, or Expense - **Description** — What's being billed - **Quantity** — Number of units (e.g., hours) - **Unit price** — Rate per unit - **Amount** — Automatically calculated (quantity × unit price) - **Tax flags** — Whether each tax rate applies to this item - **Project** — Optional project association ## Taxes and Discounts Configure up to two tax rates and an optional discount: - **Tax 1** — First tax rate (e.g., GST at 10%) - **Tax 2** — Second tax rate (e.g., State tax at 5%) - **Discount** — Percentage off the subtotal Each line item can individually opt in or out of each tax. ## Invoice States | State | Description | |-------|-------------| | Draft | Work in progress, not yet sent to client | | Open | Sent to client, awaiting payment | | Paid | Settled: fully paid, or issued with a zero total and nothing due | | Closed | Written off or cancelled | ## Saving and Editing - **Draft invoices** can be freely edited, reordered, and adjusted. - **Open invoices** cannot be edited directly. Revert an eligible unpaid invoice to draft before making changes. - **Paid and Closed invoices** are locked from editing. ## Next Steps - [Correct recorded time already included in a draft invoice](/docs/invoicing/correcting-time-on-draft-invoices) - [Find current and historical invoices](/docs/invoicing/finding-filtering-invoices) - [Automate invoices with a recurring schedule](/docs/invoicing/recurring-invoices) - [Send your invoice to the client](/docs/invoicing/sending-invoices) - [Cancel or delete invoices](/docs/invoicing/cancel-delete-invoices) - [Record payments](/docs/invoicing/payments) - [Configure invoice settings](/docs/invoicing/invoice-settings) --- ## Correcting Time on Draft Invoices source: https://keito.ai/docs/invoicing/correcting-time-on-draft-invoices markdown: https://keito.ai/docs/invoicing/correcting-time-on-draft-invoices.md llm_mode: summary Summary: Find the workspace setting, prepare an older draft, and review how corrections to recorded time affect invoice lines and totals. Full Markdown: https://keito.ai/docs/invoicing/correcting-time-on-draft-invoices.md --- ## Find and Filter Invoices source: https://keito.ai/docs/invoicing/finding-filtering-invoices markdown: https://keito.ai/docs/invoicing/finding-filtering-invoices.md llm_mode: summary Summary: Find current or historical invoices with status filters, search, client filters, sorting, and pagination. Full Markdown: https://keito.ai/docs/invoicing/finding-filtering-invoices.md --- ## Documented Work Before Approval source: https://keito.ai/docs/invoicing/documented-work-before-approval markdown: https://keito.ai/docs/invoicing/documented-work-before-approval.md llm_mode: summary Summary: Allow invoices and uninvoiced reports to include documented billable time and expenses before manager approval. Full Markdown: https://keito.ai/docs/invoicing/documented-work-before-approval.md --- ## Sending Invoices source: https://keito.ai/docs/invoicing/sending-invoices markdown: https://keito.ai/docs/invoicing/sending-invoices.md llm_mode: full # Sending Invoices Deliver invoices to your clients via email directly from Keito. ## Sending an Invoice 1. Open a draft or open invoice. 2. Click **Send Invoice**. 3. Configure the email: - **To** — Client's email address (pre-filled from client contact) - **Subject** — Email subject line (uses your template or custom text) - **Body** — The email message (uses your template or custom text) - **CC sender** — Optionally send a copy to yourself - **Attach PDF** — Include the invoice as a PDF attachment 4. Click **Send**. The invoice state changes from Draft to Open when first sent if payment is due. An ordinary invoice with an exact-zero total and zero due is issued as **Paid**, without creating a payment record. You can also use **Mark as sent** to issue it without emailing the client. See [Zero-Total Invoices](/docs/invoicing/zero-total-invoices). ## Sending Recurring Invoices Recurring invoices can be generated as drafts or in the Open/sent state. The recurring **Automatically send** action does not currently dispatch an email to a client contact. Open the generated invoice and use **Send Invoice** when recipient delivery is required. See [Recurring Invoices](/docs/invoicing/recurring-invoices) for schedules, template types, billing periods, and reminders. ## Email Templates Keito provides customizable templates for invoice communications. See [Invoice Messages and Reminders](/docs/invoicing/invoice-messages). ### Invoice Sent The initial email when sending an invoice to a client. ### Payment Reminder A follow-up email for overdue invoices. Send reminders manually when payment is late. ### Thank You An optional message to send after receiving payment. Shows appreciation and confirms the payment was recorded. ## Customizing Messages You can edit the subject and body for a specific invoice before sending. ## Resending Invoices Need to resend an invoice? Open the invoice and click **Send** again. You can adjust the message before resending — useful for adding a personal note or reminder. ## Client Invoice Portal Each invoice has a unique URL that clients can access to view their invoice online. This link is included in the email and allows clients to: - View the full invoice details - See the amount due - Access online payment options (if configured) ## Tips - Set up your email templates once in Settings, then sending becomes a one-click process. - Use the CC option to keep a copy in your inbox for your records. - Send invoices promptly — the sooner you invoice, the sooner you get paid. --- ## Tracking Payments source: https://keito.ai/docs/invoicing/payments markdown: https://keito.ai/docs/invoicing/payments.md llm_mode: summary Summary: Record payments against invoices to track what has been paid and what is outstanding. Full Markdown: https://keito.ai/docs/invoicing/payments.md --- ## Invoicing Agent Work source: https://keito.ai/docs/invoicing/agent-work markdown: https://keito.ai/docs/invoicing/agent-work.md llm_mode: full # Invoicing Agent Work Agent time and LLM expenses appear on invoices alongside human work. This page explains how to present agent work to clients clearly and professionally. ## How Agent Work Appears on Invoices When creating an invoice from tracked time and expenses: - **Agent time entries** are included like any other time entry. They show the agent's name, hours, rate, and project/task. - **LLM expenses** appear as a line item under the "LLM Usage" category with quantity, unit price, and total. ### Example Invoice Line Items | Description | Hours/Units | Rate | Amount | |---|---|---|---| | Sarah Chen — Backend development | 12.0 hrs | £150/hr | £1,800 | | review-bot-01 — Code review (Agent) | 6.0 hrs | £75/hr | £450 | | LLM Usage — claude-opus-4-6 tokens | 180k tokens | £0.003/k | £0.54 | ## Grouping Options When creating invoices, you can group line items by: - **Project** — all human and agent work under one project heading - **Team member** — agent users appear as separate line items - **Task** — human and agent contributions to the same task grouped together ## Setting Agent Rates Agent users have their own billable rates, set in [Managing Agent Users](/docs/team-management/agent-users). Common approaches: - **Discounted rate** — agents billed at a lower rate than humans (e.g., £75/hr vs £150/hr) - **Cost-plus** — LLM costs passed through plus a margin - **Blended rate** — one rate that covers both human oversight and agent execution ## Tips - Include a brief note on invoices explaining what agent work is. Many clients are seeing this for the first time. - Use the notes field on agent time entries to describe what was done in plain language. - Consider a separate line item for LLM costs so clients can see the infrastructure cost vs. the service cost. --- ## Invoice Settings source: https://keito.ai/docs/invoicing/invoice-settings markdown: https://keito.ai/docs/invoicing/invoice-settings.md llm_mode: summary Summary: Configure invoice defaults, document appearance, service periods, payment wording, numbering, and email templates. Full Markdown: https://keito.ai/docs/invoicing/invoice-settings.md --- ## Canceling and Deleting Invoices source: https://keito.ai/docs/invoicing/cancel-delete-invoices markdown: https://keito.ai/docs/invoicing/cancel-delete-invoices.md llm_mode: summary Summary: Understand when invoices can be closed, voided, reverted, deleted, or released for reinvoicing. Full Markdown: https://keito.ai/docs/invoicing/cancel-delete-invoices.md --- # Developer and API Reference Primary API concepts, authentication, endpoint behaviour, and error handling. --- ## Introduction source: https://keito.ai/docs/developer/introduction markdown: https://keito.ai/docs/developer/introduction.md llm_mode: full # Introduction Keito's API lets you track time, log expenses, and manage projects programmatically. The most common use case: connecting AI agents so they can log their own work — just like a human team member. Looking to install rather than build? Start with [Integrations](/docs/integrations), including the [Keito CLI](/docs/integrations/cli) and [Agent Skill](/docs/integrations/skills). ## Why Integrate? - **Agent accountability** — every hour of agent work is tracked, approved, and invoiced. - **LLM cost allocation** — token costs are assigned to projects and passed through to clients. - **Unified reporting** — one dashboard for human and agent productivity. ## Integration Options | Method | Best for | Language | |---|---|---| | **REST API** | Any language, direct HTTP calls | Any | | **Node SDK** | TypeScript/JavaScript apps, agent orchestration | TypeScript/JS | | **Python SDK** | Python agents, LangChain, CrewAI, notebooks | Python | | **CLI** | Terminal workflows, scripts, CI/CD pipelines, agent hooks | Shell | | **Agent Skill** | Codex and Claude Code local session tracking | Shell + Skill | | **GitHub Action** | Repository events, labels, slash commands, PR activity | YAML | ## Core Concepts ### Sources Every time entry and expense has a `source` field: - `web` — created in the Keito web app - `cli` — created via the Keito CLI - `api` — created via a direct REST API call - `agent` — created by an AI agent - `calendar` — created by a calendar integration for time entries - `desktop` — created by the Keito desktop app for time entries ### Metadata Agent entries include a `metadata` JSON object with structured context: ```json { "agent_id": "review-bot-01", "agent_type": "claude-code", "session_id": "550e8400-e29b-41d4-a716-446655440000", "model": "claude-opus-4-6" } ``` Metadata is indexed, filterable, and visible in reports. Maximum size: 4KB. ### User Types Users are either `human` or `agent`. Agent users have API keys, rates, and project assignments — but they don't log into the web UI. ## Next Steps - [Quickstart](/docs/developer/quickstart) — create your first agent time entry in under 5 minutes. - [GitHub Action](/docs/developer/github-action) — log time from GitHub issues, PRs, comments, and commits. - [Integrations](/docs/integrations) — install the CLI or Agent Skill. - [Authentication](/docs/auth/api-keys) — get your API key. - [REST API Reference](/docs/api-reference/overview) — full endpoint documentation. --- ## Quickstart source: https://keito.ai/docs/developer/quickstart markdown: https://keito.ai/docs/developer/quickstart.md llm_mode: full # Quickstart Create your first time entry with Keito API v2. ## Prerequisites - A Keito company. - A full-access integration key from **Settings -> API & Developers**. A workspace Administrator must create this separate key and bind it to the human or Agent identity that will make the requests. - The Company ID shown in **Settings -> API & Developers -> Company ID**. - A project ID and a task assigned to that project. Use `/api/v2/projects`, then `/api/v2/tasks?project_id=`, to discover them. The **Personal read-only sync key** cannot be used for this quickstart. Its fixed seven-endpoint allowlist does not include `/api/v2/tasks` or any write operation, and its `/api/v2/users/me` response intentionally omits `company`. There is no setting that upgrades that key; ask a workspace Administrator to create a separate full-access integration key. See [Personal Read-Only Sync Keys](/docs/auth/personal-read-only-sync) for its supported operations. ## Step 1: Export Credentials ```bash export KEITO_API_KEY="kto_xxxxx" export KEITO_ACCOUNT_ID="your_company_id" ``` `KEITO_ACCOUNT_ID` is sent as the `Keito-Account-Id` header. ## Step 2: Verify Authentication ```bash curl "https://app.keito.ai/api/v2/users/me" \ -H "Authorization: Bearer $KEITO_API_KEY" \ -H "Keito-Account-Id: $KEITO_ACCOUNT_ID" ``` With a full-access integration key, the response includes your user profile and the resolved company. ## Step 3: Discover Projects and Tasks ```bash curl "https://app.keito.ai/api/v2/projects?is_active=true&per_page=100" \ -H "Authorization: Bearer $KEITO_API_KEY" \ -H "Keito-Account-Id: $KEITO_ACCOUNT_ID" export KEITO_PROJECT_ID="project_id_from_the_projects_response" curl "https://app.keito.ai/api/v2/tasks?project_id=$KEITO_PROJECT_ID&is_active=true&per_page=100" \ -H "Authorization: Bearer $KEITO_API_KEY" \ -H "Keito-Account-Id: $KEITO_ACCOUNT_ID" ``` Task definitions can be reused across the workspace, but Keito validates that the selected task is assigned to the selected project. Always discover tasks with project context before creating a time entry. ## Step 4: Create a Time Entry ```bash curl -X POST "https://app.keito.ai/api/v2/time_entries" \ -H "Authorization: Bearer $KEITO_API_KEY" \ -H "Keito-Account-Id: $KEITO_ACCOUNT_ID" \ -H "Content-Type: application/json" \ -d '{ "project_id": "project_id_here", "task_id": "task_id_here", "spent_date": "2026-05-05", "hours": 1.5, "notes": "Implemented OAuth flow", "source": "api", "metadata": { "session_id": "550e8400-e29b-41d4-a716-446655440000" } }' ``` ## CLI Alternative The Keito CLI handles the API calls for you: ```bash keito auth login keito projects list --json keito projects tasks "Acme Website" --json keito time log --project "Acme Website" --task "Development" \ --duration 1:30 \ --date 2026-05-05 \ --notes "Implemented OAuth flow" ``` For non-interactive environments, set `KEITO_API_KEY` and `KEITO_ACCOUNT_ID` instead of running `keito auth login`. ## Log an LLM Expense The API supports expense creation through `/api/v2/expenses`. The current CLI tracks time only, so use the API or web app for LLM cost expenses. ```bash curl -X POST "https://app.keito.ai/api/v2/expenses" \ -H "Authorization: Bearer $KEITO_API_KEY" \ -H "Keito-Account-Id: $KEITO_ACCOUNT_ID" \ -H "Content-Type: application/json" \ -d '{ "project_id": "project_id_here", "expense_category_id": "llm_usage_category_id", "spent_date": "2026-05-05", "total_cost": 0.135, "notes": "LLM usage for implementation session", "source": "agent", "metadata": { "model": "claude-opus-4-6", "input_tokens": 30000, "output_tokens": 15000 } }' ``` ## What's Next? - [Authentication](/docs/auth/api-keys) - create API keys and find your Company ID. - [Time Entries API](/docs/api-reference/time-entries) - create, update, stop, and delete time entries. - [GitHub Action](/docs/developer/github-action) - log time from GitHub issues, PRs, comments, and commits. - [CLI Guide](/docs/cli/getting-started) - install and configure the CLI. --- ## GitHub Action source: https://keito.ai/docs/developer/github-action markdown: https://keito.ai/docs/developer/github-action.md llm_mode: summary Summary: Use the Keito GitHub Action to log billable time from GitHub issues, pull requests, comments, reviews, and commits. Full Markdown: https://keito.ai/docs/developer/github-action.md --- ## Concepts source: https://keito.ai/docs/developer/concepts markdown: https://keito.ai/docs/developer/concepts.md llm_mode: full # Concepts Key concepts for working with the Keito API. ## Time Entries A time entry records work done by a human or agent. Key fields: | Field | Type | Description | |---|---|---| | `id` | string | Unique identifier | | `project_id` | string | The project this work is for | | `task_id` | string | The task within the project (optional) | | `user_id` | string | The human or agent user | | `spent_date` | string | Date the work was performed (YYYY-MM-DD) | | `hours` | number | Duration in decimal hours | | `notes` | string | Description of work done | | `is_running` | boolean | Whether a timer is currently active | | `is_billable` | boolean | Whether this entry is billable | | `source` | string | Origin: `web`, `cli`, `api`, `agent`, `calendar`, `desktop` | | `metadata` | object | Agent context (JSON, max 4KB) | ## Expenses An expense records a cost against a project. For agent work, this is typically LLM token usage. | Field | Type | Description | |---|---|---| | `id` | string | Unique identifier | | `project_id` | string | The project this cost is for | | `expense_category_id` | string | Category (e.g., "LLM Usage") | | `spent_date` | string | Date of the expense (YYYY-MM-DD) | | `units` | number | Quantity (e.g., tokens in thousands) | | `unit_price` | number | Price per unit | | `total_cost` | number | Calculated total | | `notes` | string | Description | | `source` | string | Origin: `web`, `cli`, `api`, `agent` | | `metadata` | object | Agent context (JSON, max 4KB) | ## Users | Field | Type | Description | |---|---|---| | `id` | string | Unique identifier | | `name` | string | Display name | | `email` | string | Email (agents may use placeholder) | | `user_type` | string | `human` or `agent` | | `is_active` | boolean | Whether the user is active | ## Source Values | Source | Created By | Badge Colour | |---|---|---| | `web` | Keito web app | None | | `cli` | Keito CLI | Amber | | `api` | Direct REST API call | None | | `agent` | AI agent via API or SDK | Violet | | `calendar` | Calendar import | Indigo | | `desktop` | Keito desktop app | Emerald | Time entries support all source values above. Expenses currently support `web`, `cli`, `api`, and `agent`. ## Metadata Schema The `metadata` field is a freeform JSON object (max 4KB). Recommended fields for agent entries: ```json { "agent_id": "string — unique identifier for this agent", "agent_type": "string — platform: claude-code, codex, cursor, etc.", "session_id": "string — UUID grouping related entries", "model": "string — LLM model used", "input_tokens": "number — input tokens consumed (expenses only)", "output_tokens": "number — output tokens consumed (expenses only)" } ``` Use `session_id` to correlate a time entry with its corresponding LLM expense. --- ## Partner integrations source: https://keito.ai/docs/developer/partner-integrations markdown: https://keito.ai/docs/developer/partner-integrations.md llm_mode: summary Summary: How to propose, authorise, test and support a Keito integration that serves one or many customers, and what is not available yet. Full Markdown: https://keito.ai/docs/developer/partner-integrations.md --- ## Authentication source: https://keito.ai/docs/auth/api-keys markdown: https://keito.ai/docs/auth/api-keys.md llm_mode: summary Summary: Create and use API keys with the Keito API v2, including the Company ID header, environment variables, and security practices. Full Markdown: https://keito.ai/docs/auth/api-keys.md --- ## Scopes & Permissions source: https://keito.ai/docs/auth/scopes markdown: https://keito.ai/docs/auth/scopes.md llm_mode: summary Summary: How API key permissions work, including the role-based model and project scoping for agent users. Full Markdown: https://keito.ai/docs/auth/scopes.md --- ## REST API Reference source: https://keito.ai/docs/api-reference/overview markdown: https://keito.ai/docs/api-reference/overview.md llm_mode: full # REST API Reference Base URL: ```text https://app.keito.ai/api/v2 ``` API v2 is Harvest-compatible: request and response fields use `snake_case`, dates use `YYYY-MM-DD`, and paginated collections include entity-specific array keys such as `time_entries`, `projects`, `tasks`, and `expenses`. ## Authentication API key requests require both headers: ```text Authorization: Bearer kto_xxxxx Keito-Account-Id: your_company_id ``` Find the Company ID in Keito under **Settings -> API & Developers -> Company ID**. Credential type controls endpoint access. A personal read-only sync key has a fixed seven-request allowlist, intentionally returns a reduced `/users/me` response without `company`, cannot call `/tasks`, and cannot write data. Keito CLI and write integrations require a separate, Administrator-created full-access integration key. See [Authentication](/docs/auth/api-keys). WorkOS Connect JWT requests do not need `Keito-Account-Id`; the company is resolved from token claims. ## Conventions - **Dates**: `YYYY-MM-DD` for dates. Report endpoints also accept Harvest-style `YYYYMMDD`. - **Times of day**: time-entry `started_time` and `ended_time` are `HH:mm` strings in the workspace timezone. They are not ISO timestamps. Running timers expose exact elapsed state through `timer_started_at` and calculated duration fields. - **IDs**: Keito returns database IDs such as `cm...`; do not assume IDs use short prefixes like `prj_` or `co_`. - **Pagination**: collection endpoints use `page` and `per_page`. Responses include `page`, `per_page`, `total_pages`, `total_entries`, and `links`. - **Time entry source**: `source` can be `web`, `cli`, `api`, `agent`, `calendar`, or `desktop`. - **Expense source**: expense `source` can be `web`, `cli`, `api`, or `agent`. - **Metadata**: `metadata` must be a JSON object and is limited to 4KB. - **Capabilities**: API responses include `X-Keito-Features`. Clients can use this header to detect capabilities such as `project-task-budgets`, `project-assignments-v1`, `time-approvals-v1`, `financial-reports-v1`, `timer-stop`, `timer-restart`, `invoice-line-item-edit`, `invoice-payments`, and `invoice-pdf`. - **Concurrency**: client and project item reads return `ETag`. Send it as `If-Match` on later mutations; permanent deletion requires it. - **Idempotency**: client and project mutations and invoice payment creation accept `Idempotency-Key` for safe retries. Keys are authorization-bound and retained for 24 hours. - **Caching**: credential-dependent API responses are `private, no-store` and vary by authorization and account headers. ## Endpoints | Method | Endpoint | Description | |---|---|---| | `GET` | `/api/v2/users/me` | Current identity; response shape depends on credential type | | `GET` | `/api/v2/projects` | List projects | | `POST` | `/api/v2/projects` | Create a project | | `GET` | `/api/v2/projects/:id` | Get a visible project | | `PATCH` | `/api/v2/projects/:id` | Update, archive, or restore a project | | `DELETE` | `/api/v2/projects/:id` | Permanently delete an archived project (Owner/Administrator only) | | `GET` | `/api/v2/tasks` | List task definitions or tasks assigned to `project_id`; unavailable to personal sync keys | | `GET` `POST` `PATCH` `DELETE` | `/api/v2/projects/:id/user_assignments` | Manage a project's team ([details](/docs/api-reference/projects#project-team-user-assignments)) | | `GET` `POST` `PATCH` `DELETE` | `/api/v2/projects/:id/task_assignments` | Manage a project's tasks, task budgets, and rates ([details](/docs/api-reference/projects#project-task-assignments)) | | `GET` | `/api/v2/time_entries` | List time entries | | `POST` | `/api/v2/time_entries` | Create a time entry | | `PATCH` | `/api/v2/time_entries/:id` | Update a time entry | | `PATCH` | `/api/v2/time_entries/:id/stop` | Stop a running time entry | | `PATCH` | `/api/v2/time_entries/:id/restart` | Restart a stopped time entry | | `DELETE` | `/api/v2/time_entries/:id` | Delete a time entry | | `DELETE` | `/api/v2/time_entries/:id/external_reference` | Remove a time entry's external reference | | `POST` | `/api/v2/approvals/submit` | Submit your own time for approval | | `POST` | `/api/v2/approvals/approve` | Approve a person's submitted time and expenses | | `POST` | `/api/v2/approvals/reject` | Reject a person's submitted time and expenses | | `GET` | `/api/v2/expenses` | List expenses | | `POST` | `/api/v2/expenses` | Create an expense | | `GET` | `/api/v2/clients` | List clients | | `POST` | `/api/v2/clients` | Create a client | | `GET` | `/api/v2/clients/:id` | Get a client | | `PATCH` | `/api/v2/clients/:id` | Update, archive, or restore a client | | `DELETE` | `/api/v2/clients/:id` | Permanently delete an archived client (Owner/Administrator only) | | `GET` | `/api/v2/contacts` | List contacts | | `POST` | `/api/v2/contacts` | Create a contact | | `GET` | `/api/v2/invoices` | List invoices | | `POST` | `/api/v2/invoices` | Create an invoice, optionally from tracked time and expenses | | `GET` | `/api/v2/invoices/:id` | Get an invoice | | `PATCH` | `/api/v2/invoices/:id` | Update a draft invoice and existing line items | | `DELETE` | `/api/v2/invoices/:id` | Delete a draft invoice | | `POST` | `/api/v2/invoices/:id/payments` | Record a partial or full invoice payment | | `GET` | `/api/v2/invoices/:id/pdf` | Download the rendered invoice PDF | | `GET` | `/api/v2/invoices/:id/messages` | List invoice send history | | `POST` | `/api/v2/invoices/:id/messages` | Send, resend, or mark an invoice as sent; send reminders and thank-yous | | `GET` | `/api/v2/reports/project_budget` | Harvest-compatible project budget report | | `GET` | `/api/v2/reports/uninvoiced` | Harvest-compatible date-filtered uninvoiced report | | `GET` | `/api/v2/reports/time/team` | Team time report | See the [Clients API](/docs/api-reference/clients), [Projects API](/docs/api-reference/projects), [Timesheet Approvals API](/docs/api-reference/approvals), [Invoices API](/docs/api-reference/invoices), and [Reports API](/docs/api-reference/reports) for endpoint contracts and safe examples. ## Common Query Parameters | Parameter | Type | Description | |---|---|---| | `page` | number | Page number, starting at `1` | | `per_page` | number | Results per page, default `100`, max `2000` | | `source` | string | Filter by source. Time entries support `web`, `cli`, `api`, `agent`, `calendar`, and `desktop`; expenses support `web`, `cli`, `api`, and `agent`. | | `project_id` | string | Filter by project | | `task_id` | string | Filter by task | | `user_id` | string | Filter by user | | `client_id` | string | Filter by client | | `invoice_id` | string | Filter time entries or expenses linked to a Keito invoice; unavailable to personal sync keys. See [Time Entries](/docs/api-reference/time-entries#invoice-linkage) and [Expenses](/docs/api-reference/expenses#invoice-linkage). | | `from` | string | Start date | | `to` | string | End date | | `updated_since` | string | ISO timestamp lower bound | ## Example ```bash curl "https://app.keito.ai/api/v2/time_entries?from=2026-05-01&to=2026-05-31" \ -H "Authorization: Bearer kto_xxxxx" \ -H "Keito-Account-Id: your_company_id" ``` --- ## Time Entries API source: https://keito.ai/docs/api-reference/time-entries markdown: https://keito.ai/docs/api-reference/time-entries.md llm_mode: summary Summary: Create, list, update, stop, restart, and delete time entries via the Keito API v2. Full Markdown: https://keito.ai/docs/api-reference/time-entries.md --- ## Expenses API source: https://keito.ai/docs/api-reference/expenses markdown: https://keito.ai/docs/api-reference/expenses.md llm_mode: full # Expenses API ## Create an Expense `POST /api/v2/expenses` Creates a project expense. For LLM cost tracking, use the "LLM Usage" expense category from your company. ### Request Body | Field | Type | Required | Description | |---|---|---|---| | `project_id` | string | Yes | Project ID | | `expense_category_id` | string | Yes | Expense category ID | | `spent_date` | string | Yes | Date of expense (`YYYY-MM-DD`) | | `total_cost` | number | Yes* | Total cost amount | | `units` | number | Yes* | Quantity | | `notes` | string | No | Description | | `billable` | boolean | No | Whether the expense is billable | | `source` | string | No | `web`, `cli`, `api`, or `agent` | | `metadata` | object | No | JSON object, max 4KB | *Provide either `total_cost` or `units`. ### Example Request ```bash curl -X POST https://app.keito.ai/api/v2/expenses \ -H "Authorization: Bearer kto_xxxxx" \ -H "Keito-Account-Id: your_company_id" \ -H "Content-Type: application/json" \ -d '{ "project_id": "project_id_here", "expense_category_id": "category_id_here", "spent_date": "2026-05-05", "total_cost": 0.135, "notes": "LLM usage for review session", "source": "agent", "metadata": { "session_id": "550e8400-e29b-41d4-a716-446655440000", "model": "claude-opus-4-6", "input_tokens": 30000, "output_tokens": 15000 } }' ``` ## List Expenses `GET /api/v2/expenses` Returns a paginated list of expenses. ### Query Parameters | Parameter | Type | Description | |---|---|---| | `page` | number | Page number | | `per_page` | number | Results per page | | `source` | string | Filter by source | | `project_id` | string | Filter by project | | `client_id` | string | Filter by client | | `user_id` | string | Filter by user | | `from` | string | Start date, inclusive | | `to` | string | End date, inclusive | | `is_billed` | boolean | Filter billed status | | `invoice_id` | string | Filter expenses linked to a Keito invoice ID | | `updated_since` | string | ISO timestamp lower bound | ### Example Request ```bash curl "https://app.keito.ai/api/v2/expenses?source=agent&from=2026-05-01" \ -H "Authorization: Bearer kto_xxxxx" \ -H "Keito-Account-Id: your_company_id" ``` ### Invoice Linkage Expense responses include the read-only `invoice_id` field: | Field | Type | Description | |---|---|---| | `invoice_id` | string or null | The Keito invoice ID linked to the expense, or `null` when no Keito invoice link exists | The link covers expenses attached directly to an invoice line and expenses included in a grouped invoice line. It is a Keito invoice ID, never a Harvest invoice ID or an invoice number. Use it with [the Invoices API](/docs/api-reference/invoices) when your credential has permission to read that invoice. `is_billed: true` does not guarantee an invoice link. Expenses marked billed manually or imported as billed without a Keito invoice link return `invoice_id: null`. Do not infer an invoice from billed status. To list an invoice's linked expenses, pass its ID: ```bash curl "https://app.keito.ai/api/v2/expenses?invoice_id=invoice_id_here" \ -H "Authorization: Bearer kto_xxxxx" \ -H "Keito-Account-Id: your_company_id" ``` The filter combines with existing filters and pagination and only narrows expenses your credential can already read. Do not send `invoice_id` in POST or PATCH requests; invoice linkage is managed through the invoice workflow. [Personal read-only sync keys](/docs/auth/personal-read-only-sync) cannot call the Expenses API. --- ## Clients API source: https://keito.ai/docs/api-reference/clients markdown: https://keito.ai/docs/api-reference/clients.md llm_mode: summary Summary: List, read, create, update, archive, restore, and safely delete clients with Keito API v2. Full Markdown: https://keito.ai/docs/api-reference/clients.md --- ## Projects API source: https://keito.ai/docs/api-reference/projects markdown: https://keito.ai/docs/api-reference/projects.md llm_mode: summary Summary: List, read, create, update, archive, restore, and safely delete projects with Keito API v2. Full Markdown: https://keito.ai/docs/api-reference/projects.md --- ## Invoices API source: https://keito.ai/docs/api-reference/invoices markdown: https://keito.ai/docs/api-reference/invoices.md llm_mode: summary Summary: Poll, create, update, issue, export, and record payments against invoices with Keito API v2. Full Markdown: https://keito.ai/docs/api-reference/invoices.md --- ## Reports API source: https://keito.ai/docs/api-reference/reports markdown: https://keito.ai/docs/api-reference/reports.md llm_mode: summary Summary: Read Harvest-compatible project budget and uninvoiced reports with Keito API v2. Full Markdown: https://keito.ai/docs/api-reference/reports.md --- ## Users API source: https://keito.ai/docs/api-reference/users markdown: https://keito.ai/docs/api-reference/users.md llm_mode: summary Summary: Read workspace users, reporting roles, and manager relationships with Keito API v2. Full Markdown: https://keito.ai/docs/api-reference/users.md --- ## Error Handling source: https://keito.ai/docs/api-reference/error-handling markdown: https://keito.ai/docs/api-reference/error-handling.md llm_mode: full # Error Handling Keito API v2 returns Harvest-compatible error bodies: ```json { "error": "bad request", "error_description": "Missing Keito-Account-Id header" } ``` ## HTTP Status Codes | Code | Meaning | Common Cause | |---|---|---| | 400 | Bad Request | Missing `Keito-Account-Id`, missing required field, invalid value | | 401 | Unauthorized | Missing or invalid API key | | 403 | Forbidden | User lacks permission for the company or resource | | 404 | Not Found | Resource does not exist, is outside the company, or is not visible to the bound identity | | 409 | Conflict | Conflict such as starting a timer while another timer is running, restarting a timer without `replace_running`, or deleting an approved time entry | | 412 | Precondition Failed | `If-Match` is stale | | 413 | Payload Too Large | Client or project JSON body exceeds 128 KiB | | 415 | Unsupported Media Type | Body is not uncompressed UTF-8 JSON | | 428 | Precondition Required | A required `If-Match` header is missing | | 429 | Too Many Requests | Rate limit exceeded | | 500 | Internal Server Error | Server-side error | ## Retry Strategy Do not retry validation, authorization, or conflict errors unchanged. For `429` responses, wait before retrying. For `5xx` responses, use exponential backoff starting at 1 second. ### Running Timer Conflict Starting or restarting a running timer returns `409 Conflict` when another timer is already active and `replace_running` was not supplied: ```json { "error": "running_timer_conflict", "error_description": "A timer is already running.", "message": "A timer is already running.", "running_entry": { "id": "running_time_entry_id" }, "running_entry_count": 1 } ``` Resolve this by showing the active timer, stopping it, or retrying the start/restart with `replace_running: true` when the user or integration explicitly wants to switch timers. The Keito CLI retries transient network and server errors automatically. Client errors are returned immediately with a deterministic exit code. --- # CLI and SDKs Command-line and SDK workflows. Long command/type references are linked instead of inlined. --- ## CLI: Getting Started source: https://keito.ai/docs/cli/getting-started markdown: https://keito.ai/docs/cli/getting-started.md llm_mode: full # CLI: Getting Started The Keito CLI tracks billable time against the production Keito API v2 from a terminal, script, CI job, or agent workflow. Production API base URL: `https://app.keito.ai` ## Install ### Homebrew ```bash brew install osodevops/tap/keito ``` ### GitHub Releases Download a binary or installer from the [keito-cli releases](https://github.com/osodevops/keito-cli/releases). ### Build from Source ```bash git clone https://github.com/osodevops/keito-cli.git cd keito-cli cargo build --release ``` The binary is written to `target/release/keito`. ## Authenticate Ask a workspace Administrator to create a full-access integration key bound to your human or Agent identity, then copy the key and Company ID from **Settings > API & Developers** in Keito. Do not use the **Personal read-only sync key**. It cannot access tracking tasks or write time entries, and it cannot be upgraded to full access. ```bash keito auth login ``` The login command prompts for: | Prompt | Value | |---|---| | API key | A full-access `kto_...` integration key | | Account/company ID | The Company ID from Keito | `keito auth login` validates the key against the production API and saves credentials in the local config file. The CLI does not use the macOS Keychain or a system keyring. | OS | Config path | |---|---| | macOS | `~/Library/Application Support/keito/config.toml` | | Linux | `~/.config/keito/config.toml` | | Windows | `%APPDATA%\keito\config.toml` | For agents and CI, prefer environment variables so the command can run without prompts: ```bash export KEITO_API_KEY="kto_xxxxx" export KEITO_ACCOUNT_ID="your_company_id" ``` ## Verify Credentials ```bash keito auth status keito auth whoami ``` Use JSON output when another tool or agent needs to consume the result: ```bash keito auth status --json ``` ## Discover Projects and Tasks ```bash keito projects list keito projects tasks "Acme Website" ``` Projects can be referenced by ID, name, or code. Task definitions can be reused across the workspace, but time entries must use a task assigned to the selected project. Pass the project to `keito projects tasks` before choosing a task. ## Track Time ```bash # Start a running timer keito time start --project "Acme Website" --task "Development" # Check the active timer keito time running # Stop and save elapsed time keito time stop --notes "Implemented OAuth flow" ``` For work that already happened, log a completed entry: ```bash keito time log --project "Acme Website" --task "Development" \ --duration 1:30 \ --date 2026-05-06 \ --notes "Implemented OAuth flow" ``` ## Agent Quick Start Agents should use JSON output and deterministic exit codes: ```bash keito auth status --json keito projects list --json keito projects tasks "Acme Website" --json keito time running --json keito time start --project "Acme Website" --task "Development" --json # agent performs work keito time stop --notes "Implemented OAuth flow" --json ``` Use `keito time session-record` for completed agent sessions. It writes `source=agent` by default and uses `metadata.session_id` for idempotent updates. ```bash keito time session-record \ --project "project_id_here" \ --task "task_id_here" \ --session-id "codex-123" \ --duration-seconds 1800 \ --metadata '{"integration":"custom_agent","agent_type":"codex"}' \ --json ``` For automatic Codex and Claude Code hooks, install the [Keito Agent Skill](/docs/integrations/skills): ```bash keito skill install ``` ## Next Steps - [Authentication](/docs/cli/authentication) - credentials, config files, and environment variables. - [Projects & Tasks](/docs/cli/projects-and-tasks) - how project and task resolution works. - [Tracking Time](/docs/cli/tracking-time) - timers, manual entries, filters, and JSON output. - [Agent Workflows](/docs/cli/agent-mode) - reliable patterns for agents and scripts. - [Keito Agent Skill](/docs/integrations/skills) - automatic local session tracking. --- ## CLI: Authentication source: https://keito.ai/docs/cli/authentication markdown: https://keito.ai/docs/cli/authentication.md llm_mode: full # CLI: Authentication The Keito CLI authenticates with the production API v2 using two values: | Value | Purpose | |---|---| | `KEITO_API_KEY` or `api_key` | Sent as `Authorization: Bearer ` | | `KEITO_ACCOUNT_ID` or `account_id` | Sent as `Keito-Account-Id` | The API key must be a full-access integration key beginning with `kto_...`. A workspace Administrator creates this separate key under **Settings > API & Developers > Integration keys**, selects the member or Agent identity that will use the CLI, and chooses **All permitted operations**. The account ID is the Keito Company ID from **Settings > API & Developers > Company ID**. The **Personal read-only sync key** is not CLI-compatible. It cannot list tracking tasks or create, update, stop, or discard time entries. There is no setting that upgrades a sync key; an Administrator must create a separate full-access integration key. ## Interactive Login ```bash keito auth login ``` `auth login` prompts for the API key and account/company ID, validates them with `GET /api/v2/users/me`, and writes compatible credentials to the local config file. Keito CLI v0.1.8 and later identifies personal read-only sync keys and explains why they cannot be saved for CLI tracking. The config file is the only persisted credential store. The current CLI does not use the macOS Keychain, Linux Secret Service, or Windows Credential Manager. ## Non-Interactive Auth Use environment variables for agents, scripts, and CI jobs: ```bash export KEITO_API_KEY="kto_xxxxx" export KEITO_ACCOUNT_ID="your_company_id" ``` Environment variables take precedence over the config file, which makes them suitable for CI secrets and temporary overrides. ## Credential Resolution API key resolution order: 1. `KEITO_API_KEY` 2. `api_key` in `config.toml` Account ID resolution order: 1. `--workspace` 2. `KEITO_ACCOUNT_ID` 3. `KEITO_WORKSPACE_ID` legacy alias 4. `account_id` in `config.toml` 5. `workspace_id` in `config.toml` legacy alias ## Check Status ```bash keito auth status keito auth status --json ``` Example JSON: ```json { "authenticated": true, "api_key_source": "config file", "account_id": "company_id_here", "workspace_id": "company_id_here", "api_key_valid": true, "credential_type": "full_access", "cli_compatible": true, "can_track_time": true } ``` `auth status` exits with code `1` for missing, invalid, or non-CLI-compatible credentials. A personal read-only sync key produces an authentication error that identifies the credential type rather than a response-parsing error. ## Show Current User ```bash keito auth whoami keito auth whoami --json ``` This calls the production API and returns the identity resolved from the current credentials. Full-access responses include `company`. The reduced personal read-only sync response intentionally does not, although `auth whoami` can still render that limited identity. ## Logout ```bash keito auth logout ``` Logout removes `api_key`, `account_id`, and `workspace_id` from the config file. It does not unset environment variables in your shell or CI job. ## Security Notes - Do not commit `config.toml`. - Store `KEITO_API_KEY` in a secret manager for CI. - Use `keito auth status --json` as a preflight check before an automated workflow starts a timer. - Use a dedicated agent or service user when you want agent work to be attributed separately in Keito. --- ## CLI: Projects & Tasks source: https://keito.ai/docs/cli/projects-and-tasks markdown: https://keito.ai/docs/cli/projects-and-tasks.md llm_mode: full # CLI: Projects & Tasks Every Keito time entry needs a project and a task. The CLI can discover both and resolve friendly names into API IDs. ## List Projects ```bash keito projects list keito projects list --json keito projects list --limit 20 ``` The CLI lists active projects in the current company. In table output you see the project ID, name, code, client, billable status, and active status. Agents should prefer JSON: ```bash keito projects list --json ``` ## Show One Project ```bash keito projects show "Acme Website" keito projects show ACME keito projects show project_id_here --json ``` The project argument accepts: | Input | Example | |---|---| | Project ID | `cmo1j2iwm0016ynap3fw2pcfw` | | Project name | `Acme Website` | | Project code | `ACME` | Resolution is case-insensitive. ## List Tasks ```bash keito projects tasks "Acme Website" keito projects tasks ACME --json keito projects tasks project_id_here --limit 20 --json ``` The optional project argument accepts a project ID, name, or code. Pass it when choosing a task for time tracking: ```bash keito projects tasks --json ``` Task definitions can be reused across the workspace, but Keito validates project-task assignments and may enforce member-specific task restrictions. With a project argument, the command returns tasks that are valid for that project. Without one, it returns active workspace-level task definitions, which are not a guarantee that every task can be used with every project. ## Use IDs in Automation Humans can use names or codes: ```bash keito time start --project "Acme Website" --task "Development" ``` Agents and scripts should use IDs after discovery: ```bash keito time start \ --project "project_id_here" \ --task "task_id_here" \ --json ``` IDs avoid ambiguity when project names or task names are similar. ## Not Found Recovery If a project cannot be resolved, the CLI exits with code `4` and suggests: ```bash keito projects list --json ``` If a task cannot be resolved, the CLI exits with code `4` and suggests: ```bash keito projects tasks --json ``` --- ## CLI: Tracking Time source: https://keito.ai/docs/cli/tracking-time markdown: https://keito.ai/docs/cli/tracking-time.md llm_mode: summary Summary: Track time with Keito CLI timers, manual entries, filters, JSON output, and conflict handling. Full Markdown: https://keito.ai/docs/cli/tracking-time.md --- ## CLI: Logging Expenses source: https://keito.ai/docs/cli/logging-expenses markdown: https://keito.ai/docs/cli/logging-expenses.md llm_mode: full # CLI: Logging Expenses The current production Keito CLI tracks time only. It does not include: - `keito expense log` - `keito expense list` - automatic LLM token-cost capture Use one of these options for expenses: | Need | Use | |---|---| | Manual expense entry | Keito web app | | Scripted expense entry | [Expenses API](/docs/api-reference/expenses) | | Agent time plus LLM cost metadata | Node SDK, Python SDK, or REST API | ## Example API Request ```bash curl -X POST https://app.keito.ai/api/v2/expenses \ -H "Authorization: Bearer $KEITO_API_KEY" \ -H "Keito-Account-Id: $KEITO_ACCOUNT_ID" \ -H "Content-Type: application/json" \ -d '{ "project_id": "project_id_here", "expense_category_id": "llm_usage_category_id", "spent_date": "2026-05-06", "total_cost": 0.135, "notes": "LLM usage for implementation session", "source": "agent", "metadata": { "session_id": "550e8400-e29b-41d4-a716-446655440000", "model": "claude-opus-4-6", "input_tokens": 30000, "output_tokens": 15000 } }' ``` See [LLM Usage Expenses](/docs/expenses/llm-usage) for how these costs appear in Keito. --- ## CLI: Agent Workflows source: https://keito.ai/docs/cli/agent-mode markdown: https://keito.ai/docs/cli/agent-mode.md llm_mode: summary Summary: Use the production Keito CLI safely from agents, scripts, and terminal automation. Full Markdown: https://keito.ai/docs/cli/agent-mode.md --- ## CLI: CI Integration source: https://keito.ai/docs/cli/ci-integration markdown: https://keito.ai/docs/cli/ci-integration.md llm_mode: summary Summary: Use the Keito CLI in GitHub Actions, GitLab CI, and other CI systems to track automated work. Full Markdown: https://keito.ai/docs/cli/ci-integration.md --- ## CLI: Configuration source: https://keito.ai/docs/cli/configuration markdown: https://keito.ai/docs/cli/configuration.md llm_mode: summary Summary: Configure the Keito CLI with config files, environment variables, account overrides, and JSON output. Full Markdown: https://keito.ai/docs/cli/configuration.md --- ## CLI: Command Reference source: https://keito.ai/docs/cli/command-reference markdown: https://keito.ai/docs/cli/command-reference.md llm_mode: link Linked reference: Complete production Keito CLI command reference for auth, projects, tasks, time tracking, flags, JSON, and exit codes. Read this page when you need the full details: https://keito.ai/docs/cli/command-reference.md --- ## CLI: Troubleshooting source: https://keito.ai/docs/cli/troubleshooting markdown: https://keito.ai/docs/cli/troubleshooting.md llm_mode: summary Summary: Resolve common Keito CLI authentication, project, task, timer, network, and JSON output issues. Full Markdown: https://keito.ai/docs/cli/troubleshooting.md --- ## Node SDK: Getting Started source: https://keito.ai/docs/node-sdk/getting-started markdown: https://keito.ai/docs/node-sdk/getting-started.md llm_mode: full # Node SDK: Getting Started The Keito Node SDK (`@keito/sdk`) provides a typed client for TypeScript and JavaScript applications. ## Install ```bash npm install @keito/sdk # or yarn add @keito/sdk # or pnpm add @keito/sdk ``` ## Initialise ```typescript import { Keito } from '@keito/sdk'; const keito = new Keito({ apiKey: process.env.KEITO_API_KEY, accountId: process.env.KEITO_ACCOUNT_ID, }); ``` The client reads `KEITO_API_KEY` and `KEITO_ACCOUNT_ID` from environment variables by default, so you can also write: ```typescript const keito = new Keito(); ``` ## Configuration Options | Option | Type | Default | Description | |---|---|---|---| | `apiKey` | string | env | Your API key | | `accountId` | string | env | Your Keito Company ID, sent as `Keito-Account-Id` | | `baseUrl` | string | `https://app.keito.ai/api/v2` | API base URL | | `maxRetries` | number | 2 | Max retry attempts on failure | | `timeout` | number | 30000 | Request timeout in ms | ## Your First Request ```typescript // List all projects const projects = await keito.projects.list(); for (const project of projects.data) { console.log(`${project.name} (${project.id})`); } ``` ## Next Steps - [Time Entries](/docs/node-sdk/time-entries) — create, list, and manage time entries - [Expenses](/docs/node-sdk/expenses) — log LLM token costs - [Agent Integration](/docs/node-sdk/agent-integration) — the session pattern for agent workflows --- ## Node SDK: Time Entries source: https://keito.ai/docs/node-sdk/time-entries markdown: https://keito.ai/docs/node-sdk/time-entries.md llm_mode: full # Node SDK: Time Entries ## Create a Time Entry ```typescript const entry = await keito.timeEntries.create({ project_id: 'prj_abc', task_id: 'tsk_001', spent_date: '2026-03-06', hours: 1.5, notes: 'Refactored authentication module', source: 'agent', metadata: { agent_id: 'review-bot-01', agent_type: 'claude-code', session_id: crypto.randomUUID(), model: 'claude-opus-4-6', }, }); ``` ## Start a Running Timer ```typescript const timer = await keito.timeEntries.startTimer({ project_id: 'prj_abc', task_id: 'tsk_001', spent_date: new Date().toISOString().split('T')[0], source: 'agent', replace_running: true, metadata: { agent_id: 'review-bot-01', session_id: crypto.randomUUID(), }, }); ``` Omit `started_time` for a current, exact server-side start. `started_time` and `ended_time` are `HH:mm` workspace-time strings, not ISO timestamps. If another timer is already running, the API returns `409 Conflict` unless you pass `replace_running: true`. ## Stop a Timer ```typescript await keito.timeEntries.stopTimer(timer.id, { notes: 'Completed code review', }); ``` The API calculates elapsed duration server-side from the timer start state. ## Restart a Timer ```typescript await keito.timeEntries.restartTimer(timer.id, { replace_running: true, }); ``` ## List Time Entries ```typescript // All agent entries for a project this week const entries = await keito.timeEntries.list({ source: 'agent', project_id: 'prj_abc', from: '2026-03-01', to: '2026-03-06', }); for (const entry of entries.data) { console.log(`${entry.spent_date}: ${entry.hours}h — ${entry.notes}`); } ``` ## Pagination ```typescript let page = await keito.timeEntries.list({ project_id: 'prj_abc', page: 1, per_page: 50, }); while (true) { for (const entry of page.data) { console.log(entry.id); } if (!page.hasNextPage()) break; page = await page.nextPage(); } ``` ## Delete a Time Entry ```typescript await keito.timeEntries.delete('te_abc123'); ``` --- ## Node SDK: Expenses source: https://keito.ai/docs/node-sdk/expenses markdown: https://keito.ai/docs/node-sdk/expenses.md llm_mode: full # Node SDK: Expenses ## Create an Expense ```typescript await keito.expenses.create({ project_id: 'prj_abc', expense_category_id: 'cat_llm_usage', spent_date: '2026-03-06', units: 45, notes: 'claude-opus-4-6: 30k input + 15k output tokens', source: 'agent', metadata: { agent_id: 'review-bot-01', session_id: '550e8400-e29b-41d4-a716-446655440000', model: 'claude-opus-4-6', input_tokens: 30000, output_tokens: 15000, }, }); ``` ## List Expenses ```typescript const expenses = await keito.expenses.list({ source: 'agent', project_id: 'prj_abc', from: '2026-03-01', }); for (const expense of expenses.data) { console.log(`${expense.spent_date}: ${expense.units} units — ${expense.notes}`); } ``` ## Get a Single Expense ```typescript const expense = await keito.expenses.get('exp_xyz789'); console.log(`Total cost: ${expense.total_cost}`); ``` --- ## Node SDK: Agent Integration source: https://keito.ai/docs/node-sdk/agent-integration markdown: https://keito.ai/docs/node-sdk/agent-integration.md llm_mode: full # Node SDK: Agent Integration This guide covers patterns for integrating Keito with AI agents in TypeScript/JavaScript applications. ## The Agent Session Pattern The most common pattern: start a timer when the agent begins work, stop it when done, and log an LLM expense for token costs. ```typescript import { Keito } from '@keito/sdk'; const keito = new Keito(); // 1. Start a running timer const sessionId = crypto.randomUUID(); const entry = await keito.timeEntries.startTimer({ project_id: 'prj_abc', task_id: 'tsk_001', spent_date: new Date().toISOString().split('T')[0], source: 'agent', metadata: { agent_id: 'review-bot-01', agent_type: 'claude-code', session_id: sessionId, model: 'claude-opus-4-6', }, }); // 2. Agent does work... const result = await myAgent.run('Review the authentication module'); // 3. Stop the timer await keito.timeEntries.stopTimer(entry.id, { notes: 'Reviewed and refactored auth module', }); // 4. Log LLM cost await keito.expenses.create({ project_id: 'prj_abc', expense_category_id: 'cat_llm_usage', spent_date: new Date().toISOString().split('T')[0], units: 40, notes: 'claude-opus-4-6: 25k input + 15k output', source: 'agent', metadata: { agent_id: 'review-bot-01', session_id: sessionId, model: 'claude-opus-4-6', input_tokens: 25000, output_tokens: 15000, }, }); ``` ## The Wrapper Helper For repeated agent calls, use a wrapper that handles tracking automatically: ```typescript async function trackAgentWork( keito: Keito, config: { projectId: string; taskId: string; agentId: string; model: string; }, work: () => Promise<{ result: T; inputTokens: number; outputTokens: number; }>, ): Promise { const sessionId = crypto.randomUUID(); const today = new Date().toISOString().split('T')[0]; const entry = await keito.timeEntries.startTimer({ project_id: config.projectId, task_id: config.taskId, spent_date: today, source: 'agent', metadata: { agent_id: config.agentId, session_id: sessionId, model: config.model, }, }); try { const { result, inputTokens, outputTokens } = await work(); await keito.timeEntries.stopTimer(entry.id); const totalTokensK = (inputTokens + outputTokens) / 1000; await keito.expenses.create({ project_id: config.projectId, expense_category_id: 'cat_llm_usage', spent_date: today, units: totalTokensK, source: 'agent', metadata: { agent_id: config.agentId, session_id: sessionId, model: config.model, input_tokens: inputTokens, output_tokens: outputTokens, }, }); return result; } catch (err) { await keito.timeEntries.delete(entry.id); throw err; } } ``` ## Metadata Best Practices - Always include `agent_id` and `session_id`. - Use `session_id` to correlate time entries with their LLM expenses. - Keep metadata under 4KB. - Include `model` for cost analysis across different LLMs. - Don't store sensitive data in metadata — it's visible in reports. --- ## Node SDK: Filtering & Pagination source: https://keito.ai/docs/node-sdk/filtering markdown: https://keito.ai/docs/node-sdk/filtering.md llm_mode: summary Summary: Filter time entries and expenses by source, project, date range, and paginate through large result sets. Full Markdown: https://keito.ai/docs/node-sdk/filtering.md --- ## Node SDK: Error Handling source: https://keito.ai/docs/node-sdk/error-handling markdown: https://keito.ai/docs/node-sdk/error-handling.md llm_mode: summary Summary: Handle API errors, rate limits, and retries in the Keito Node SDK. Full Markdown: https://keito.ai/docs/node-sdk/error-handling.md --- ## Node SDK: TypeScript Types source: https://keito.ai/docs/node-sdk/typescript-types markdown: https://keito.ai/docs/node-sdk/typescript-types.md llm_mode: link Linked reference: TypeScript type definitions exported by the Keito Node SDK for time entries, expenses, projects, and users. Read this page when you need the full details: https://keito.ai/docs/node-sdk/typescript-types.md --- ## Python SDK: Getting Started source: https://keito.ai/docs/python-sdk/getting-started markdown: https://keito.ai/docs/python-sdk/getting-started.md llm_mode: full # Python SDK: Getting Started The Keito Python SDK (`keito-python`) provides a client for Python applications, agent frameworks, and notebooks. ## Install ```bash pip install keito-python # or poetry add keito-python ``` ## Initialise ```python import os from keito import Keito client = Keito( api_key=os.environ["KEITO_API_KEY"], account_id=os.environ["KEITO_ACCOUNT_ID"], ) ``` Like the Node SDK, the Python client reads from environment variables by default: ```python client = Keito() # reads KEITO_API_KEY and KEITO_ACCOUNT_ID from env ``` ## Configuration Options | Option | Type | Default | Description | |---|---|---|---| | `api_key` | str | env | Your API key | | `account_id` | str | env | Your Keito Company ID, sent as `Keito-Account-Id` | | `base_url` | str | `https://app.keito.ai/api/v2` | API base URL | | `max_retries` | int | 2 | Max retry attempts on failure | | `timeout` | float | 30.0 | Request timeout in seconds | ## Your First Request ```python # List all projects projects = client.projects.list() for project in projects.data: print(f"{project.name} ({project.id})") ``` ## Next Steps - [Time Entries](/docs/python-sdk/time-entries) — create, list, and manage time entries - [Expenses](/docs/python-sdk/expenses) — log LLM token costs - [Agent Integration](/docs/python-sdk/agent-integration) — context manager and decorator patterns --- ## Python SDK: Time Entries source: https://keito.ai/docs/python-sdk/time-entries markdown: https://keito.ai/docs/python-sdk/time-entries.md llm_mode: full # Python SDK: Time Entries ## Create a Time Entry ```python entry = client.time_entries.create( project_id="prj_abc", task_id="tsk_001", spent_date="2026-03-06", hours=1.5, notes="Refactored authentication module", source="agent", metadata={ "agent_id": "review-bot-01", "agent_type": "claude-code", "session_id": "550e8400-e29b-41d4-a716-446655440000", "model": "claude-opus-4-6", }, ) ``` ## Start a Running Timer ```python from datetime import date timer = client.time_entries.start_timer( project_id="prj_abc", task_id="tsk_001", spent_date=str(date.today()), source="agent", replace_running=True, metadata={ "agent_id": "review-bot-01", "session_id": "550e8400-e29b-41d4-a716-446655440000", }, ) ``` Omit `started_time` for a current, exact server-side start. `started_time` and `ended_time` are `HH:mm` workspace-time strings, not ISO timestamps. If another timer is already running, the API returns `409 Conflict` unless you pass `replace_running=True`. ## Stop a Timer ```python client.time_entries.stop_timer(timer.id, notes="Completed code review") ``` The API calculates elapsed duration server-side from the timer start state. ## Restart a Timer ```python client.time_entries.restart_timer(timer.id, replace_running=True) ``` ## List Time Entries ```python # All agent entries for a project this week entries = client.time_entries.list( source="agent", project_id="prj_abc", from_date="2026-03-01", to_date="2026-03-06", ) for entry in entries: print(f"{entry.spent_date}: {entry.hours}h — {entry.notes}") ``` ## Delete a Time Entry ```python client.time_entries.delete("te_abc123") ``` --- ## Python SDK: Expenses source: https://keito.ai/docs/python-sdk/expenses markdown: https://keito.ai/docs/python-sdk/expenses.md llm_mode: full # Python SDK: Expenses ## Create an Expense ```python client.expenses.create( project_id="prj_abc", expense_category_id="cat_llm_usage", spent_date="2026-03-06", units=45, notes="claude-opus-4-6: 30k input + 15k output tokens", source="agent", metadata={ "agent_id": "review-bot-01", "session_id": "550e8400-e29b-41d4-a716-446655440000", "model": "claude-opus-4-6", "input_tokens": 30000, "output_tokens": 15000, }, ) ``` ## List Expenses ```python expenses = client.expenses.list( source="agent", project_id="prj_abc", from_date="2026-03-01", ) for expense in expenses.data: print(f"{expense.spent_date}: {expense.units} units — {expense.notes}") ``` ## Get a Single Expense ```python expense = client.expenses.get("exp_xyz789") print(f"Total cost: {expense.total_cost}") ``` --- ## Python SDK: Agent Integration source: https://keito.ai/docs/python-sdk/agent-integration markdown: https://keito.ai/docs/python-sdk/agent-integration.md llm_mode: full # Python SDK: Agent Integration This guide covers Pythonic patterns for integrating Keito with AI agents. ## Context Manager Pattern The recommended approach — a `with` block that handles start, stop, and expense logging automatically: ```python from keito import Keito client = Keito() with client.track_agent_work( project_id="prj_abc", task_id="tsk_001", agent_id="research-bot-03", model="claude-opus-4-6", ) as session: # Your agent does work here result = agent.run("Analyse Q4 billing data") # Report token usage — logged as LLM expense on exit session.report_tokens(input=18000, output=6000) session.set_notes("Analysed Q4 billing trends and generated summary") # Time entry and LLM expense are created automatically print(f"Tracked {session.hours:.2f}h, {session.total_tokens_k:.1f}k tokens") ``` If an exception is raised inside the `with` block, the time entry is automatically discarded (deleted). ## Decorator Pattern For agent tool functions that should be tracked automatically: ```python from keito import track @track(project_id="prj_abc", task_id="tsk_001") async def review_pull_request(pr_url: str) -> str: """Agent reviews a PR — time and cost tracked automatically.""" response = await agent.review(pr_url) return response.summary ``` ## Async Client For high-throughput agent work, use the async client: ```python from keito import AsyncKeito client = AsyncKeito() async with client.track_agent_work( project_id="prj_abc", agent_id="batch-processor", model="claude-sonnet-4-6", ) as session: results = await asyncio.gather(*[ process_item(item) for item in items ]) session.report_tokens(input=total_input, output=total_output) ``` ## Metadata Best Practices - Always include `agent_id` and `session_id`. - Use `session_id` to correlate time entries with their LLM expenses. - Keep metadata under 4KB. - Include `model` for cost analysis across different LLMs. - Don't store sensitive data in metadata — it's visible in reports. --- ## Python SDK: Async Usage source: https://keito.ai/docs/python-sdk/async-usage markdown: https://keito.ai/docs/python-sdk/async-usage.md llm_mode: summary Summary: Use the async Keito Python client for high-throughput agent work with asyncio. Full Markdown: https://keito.ai/docs/python-sdk/async-usage.md --- ## Python SDK: LangChain Integration source: https://keito.ai/docs/python-sdk/langchain markdown: https://keito.ai/docs/python-sdk/langchain.md llm_mode: summary Summary: Automatically track time and token usage for LangChain chains and agents with the Keito callback handler. Full Markdown: https://keito.ai/docs/python-sdk/langchain.md --- ## Python SDK: CrewAI Integration source: https://keito.ai/docs/python-sdk/crewai markdown: https://keito.ai/docs/python-sdk/crewai.md llm_mode: summary Summary: Track time and token costs for CrewAI agents using the Keito task callback. Full Markdown: https://keito.ai/docs/python-sdk/crewai.md --- ## Python SDK: API Reference source: https://keito.ai/docs/python-sdk/reference markdown: https://keito.ai/docs/python-sdk/reference.md llm_mode: link Linked reference: Complete API reference for the Keito Python SDK classes, methods, and types. Read this page when you need the full details: https://keito.ai/docs/python-sdk/reference.md --- # Agent Billing and Best Practices Agent work, LLM cost allocation, metadata conventions, and client billing guidance. --- ## Agent Integration Overview source: https://keito.ai/docs/agent-integration/overview markdown: https://keito.ai/docs/agent-integration/overview.md llm_mode: full # Agent Integration Overview This section explains the concepts behind agent tracking in Keito and provides guidance for integrating any AI agent, whether you use an SDK, the REST API, or the CLI for terminal-based time tracking. ## The Core Pattern Every agent integration follows the same three-step pattern: 1. **Start** — create a time entry when the agent begins work. 2. **Stop** — stop the running time entry when the agent finishes. 3. **Log cost** — create an LLM expense for token usage. The CLI covers time tracking and can record completed agent sessions with `source=agent` and metadata via `keito time session-record`. Use the API or SDKs when you also need LLM expense logging or tighter integration inside a long-running application process. ``` ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │ Start Timer │────▶│ Agent Works │────▶│ Stop Timer │ │ POST entry │ │ ... │ │ PATCH /stop │ │ is_running: │ │ │ │ hours: 1.5 │ │ true │ │ │ │ calculated by│ │ │ │ │ │ the API │ └──────────────┘ └──────────────┘ └──────┬───────┘ │ ┌──────▼───────┐ │ Log Expense │ │ POST expense│ │ units: 45 │ └──────────────┘ ``` ## Session Correlation Use a shared `session_id` in the metadata of both the time entry and the expense to link them: ```json { "session_id": "550e8400-e29b-41d4-a716-446655440000", "agent_id": "review-bot-01" } ``` This lets you trace which token costs correspond to which work sessions in reports. ## Error Handling If the agent fails mid-session: - **CLI**: `keito time stop --discard` - **SDK**: Delete the time entry (`keito.timeEntries.delete(entry.id)`) - **Python context manager**: Automatic — discards on exception. Don't leave running timers from failed sessions. They'll appear as in-progress entries in the UI. ## Choosing an Integration Method | Scenario | Recommended Method | |---|---| | Running agents in the terminal | CLI or Agent Skill | | Custom TypeScript/JS agent | Node SDK | | Python agent or notebook | Python SDK | | LangChain / CrewAI framework | Python SDK + integration | | CI/CD pipeline | CLI | | Non-JS/Python language | REST API | | Zapier / n8n / Make | REST API | | Asking Claude Desktop, ChatGPT, or Grok to track time, review billing or project archives, or draft an invoice | Hosted MCP connector | Chat connectors and automatic capture are different things. The [Claude Desktop](/docs/agent-integration/claude-desktop-mcp) and [ChatGPT](/docs/agent-integration/chatgpt-mcp) MCP connectors act only when you ask the assistant to call a Keito tool in a conversation, and they return authorised data to the assistant you chose. They can review active projects for archiving, but require your approval of the exact projects and warnings before an archive. A manager or admin with invoice access can also ask the assistant to review billing, or draft an invoice and send it after confirming the exact total. Automatic session capture, with the [Agent Skill](/docs/integrations/skills) or [CLI agent mode](/docs/cli/agent-mode), records agent work as it runs without a chat. ## Next Steps - [How Agent Billing Works](/docs/agent-integration/billing) — rates, margins, and invoicing - [Claude Desktop MCP Connector](/docs/agent-integration/claude-desktop-mcp) — connect Claude Desktop to Keito and use MCP tools safely, including [billing a project](/docs/agent-integration/claude-desktop-mcp#bill-a-project) - [Connect Keito to ChatGPT](/docs/agent-integration/chatgpt-mcp) — connect ChatGPT to the same hosted MCP server with your own authorization, including [billing a project from ChatGPT](/docs/agent-integration/chatgpt-mcp#bill-a-project-from-chatgpt) - [Grok Build Plugin](/docs/integrations/grok-build) — install the Keito plugin for Grok Build and connect with OAuth - [Quickstart](/docs/developer/quickstart) — create your first agent time entry - [CLI Agent Workflows](/docs/cli/agent-mode) — terminal and CI time tracking - [Keito Agent Skill](/docs/integrations/skills) — automatic Codex and Claude Code session tracking - [Node SDK Agent Integration](/docs/node-sdk/agent-integration) — TypeScript patterns - [Python SDK Agent Integration](/docs/python-sdk/agent-integration) — Python patterns --- ## Claude Desktop MCP Connector source: https://keito.ai/docs/agent-integration/claude-desktop-mcp markdown: https://keito.ai/docs/agent-integration/claude-desktop-mcp.md llm_mode: summary Summary: Connect Claude Desktop to Keito with the hosted MCP connector, then use Claude to track time, review project archives and billing, draft invoices, and set up projects. Local MCPB packages are support-managed. Full Markdown: https://keito.ai/docs/agent-integration/claude-desktop-mcp.md --- ## Connect Keito to ChatGPT source: https://keito.ai/docs/agent-integration/chatgpt-mcp markdown: https://keito.ai/docs/agent-integration/chatgpt-mcp.md llm_mode: summary Summary: Connect ChatGPT to Keito to find and review projects for archiving, track time, see what has been invoiced, and draft and send invoices with secure account authorization. Full Markdown: https://keito.ai/docs/agent-integration/chatgpt-mcp.md --- ## How Agent Billing Works source: https://keito.ai/docs/agent-integration/billing markdown: https://keito.ai/docs/agent-integration/billing.md llm_mode: full # How Agent Billing Works This page explains how agent work flows from tracked time to client invoices. ## The Full Flow ``` Agent works → Time entry created → Manager approves → Invoice generated → Client pays ↓ LLM expense created → Included in invoice (optional) ``` A manager with invoice access can drive the invoice step from an assistant on the [hosted MCP connector](/docs/agent-integration/claude-desktop-mcp#bill-a-project): show the billing summary, draft from uninvoiced work, and send after confirming the exact total. Payments stay in Keito. ## Rate Structure Agent users have their own rates, separate from humans: | Component | Set Where | Example | |---|---|---| | Agent hourly rate | Team → Agent User → Billable Rate | £75/hr | | Agent cost rate | Team → Agent User → Cost Rate | £5/hr | | LLM unit price | Expense Categories → LLM Usage | £0.003/1k tokens | ## Margin Calculation **Revenue**: Agent hours × billable rate + LLM cost pass-through **Cost**: Agent hours × cost rate + actual LLM spend **Margin**: Revenue - Cost ### Example | Line Item | Revenue | Cost | Margin | |---|---|---|---| | 6h agent work @ £75/hr | £450 | £30 | £420 | | 180k tokens @ £0.003/k | £0.54 | £0.54 | £0.00 | | **Total** | **£450.54** | **£30.54** | **£420** | ## Tips for Clients - Be transparent about agent work on invoices. - Use separate line items for agent time and LLM costs. - Include a brief explanation the first time a client sees agent charges. - Consider a lower rate for agent work to reflect the reduced human effort. ## Related - [Invoicing Agent Work](/docs/invoicing/agent-work) — how agent entries appear on invoices - [Managing Agent Users](/docs/team-management/agent-users) — setting agent rates - [Cost Allocation Patterns](/docs/best-practices/cost-allocation) — advanced billing strategies - [Bill a project from ChatGPT](/docs/agent-integration/chatgpt-mcp#bill-a-project-from-chatgpt) — billing summary, drafting, and the confirm-then-send flow from an assistant --- ## Framework Guides source: https://keito.ai/docs/agent-integration/frameworks markdown: https://keito.ai/docs/agent-integration/frameworks.md llm_mode: summary Summary: Integration guides for popular AI agent frameworks including LangChain, CrewAI, and custom agents. Full Markdown: https://keito.ai/docs/agent-integration/frameworks.md --- ## Metadata Conventions source: https://keito.ai/docs/best-practices/metadata markdown: https://keito.ai/docs/best-practices/metadata.md llm_mode: full # Metadata Conventions Best practices for the `metadata` field on agent time entries and expenses. ## Recommended Fields | Field | Type | Required | Description | |---|---|---|---| | `agent_id` | string | Yes | Unique agent identifier | | `agent_type` | string | Yes | Platform: `claude-code`, `codex`, `cursor`, `langchain`, `crewai`, `custom` | | `session_id` | string | Yes | UUID linking time + expense | | `model` | string | Yes | LLM model name | | `input_tokens` | number | Expense | Input tokens consumed | | `output_tokens` | number | Expense | Output tokens consumed | | `pr_url` | string | Optional | Pull request URL (for code review agents) | | `task_description` | string | Optional | Human-readable task description | ## Size Limits The metadata field has a 4KB maximum. In practice, this is more than enough for agent context. If you're hitting the limit, you're likely storing data that belongs in notes or an external system. ## Naming Conventions - Use `snake_case` for all metadata keys. - Use consistent `agent_id` values across sessions (it's the agent's identity, not the session's). - Use consistent `agent_type` values (lowercase, hyphenated). ## What NOT to Store - Sensitive data (API keys, credentials, PII) - Full LLM responses or prompts - Binary data or base64-encoded content - Ephemeral data that changes every second ## Example: Well-Structured Metadata ### Time Entry ```json { "agent_id": "review-bot-01", "agent_type": "claude-code", "session_id": "550e8400-e29b-41d4-a716-446655440000", "model": "claude-opus-4-6", "pr_url": "https://github.com/acme/app/pull/42" } ``` ### LLM Expense ```json { "agent_id": "review-bot-01", "agent_type": "claude-code", "session_id": "550e8400-e29b-41d4-a716-446655440000", "model": "claude-opus-4-6", "input_tokens": 25000, "output_tokens": 15000 } ``` --- ## Cost Allocation Patterns source: https://keito.ai/docs/best-practices/cost-allocation markdown: https://keito.ai/docs/best-practices/cost-allocation.md llm_mode: summary Summary: How to allocate agent and LLM costs across projects and clients using pass-through, bundled, or cost-plus pricing. Full Markdown: https://keito.ai/docs/best-practices/cost-allocation.md --- # Operational References Administrative, reporting, integrations, billing, and settings docs are summarized or linked. --- ## Keito for Chrome source: https://keito.ai/docs/chrome/overview markdown: https://keito.ai/docs/chrome/overview.md llm_mode: summary Summary: Track Keito time from the Chrome toolbar, GitHub issues and pull requests, and linked Basecamp to-dos. Full Markdown: https://keito.ai/docs/chrome/overview.md --- ## Install and connect Keito for Chrome source: https://keito.ai/docs/chrome/install-and-connect markdown: https://keito.ai/docs/chrome/install-and-connect.md llm_mode: summary Summary: Install the Chrome extension and connect with Keito sign-in or a user-bound API key and company ID. Full Markdown: https://keito.ai/docs/chrome/install-and-connect.md --- ## Track time from the Chrome toolbar source: https://keito.ai/docs/chrome/track-time markdown: https://keito.ai/docs/chrome/track-time.md llm_mode: summary Summary: Start and stop a Keito timer, switch work, and save manual time from the extension popup. Full Markdown: https://keito.ai/docs/chrome/track-time.md --- ## Chrome extension permissions and privacy source: https://keito.ai/docs/chrome/permissions-and-privacy markdown: https://keito.ai/docs/chrome/permissions-and-privacy.md llm_mode: summary Summary: Understand Keito's optional GitHub and Basecamp access, the data sent to Keito, and how to disable sites or sign out. Full Markdown: https://keito.ai/docs/chrome/permissions-and-privacy.md --- ## Roles & Permissions source: https://keito.ai/docs/team-management/roles-permissions markdown: https://keito.ai/docs/team-management/roles-permissions.md llm_mode: summary Summary: Keito uses a role-based permission system to control what team members can see and do. Full Markdown: https://keito.ai/docs/team-management/roles-permissions.md --- ## Managing Members source: https://keito.ai/docs/team-management/managing-members markdown: https://keito.ai/docs/team-management/managing-members.md llm_mode: summary Summary: Manage your team profiles, rates, and lifecycle within Keito. Full Markdown: https://keito.ai/docs/team-management/managing-members.md --- ## Capacity Planning source: https://keito.ai/docs/team-management/capacity-planning markdown: https://keito.ai/docs/team-management/capacity-planning.md llm_mode: summary Summary: Set working days and weekly capacity, read capacity used and utilization, and manage holidays, repeated bookings, placeholders, milestones and visibility in Plan. Full Markdown: https://keito.ai/docs/team-management/capacity-planning.md --- ## Time Off source: https://keito.ai/docs/team-management/time-off markdown: https://keito.ai/docs/team-management/time-off.md llm_mode: summary Summary: Let people book their own leave, get it approved, see what they have left, and take approved time off out of capacity and expected hours. Full Markdown: https://keito.ai/docs/team-management/time-off.md --- ## Managing Agent Users source: https://keito.ai/docs/team-management/agent-users markdown: https://keito.ai/docs/team-management/agent-users.md llm_mode: full # Managing Agent Users Agent users are profiles that represent AI agents in your workspace. They have names, rates, and project assignments — just like human team members. ## Creating an Agent User 1. Go to **Team** → **Add Member**. 2. Set the user type to **Agent**. 3. Enter a name for the agent (e.g., "review-bot-01", "code-agent"). 4. Set the billable rate and cost rate. 5. Assign the agent to projects. ## Agent vs. Human Users | Feature | Human User | Agent User | |---|---|---| | Can log in to UI | Yes | No | | Has API key | Optional | Yes | | Billable rate | Yes | Yes | | Project assignment | Yes | Yes | | Approval workflow | Yes | Yes | | Shows on invoices | Yes | Yes (with Agent badge) | | Capacity planning | Yes | Optional | ## Best Practices - **One agent user per logical agent.** If you have a code review bot and a documentation bot, create separate agent users for each. - **Set appropriate rates.** Agent rates are typically lower than human rates. Consider what the client will accept. - **Assign to specific projects.** Agents should only track time against projects they're assigned to, just like humans. - **Review agent entries regularly.** Include agent timesheets in your weekly approval cycle. --- ## Configure Microsoft Entra SSO source: https://keito.ai/docs/security/microsoft-entra-sso markdown: https://keito.ai/docs/security/microsoft-entra-sso.md llm_mode: summary Summary: Configure, test, and require Microsoft Entra SAML SSO for a Keito workspace. Full Markdown: https://keito.ai/docs/security/microsoft-entra-sso.md --- ## Two-factor authentication source: https://keito.ai/docs/security/two-factor-authentication markdown: https://keito.ai/docs/security/two-factor-authentication.md llm_mode: summary Summary: Require an authenticator app for every member of a Keito workspace, set up your own authenticator, and reset it for a teammate who has lost their phone. Full Markdown: https://keito.ai/docs/security/two-factor-authentication.md --- ## Reporting Overview source: https://keito.ai/docs/reports/reporting-overview markdown: https://keito.ai/docs/reports/reporting-overview.md llm_mode: summary Summary: See which Keito reports are included on Solo, Pro, and Business, with screenshots and role-based access notes. Full Markdown: https://keito.ai/docs/reports/reporting-overview.md --- ## Time Reports source: https://keito.ai/docs/reports/time-reports markdown: https://keito.ai/docs/reports/time-reports.md llm_mode: summary Summary: Run summary and detailed time reports, understand their plan requirements, and export the results. Full Markdown: https://keito.ai/docs/reports/time-reports.md --- ## Expense Reports source: https://keito.ai/docs/reports/expense-reports markdown: https://keito.ai/docs/reports/expense-reports.md llm_mode: summary Summary: Filter and export individual expense records with the Business detailed expense report. Full Markdown: https://keito.ai/docs/reports/expense-reports.md --- ## Budget Tracking source: https://keito.ai/docs/reports/budget-reports markdown: https://keito.ai/docs/reports/budget-reports.md llm_mode: summary Summary: Monitor hours, fees, and costs against the budget configured for each project. Full Markdown: https://keito.ai/docs/reports/budget-reports.md --- ## Agent Activity Reports source: https://keito.ai/docs/reports/agent-activity markdown: https://keito.ai/docs/reports/agent-activity.md llm_mode: summary Summary: Analyse agent productivity, LLM costs, and ROI with Keito's reporting tools and source-based filtering. Full Markdown: https://keito.ai/docs/reports/agent-activity.md --- ## Exporting Data source: https://keito.ai/docs/reports/exporting-data markdown: https://keito.ai/docs/reports/exporting-data.md llm_mode: link Linked reference: Export your Keito data for use in spreadsheets, accounting software, or custom analysis tools. Read this page when you need the full details: https://keito.ai/docs/reports/exporting-data.md --- ## Report Export Settings source: https://keito.ai/docs/reports/report-export-settings markdown: https://keito.ai/docs/reports/report-export-settings.md llm_mode: summary Summary: Customise the labels, filenames, worksheet names, and titles used by exports from Business saved reports. Full Markdown: https://keito.ai/docs/reports/report-export-settings.md --- ## Integrations source: https://keito.ai/docs/integrations markdown: https://keito.ai/docs/integrations.md llm_mode: summary Summary: Find the right Keito integration by workflow, plan, availability, and data direction. Full Markdown: https://keito.ai/docs/integrations.md --- ## Zapier Integration source: https://keito.ai/docs/integrations/zapier markdown: https://keito.ai/docs/integrations/zapier.md llm_mode: summary Summary: Connect Keito to Zapier on every plan: triggers, actions, and searches for your Keito records. Full Markdown: https://keito.ai/docs/integrations/zapier.md --- ## QuickBooks and Xero via Zapier source: https://keito.ai/docs/integrations/zapier-accounting markdown: https://keito.ai/docs/integrations/zapier-accounting.md llm_mode: summary Summary: Send Keito invoices and payments to QuickBooks Online or Xero with Zapier on Solo and Pro. Full Markdown: https://keito.ai/docs/integrations/zapier-accounting.md --- ## Keito CLI Integration source: https://keito.ai/docs/integrations/cli markdown: https://keito.ai/docs/integrations/cli.md llm_mode: summary Summary: Install the Keito CLI directly, authenticate once, and use it for terminal, script, CI, and agent time tracking workflows. Full Markdown: https://keito.ai/docs/integrations/cli.md --- ## Keito Agent Skill source: https://keito.ai/docs/integrations/skills markdown: https://keito.ai/docs/integrations/skills.md llm_mode: summary Summary: Install the Keito Agent Skill for Codex and Claude Code, configure each repository, and log local agent sessions automatically. Full Markdown: https://keito.ai/docs/integrations/skills.md --- ## Grok Build Plugin source: https://keito.ai/docs/integrations/grok-build markdown: https://keito.ai/docs/integrations/grok-build.md llm_mode: summary Summary: Install the Keito plugin for Grok Build, connect your Keito account with OAuth, and let Grok track time, review project archives and billing, and draft invoices through Keito's hosted MCP server. Full Markdown: https://keito.ai/docs/integrations/grok-build.md --- ## Xero Accounting Integration source: https://keito.ai/docs/integrations/xero markdown: https://keito.ai/docs/integrations/xero.md llm_mode: summary Summary: Connect Keito to Xero to copy invoices, sync contacts, align invoice numbers, and keep payment status in sync. Full Markdown: https://keito.ai/docs/integrations/xero.md --- ## QuickBooks Online Integration source: https://keito.ai/docs/integrations/quickbooks markdown: https://keito.ai/docs/integrations/quickbooks.md llm_mode: summary Summary: Connect Keito to QuickBooks Online to copy invoices, reconcile payments, map invoice lines, and keep accounting records in sync. Full Markdown: https://keito.ai/docs/integrations/quickbooks.md --- ## Stripe Payments source: https://keito.ai/docs/integrations/stripe-payments markdown: https://keito.ai/docs/integrations/stripe-payments.md llm_mode: summary Summary: Connect your Stripe account so clients can pay invoices online with zero platform fees from Keito. Full Markdown: https://keito.ai/docs/integrations/stripe-payments.md --- ## monday.com Integration source: https://keito.ai/docs/integrations/monday markdown: https://keito.ai/docs/integrations/monday.md llm_mode: summary Summary: Connect monday.com to Keito, map boards and top-level items, and link verified work references to time entries without writing time back to monday.com. Full Markdown: https://keito.ai/docs/integrations/monday.md --- ## Basecamp Integration source: https://keito.ai/docs/integrations/basecamp markdown: https://keito.ai/docs/integrations/basecamp.md llm_mode: summary Summary: Connect Basecamp to Keito, link projects, and track time against Basecamp to-dos without writing timesheets back to Basecamp. Full Markdown: https://keito.ai/docs/integrations/basecamp.md --- ## Google Calendar Integration source: https://keito.ai/docs/integrations/google-calendar markdown: https://keito.ai/docs/integrations/google-calendar.md llm_mode: summary Summary: Connect Google Calendar on Solo, Pro or Business. Review up to 50 events, save project/task mapping rules, and add selected events to your timesheet. Full Markdown: https://keito.ai/docs/integrations/google-calendar.md --- ## Outlook Calendar Integration source: https://keito.ai/docs/integrations/outlook-calendar markdown: https://keito.ai/docs/integrations/outlook-calendar.md llm_mode: summary Summary: Connect Outlook Calendar on Solo, Pro or Business. Review up to 50 events, save project/task mapping rules, and add selected events to your timesheet. Full Markdown: https://keito.ai/docs/integrations/outlook-calendar.md --- ## Asana Integration source: https://keito.ai/docs/integrations/asana markdown: https://keito.ai/docs/integrations/asana.md llm_mode: summary Summary: Track time from Asana tasks into Keito using native Asana App Components, and import Asana projects and people. Available on the Keito Business plan. Full Markdown: https://keito.ai/docs/integrations/asana.md --- ## Zendesk Time Tracking Integration source: https://keito.ai/docs/integrations/zendesk markdown: https://keito.ai/docs/integrations/zendesk.md llm_mode: summary Summary: Set up Keito in Zendesk Support, track ticket time with a timer or manual entry, and open linked timesheets in Keito. Full Markdown: https://keito.ai/docs/integrations/zendesk.md --- ## Jira Cloud Integration source: https://keito.ai/docs/integrations/jira markdown: https://keito.ai/docs/integrations/jira.md llm_mode: summary Summary: Sync linked Keito timer entries to Jira Cloud worklogs. Full Markdown: https://keito.ai/docs/integrations/jira.md --- ## Slack Integration (Private Beta) source: https://keito.ai/docs/integrations/slack markdown: https://keito.ai/docs/integrations/slack.md llm_mode: summary Summary: Install Keito in Slack, link your own account, track time with /keito, view hourly budgets, and control channel sharing during the private beta. Full Markdown: https://keito.ai/docs/integrations/slack.md --- ## CharlieHR Integration source: https://keito.ai/docs/integrations/charliehr markdown: https://keito.ai/docs/integrations/charliehr.md llm_mode: summary Summary: Sync approved CharlieHR leave into Keito planning availability. Full Markdown: https://keito.ai/docs/integrations/charliehr.md --- ## Company Settings source: https://keito.ai/docs/settings/company-settings markdown: https://keito.ai/docs/settings/company-settings.md llm_mode: summary Summary: Manage personal preferences, workspace defaults, billing, integrations, and data tools. Full Markdown: https://keito.ai/docs/settings/company-settings.md --- ## Personal Settings source: https://keito.ai/docs/settings/personal-settings markdown: https://keito.ai/docs/settings/personal-settings.md llm_mode: summary Summary: Customise your individual Keito experience without affecting other team members. Full Markdown: https://keito.ai/docs/settings/personal-settings.md --- ## Delete Account and Data source: https://keito.ai/docs/settings/delete-account-and-data markdown: https://keito.ai/docs/settings/delete-account-and-data.md llm_mode: link Linked reference: Permanently delete a Keito workspace, its data, integrations, files, and exclusive user accounts. Read this page when you need the full details: https://keito.ai/docs/settings/delete-account-and-data.md --- ## Plans & Pricing source: https://keito.ai/docs/billing/plans-pricing markdown: https://keito.ai/docs/billing/plans-pricing.md llm_mode: summary Summary: Keito offers Solo, Pro, and Business plans for one-person operators, teams, and advanced operations. Full Markdown: https://keito.ai/docs/billing/plans-pricing.md --- ## Example: Claude Code Wrapper source: https://keito.ai/docs/examples/claude-code markdown: https://keito.ai/docs/examples/claude-code.md llm_mode: link Linked reference: A shell wrapper for tracking Claude Code sessions with the current Keito CLI. Read this page when you need the full details: https://keito.ai/docs/examples/claude-code.md --- ## Example: GitHub Actions source: https://keito.ai/docs/examples/github-actions markdown: https://keito.ai/docs/examples/github-actions.md llm_mode: summary Summary: A GitHub Actions workflow that tracks automated work time with the current Keito CLI. Full Markdown: https://keito.ai/docs/examples/github-actions.md --- ## Example: LangChain Agent source: https://keito.ai/docs/examples/langchain-agent markdown: https://keito.ai/docs/examples/langchain-agent.md llm_mode: summary Summary: A complete LangChain agent example with automatic Keito time tracking and LLM expense logging. Full Markdown: https://keito.ai/docs/examples/langchain-agent.md --- # Additional Docs Not Included In Full These docs are available as individual Markdown pages but are not included in this context pack by default. - [Invite and Manage an Accountant](https://keito.ai/docs/accountant-access/invite-manage.md): Owner guide to inviting an accountant, selecting Audit or Operational access, changing grants, and revoking access. - [Accountant Access Overview](https://keito.ai/docs/accountant-access/overview.md): Give an external accountant workspace-wide financial visibility without giving them administrator or integration access. - [Working as an Accountant](https://keito.ai/docs/accountant-access/working-as-accountant.md): How accountants accept client invitations, switch workspaces, use reports and downloads, and understand blocked actions. - [Timesheet Approvals API](https://keito.ai/docs/api-reference/approvals.md): Submit, approve, and reject time via API v2. - [External References API](https://keito.ai/docs/api-reference/external-references.md): Link time entries to items in other systems. - [Workspace Backup API](https://keito.ai/docs/api-reference/workspace-backups.md): Create a complete, versioned, paginated backup of portable Keito workspace data with API v2. - [Personal Read-Only Sync Keys](https://keito.ai/docs/auth/personal-read-only-sync.md): Create a per-user Keito API key for read-only time, user, client, and assigned-project synchronisation. - [Track Basecamp to-dos from Chrome](https://keito.ai/docs/chrome/basecamp.md): Start a Keito timer from an open Basecamp 5 to-do after connecting and linking projects. - [Track GitHub issues and pull requests](https://keito.ai/docs/chrome/github.md): Use Keito's optional GitHub button to save a reference alongside time recorded in Keito. - [Troubleshoot Keito for Chrome](https://keito.ai/docs/chrome/troubleshooting.md): Fix missing site buttons, connection and project problems, and uncertain timer outcomes in the Chrome extension. - [Client View Sections](https://keito.ai/docs/client-portal/client-view-sections.md): Hide the Budget remaining and Uninvoiced amounts sections from external client members with a workspace default and per-project overrides. - [Enabling the Portal](https://keito.ai/docs/client-portal/enabling-the-portal.md): Turn on the Invoices and Retainers sections for a client user from Manage → Clients, copy a sign-in link, and revoke access. - [Invoices & Retainers](https://keito.ai/docs/client-portal/invoices-and-retainers.md): What the portal Invoices and Retainers sections show, the Outstanding, Paid, and All filters, what is never listed, and how emailed invoice and statement links behave for signed-in clients. - [Client Portal Overview](https://keito.ai/docs/client-portal/overview.md): What external client members see when they sign in to Keito: a dashboard, their assigned projects, and optionally the client's invoices and retainers. - [Permissions Reference](https://keito.ai/docs/client-portal/permissions-reference.md): Who can configure the client portal and client view sections, what a client member can open, and every option with its default. - [Install Keito for Linux](https://keito.ai/docs/getting-started/install-keito-for-linux.md): Install the Keito desktop time tracker on Ubuntu, Debian, Linux Mint and Pop!_OS. Download the .deb package, add the timer to your GNOME or KDE system tray, keep it updated, and remove it cleanly. - [Install Keito for Mac](https://keito.ai/docs/getting-started/install-keito-for-mac.md): Download, install, and open the signed Keito menu-bar app on macOS. - [Install Keito for Windows](https://keito.ai/docs/getting-started/install-keito-for-windows.md): Download, install, update, and remove the signed Keito desktop app on Windows, including silent install parameters and installer exit codes for IT teams. - [Airtable Integration](https://keito.ai/docs/integrations/airtable.md): Connect Airtable to Keito and configure one-way client, project, and expense imports, with field mapping, preview, sync schedules, and troubleshooting. - [Asana Import & Project Sync](https://keito.ai/docs/integrations/asana-import-sync.md): Admin guide to importing Asana projects and people into Keito and keeping imported project names and archived state in sync with Asana. - [Review and Import Calendar Events](https://keito.ai/docs/integrations/calendar-time-tracking.md): Populate your Day or Week timesheet from Google or Outlook Calendar. Review up to 50 events, reuse mapping rules and retry failed imports. - [Invoice Messages and Reminders](https://keito.ai/docs/invoicing/invoice-messages.md): Edit invoice, reminder, and thank-you email text. - [Recurring Invoices](https://keito.ai/docs/invoicing/recurring-invoices.md): Schedule draft or open invoices from tracked time and expenses or repeat fixed line items. - [Zero-Total Invoices](https://keito.ai/docs/invoicing/zero-total-invoices.md): Issue invoices with nothing to pay for pro bono services, full discounts, or a zero-total reconciliation. - [Brand and Disclosure Guidelines](https://keito.ai/docs/partners/brand-and-disclosure.md): How Keito partners may use the Keito name, describe the product accurately, and disclose a commercial relationship when they recommend Keito. - [Partner Program Overview](https://keito.ai/docs/partners/overview.md): How the Keito Partner Program works: the three partner tracks, how to apply, how introductions are recognised, and why partnership never gives access to client data. - [Working With Client Workspaces](https://keito.ai/docs/partners/working-with-clients.md): For accountants, bookkeepers and advisers: how clients invite you through accountant access, how to support several clients safely, and how to plan a client's move to Keito. - [Changing and Reusing Project Codes](https://keito.ai/docs/projects/changing-project-codes.md): Change a project code or reuse a job number held by a closed project. - [Audit Log Exports](https://keito.ai/docs/reports/audit-log-export.md): Use Keito Business to export recorded before and after values for audit events, with clear limits on original values and missing history. - [Working Across Multiple Workspaces](https://keito.ai/docs/team-management/multiple-workspaces.md): Use one Keito identity in several independent workspaces and switch safely between them. - [Project and Task Picker Ordering](https://keito.ai/docs/time-tracking/project-task-picker-ordering.md): Choose how projects and tasks are ordered when you track time, and understand favourites, recent activity, grouping, and search.