>cogtrix v0.3.0

Scheduling

Scheduling

cron_add

Schedule a recurring prompt to run on a cron expression. The prompt is sent to the LLM in the background at each scheduled time and the response is printed to the console.

Parameters:

ParameterTypeRequiredDescription
schedulestringYes5-field cron expression (e.g. "*/15 * * * *" for every 15 min, "0 9 * * 1-5" for weekdays at 09:00)
promptstringYesPrompt to send to the LLM at each scheduled time
namestringNoHuman-readable label used when listing or removing the job
contextstringNoExecution mode: "fresh" (default) runs isolated, "inherit" reuses the current session history and tools when the host process provides a runner

Returns: Job summary including the assigned 8-character ID, schedule, and next run time.


cron_list

List all scheduled cron jobs.

Parameters: None

Returns: Table of job ID, name, schedule expression, context, run count, last run, and next run time.


cron_remove

Remove a scheduled cron job. Accepts the job ID, a name substring, or the schedule expression.

Parameters:

ParameterTypeRequiredDescription
job_idstringYesJob ID (8-char hex from cron_add), case-insensitive substring of the job name, or exact cron schedule expression

If multiple jobs match by name or schedule, all are removed. If the ID is not remembered, use cron_list first or pass the name given at creation time.

Returns: Confirmation listing removed job IDs and names, or an error message if no match was found.


schedule_reply

Schedule a reply for delayed delivery instead of sending immediately.

Note: This tool is documented for reference but is not yet registered in the static tool registry. It is injected dynamically by the MessageHandler in assistant mode. Do not rely on it being available via request_tools until it has a TOOL_CONFIG registration.

When Used: The agent calls this tool when the system prompt includes timing or scheduling instructions (e.g., “reply in 3 hours”, “respond after the meeting”). The agent’s response is NOT sent immediately — it is queued and delivered by a background thread.

Parameters:

ParameterTypeRequiredDescription
textstringYesThe reply message to send later
delay_minutesintYesMinutes to wait before sending (1–1440)

Notes:

  • Message text is sanitized through output guardrails before being queued
  • Delivery retries up to 3 times with exponential backoff (30 s → 120 s → 600 s) on send failure
  • A new incoming message from the same chat cancels any pending scheduled replies for that chat
  • Quiet hours are enforced at dispatch time — delivery defers to the end of the quiet window rather than being dropped
  • Queue is persisted to data/assistant/schedule.json and survives restarts
  • Configurable via services.assistant.response_timing (quiet hours, per-contact overrides)

Returns: Confirmation string telling the agent not to repeat the message.

Note: In assistant mode, additional message management tools are available: queue_reply, edit_last_reply, list_scheduled_messages, edit_scheduled_message, cancel_scheduled_message, defer_processing, and suppress_reply. These are injected per-call and documented in the Architecture Guide.


Calendar Tools

calendar_list_events

List calendar events within a date range.

Configuration: Requires services.calendar.credentials_file or services.calendar.token_json in .cogtrix.yml.

Parameters:

ParameterTypeRequiredDescription
start_datestringYesStart date (ISO 8601, e.g., 2026-05-17)
end_datestringYesEnd date (ISO 8601)
calendar_idstringNoSpecific calendar ID (default: primary)

Returns: List of events with title, start/end times, attendees, and location.


calendar_create_event

Create a new calendar event.

Parameters:

ParameterTypeRequiredDescription
titlestringYesEvent title
start_timestringYesStart time (ISO 8601 datetime)
end_timestringYesEnd time (ISO 8601 datetime)
descriptionstringNoEvent description
locationstringNoLocation string
attendeesarray[string]NoEmail addresses of attendees
calendar_idstringNoTarget calendar (default: primary)

Returns: Created event with ID and Google Calendar link.


calendar_search_events

Search calendar events by text query.

Parameters:

ParameterTypeRequiredDescription
querystringYesSearch text (matches title, description, location)
start_datestringNoLimit to events on or after this date
end_datestringNoLimit to events on or before this date
calendar_idstringNoSpecific calendar ID

Returns: Matching events with title, times, and description excerpt.


Goal Management

set_goal

Set a top-level goal for the current session. Goals are tracked across turns and guide the agent’s priorities.

Parameters:

ParameterTypeRequiredDescription
goalstringYesGoal description
deadlinestringNoTarget completion time (ISO 8601)
prioritystringNohigh, medium, or low (default: medium)

Returns: Confirmation with goal ID.


add_subgoal

Add a subgoal under an existing goal.

Parameters:

ParameterTypeRequiredDescription
goal_idstringYesID of the parent goal
subgoalstringYesSubgoal description
deadlinestringNoTarget completion time

Returns: Confirmation with subgoal ID.


complete_goal

Mark a goal or subgoal as completed.

Parameters:

ParameterTypeRequiredDescription
goal_idstringYesID of the goal or subgoal to complete
resultstringNoOutcome summary

Returns: Confirmation and remaining open subgoals (if any).


abandon_goal

Mark a goal or subgoal as abandoned.

Parameters:

ParameterTypeRequiredDescription
goal_idstringYesID of the goal or subgoal to abandon
reasonstringNoReason for abandoning

Returns: Confirmation.


list_goals

List all active goals and subgoals with their status.

Parameters:

ParameterTypeRequiredDescription
statusstringNoFilter: active, completed, abandoned, or all (default: active)

Returns: Table of goal IDs, descriptions, statuses, and deadlines.