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.”
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.
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:| Field | What it is | Example |
|---|---|---|
| Name | Short label for humans | ”Stalled deal” |
| Collection | The data model the objective watches | deals |
| Measure | What’s being measured | Days since stage_changed_at |
| Threshold | When the objective is at risk | More than 14 days |
| Filter | Which records the objective applies to | amount > 5000 AND status != "closed" |
| Owner | Who the resulting drafts go to | deal.owner |
| Risk tier | How the objective acts | Draft-and-approve |
Editing objectives
Every objective is editable through follow-up prompts or the Autopilot UI:Adding objectives manually
You’re not limited to inferred objectives. Add new ones in natural language:When objectives fire
An objective produces work when its threshold is crossed. The trigger that detects the crossing depends on the objective:- A time-based objective (“14 days idle”) uses a schedule trigger.
- A state-change objective (“stage moves to lost”) uses a data change trigger.
- An inbound objective (“new ticket from VIP”) uses a webhook trigger.
- An on-demand objective (“draft me a recap”) uses a user-triggered button.
Example: a stalled-deal objective end to end
- The runtime queries
dealsfor matching records once a day. - For each match, the
nudge_with_emailplaybook runs. - The playbook drafts a follow-up email referencing the deal’s last activity.
- The draft lands in the deal owner’s Autopilot inbox with full reasoning attached.
- The owner approves, edits, or skips. Nothing leaves until they do.
Best practices
Start narrow, widen later
Start narrow, widen later
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.
Tie owners to records, not roles
Tie owners to records, not roles
deal.owner is more useful than “the sales team.” Personal Autopilot inboxes are more actionable than a shared queue.Disable, don't delete, while testing
Disable, don't delete, while testing
Disabled objectives keep their history and can be turned on with one click. Deleting loses the configuration.
Review the action log weekly
Review the action log weekly
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