Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.gainable.dev/llms.txt

Use this file to discover all available pages before exploring further.

What is an objective?

An objective is the goal an agent works toward. It’s the “why” behind every playbook the agent runs. Examples:
  • “Every claim resolved within 14 days.”
  • “No deal sits in a single stage for more than 21 days.”
  • “Inventory above the configured reorder point at all times.”
  • “Every sales rep gets a daily briefing of their pipeline by 8 AM.”
Objectives are not free-form rules. Each one is a measurable target tied to a collection, a field, and a threshold. That’s what makes them enforceable by an agent rather than a vague aspiration.

How Gaia infers objectives

When you finish the data and UI phases of a build, the autonomy phase kicks in. Gaia reads:
  • Your schema. Field names, enum values, dates, foreign keys, status fields.
  • Your views. What you’ve put on dashboards, kanban boards, and tables.
  • Your seed data. Volume, distribution, recency.
  • Your prompt history. The intent behind the app.
From these signals it proposes a starting set of objectives. A CRM with a stage enum and a close_date field gets stalled-deal objectives. A support app with a status field and created_at gets SLA objectives. An inventory app with a quantity field and a reorder_point field gets stock-level objectives.
You always see the objectives before they go live. The autonomy contract is reviewable, editable, and disablable. Nothing runs until you sign off.

Anatomy of an objective

Each objective has the same shape:
FieldWhat it isExample
NameShort label for humans”Stalled deal”
CollectionThe data model the objective watchesdeals
MeasureWhat’s being measuredDays since stage_changed_at
ThresholdWhen the objective is at riskMore than 14 days
FilterWhich records the objective applies toamount > 5000 AND status != "closed"
OwnerWho the resulting drafts go todeal.owner
Risk tierHow the objective actsDraft-and-approve

Editing objectives

Every objective is editable through follow-up prompts or the Autopilot UI:
Change the stalled-deal threshold from 14 days to 21 days.
Only apply the stalled-deal objective to deals over $10,000.
Disable the inventory low-stock objective for the
"discontinued" product line.

Adding objectives manually

You’re not limited to inferred objectives. Add new ones in natural language:
Add an objective: every new contact created in HubSpot
gets a welcome email drafted within 24 hours, sent
to the account owner's Autopilot inbox.
Add an objective: any invoice over 30 days past due
gets a draft escalation to the controller.

When objectives fire

An objective produces work when its threshold is crossed. The trigger that detects the crossing depends on the objective: The objective stays the same. The trigger reflects how the world tells the agent the objective needs attention.

Example: a stalled-deal objective end to end

name: Stalled deal
collection: deals
measure: days_since_stage_changed_at
threshold: ">= 14"
filter: "amount > 5000 AND status NOT IN ('won','lost')"
owner: deal.owner
risk_tier: draft_and_approve
playbook: nudge_with_email
When this objective fires:
  1. The runtime queries deals for matching records once a day.
  2. For each match, the nudge_with_email playbook runs.
  3. The playbook drafts a follow-up email referencing the deal’s last activity.
  4. The draft lands in the deal owner’s Autopilot inbox with full reasoning attached.
  5. The owner approves, edits, or skips. Nothing leaves until they do.

Best practices

A high-stakes objective (“escalate every late invoice”) creates more drafts than the team can review. Start with the top 10% of cases by amount or risk. Widen once approval rates settle.
deal.owner is more useful than “the sales team.” Personal Autopilot inboxes are more actionable than a shared queue.
Disabled objectives keep their history and can be turned on with one click. Deleting loses the configuration.
The agent action log shows what fired, what got drafted, what got approved, and what got skipped. Skipped drafts are the strongest signal that an objective needs editing.

Learn more

Playbooks

The trigger, steps, and guardrails an objective runs

Triggers

The four ways a playbook starts

Risk tiers

How drafts become actions

Inbox

The inbox where drafts land