Skip to main content

Goal Execution

Writing good goals

The quality of your goal directly affects the quality of the result. AI Partner doesn't guess your intent — it executes what you ask for.

Research Anthropic's latest funding round.
Find: amount raised, lead investor, valuation, and date.
Create an Excel file with these 4 data points in columns.
Check my Gmail for emails from @sequoia.com in the last 30 days.
Summarize each email in one sentence.
Send the summary to my Telegram.
Write a Python script that fetches the NIFTY 50 closing price daily at 3:35 PM.
Save the data to a CSV file in my workspace.
Test it by running it once and confirming the file is created.

The goal formula

A reliable goal has three parts:

[What to find/do] + [Specific details] + [Desired output and format]

Examples:

VagueSpecific
"Research AI news""Find the 5 most significant AI research papers published this week on arXiv. For each: title, authors, abstract summary, and link."
"Make a slide deck""Create a 6-slide PowerPoint: title, problem, solution, market size, traction, ask. Use our company colors (blue #1a73e8, white)."
"Check my email""Search Gmail for emails from investors in the last 7 days. Summarize each in one sentence. Flag any that ask for a decision or follow-up."

Sending a goal

Option 1: Chat input — rocket icon

Type your goal in the chat input. Click the rocket icon (or press Ctrl+Enter) to send as a goal instead of a chat message.

Option 2: Goal launcher

Click + New Goal in the sidebar. Fill in:

  • Goal description (what you want)
  • Success criteria (how the agent knows it's done — optional but helpful)
  • Priority (normal / high / urgent)
  • Deadline (optional — triggers early HITL if at risk)

Option 3: API

curl -X POST http://localhost:3000/api/autonomous/goal \
-H "Content-Type: application/json" \
-d '{
"goal": "Research NVIDIA Q1 2026 earnings and create a slide deck",
"success_criteria": ["file:*.pptx exists", "slides >= 5"],
"priority": "normal"
}'

Success criteria

The executor needs to know when a goal is done. You can either let it infer the criteria (it reads your goal and extracts them) or specify them explicitly:

Research the top 5 AI startups that raised funding this week.
Create an Excel file with: company name, amount, investors, sector.

Success criteria:
- File "ai_funding_week.xlsx" exists in workspace
- File contains at least 5 rows of data
- All 4 columns are populated

When success criteria are met, the goal is marked complete and the loop stops. If the executor loops for 40 iterations without meeting the criteria, it escalates to you with what it has.


Watching a goal run

The Goal Progress panel (right side of the screen) shows:

Goal: Research top AI startups funded this week
Status: Running • Iteration 7 / 40 • Started 2 min ago

Sub-tasks:
✅ Search for AI startup funding news (web_search × 3)
✅ Extract company details from search results (web_fetch × 5)
🔄 Structure data into table format (execute_python)
⏳ Generate Excel file
⏳ Validate output

Recent actions:
→ [07] web_fetch(techcrunch.com/...) → extracted 2 companies
→ [06] web_fetch(venturebeat.com/...) → extracted 1 company
→ [05] web_search("AI startup funding May 2026") → 8 results

You can:

  • Pause the goal — execution stops; resume anytime
  • Cancel the goal — stops immediately, delivers partial results
  • View full log — every tool call, argument, and result

Goal delegation (parallel sub-agents)

For complex goals, the executor can spin up sub-agents to work in parallel:

Research all three: OpenAI, Anthropic, and Google DeepMind.
Find their latest product announcements, funding news, and key hires in the last 30 days.
Then compile everything into a single comparison document.

What actually runs:

Main agent: decompose goal

Spawn 3 sub-agents in parallel:
Agent 1 → research OpenAI
Agent 2 → research Anthropic
Agent 3 → research Google DeepMind

All 3 complete (within ~60 seconds)

Main agent: merge results → generate_word(comparison doc)

Sub-agent status is visible in the Agent Pool Monitor (sidebar → Agents).

Maximum: 5 concurrent sub-agents, 3 levels deep.


What happens when things go wrong

Script failure → self-correction

If the agent generates a Python script that throws an error:

✅ Iteration 4: execute_python(scrape_prices.py)
❌ Error: AttributeError: 'NoneType' has no attribute 'text'
(price element not found — likely page structure changed)
✅ SelfCorrector: analyzing error...
✅ SelfCorrector: updated script to handle missing element
✅ Iteration 5: execute_python(scrape_prices_v2.py) → success

Self-correction runs up to 3 times before escalating to you.

Stuck loop → forced replan

If the agent calls the same tool with the same arguments 3 times without progress:

⚠️ Stuck detection: web_search called 3× with identical query
✅ Breaking loop → replanning with different approach
✅ Iteration 9: switching from web_search to web_fetch (direct URL)

Wall-clock timeout → escalation

If the goal hasn't completed within the configured time limit (default: 10 minutes):

⚠️ Goal timeout reached (10 min)
Delivered partial result: found 3 of 5 requested companies
[Resume with more time] [Accept partial result] [Cancel]

Routing directly to an agent profile

AI Partner has 16 specialist agent profiles. Route to one directly using @:

CommandAgentBest for
@fin-analyst What is RELIANCE.NS today?Financial AnalystMarket data, portfolio analysis
@python-dev Write a web scraper for XPython DeveloperPython code generation
@researcher Find papers on topic XWeb ResearcherMulti-source research
@excel-builder Create a budget spreadsheetExcel BuilderComplex Excel files
@trend-spotter What's trending in AI?Trend SpotterNews and trend analysis
@summarizer Summarize this documentSummarizerText reduction

Auto-routing also works — typing "trending AI tools" fires @trend-spotter automatically by keyword match.