Guozhen AIGlobal AI field notes and model intelligence

English translation

2 Goal Manager: Pin the Agent's Main Objective Outside the Model

Published:

Category: Harness Engineering

Read time: 3 min

Reads: --

Lesson #2Images are preserved from the source page

AI Article Decision Snapshot

Turn the lesson into workflow, model, budget, and security checks before choosing tools.

Use this quick snapshot before leaving the article. It keeps the next search tied to practical AI software, model/API, cost, privacy, and implementation questions.

Workflow fit

Identify the real job behind the article: coding, research, document review, support, analytics, content, or internal automation.

Model or tool decision

Decide whether the next step is a software shortlist, an AI tool comparison, an API platform choice, or a model benchmark.

Budget and usage signal

Estimate seats, API calls, prompt volume, retries, review time, and fallback work before assuming the workflow is cheap.

Security and privacy review

Check whether source code, customer data, private documents, prompts, logs, or embeddings will enter the AI workflow.

Goal Manager overview

Many agents fail not because the model cannot reason, but because the goal is not stored clearly.

If the main objective only exists somewhere inside a long conversation, the agent has to rediscover it again and again. After enough tool calls, the latest detail can become louder than the original task.

A Goal Manager solves this by extracting the main objective into an independent object.

1. The Goal Is Not the Chat History

A conversation may contain:

  • the user's original request
  • follow-up corrections
  • search results
  • tool errors
  • half-finished drafts
  • temporary experiments

The goal should be cleaner than that.

For example, the user might say:

Help me research Gemma and write a public article with images.

The Goal Manager can store:

{
  "objective": "Create a publish-ready article about Gemma for a general AI audience.",
  "deliverables": ["article draft", "image suggestions", "final title"],
  "constraints": ["Chinese public-account style", "avoid unsupported claims"],
  "done_when": ["article is complete", "sections are coherent", "images are planned"]
}

This object is small, explicit, and reusable.

2. What a Good Goal Contract Contains

Goal contract detail

A useful goal contract usually contains five parts.

Objective

What should be accomplished?

The objective should be concrete enough that the system can tell whether the agent is still on track.

Deliverables

What must be produced?

Examples:

  • Markdown article
  • Word document
  • deployment report
  • benchmark table
  • set of generated images

Constraints

What rules must be respected?

Examples:

  • use official sources first
  • do not expose secrets
  • keep the existing page layout
  • preserve image paths

Done Criteria

When is the task finished?

The agent needs a finish line. Without one, it may keep searching, rewriting, or expanding forever.

Risk Boundaries

What must not be touched?

For coding agents, this is especially important. A goal contract can say:

  • do not modify authentication logic
  • do not touch production credentials
  • do not overwrite unrelated local changes

3. Inject the Goal on Every Call

Goal injection loop

The simplest Goal Manager loop is:

Goal
+
Current State
+
Current Task
+
User Message

This means the model is not expected to reconstruct the mission from memory. The system reminds it every time.

For long tasks, this matters more than prompt length. A short, stable goal repeated at the right moment is often better than a massive prompt that is never refreshed.

4. Goals Can Change, But Only Explicitly

A good harness does not freeze the user forever. The user can change the goal.

But the change should be explicit:

{
  "revision": 2,
  "changed_by": "user",
  "old_goal": "Write a research article",
  "new_goal": "Write a tutorial series",
  "reason": "The topic is better explained step by step"
}

This avoids silent goal drift.

The agent should not quietly turn "compare two papers" into "browse interesting papers." It should ask or record the revision.

5. Practice: Write an Eight-Line Goal Contract

Goal Manager practice check

Take one real agent task and write:

{
  "objective": "",
  "deliverables": [],
  "audience": "",
  "constraints": [],
  "done_when": [],
  "must_not_do": [],
  "current_priority": "",
  "revision": 1
}

If the goal contract feels hard to write, the task is probably not clear enough yet.

6. Lesson Summary

Goal Manager application review

The Goal Manager is the anchor of a practical agent harness.

It stores the main objective outside the transcript, injects it into each reasoning cycle, and records goal changes explicitly.

Without a Goal Manager, a long-running agent is always at risk of following the newest detail instead of the real mission.

Apply This Lesson

Turn this article into AI software, model, API, and security decisions.

English Article FAQ

Use this article as evidence before choosing AI tools

How should I use this AI Tutorials article?

Use it as the implementation or learning layer, then connect the idea to AI software buyer guides, tool comparisons, benchmarks, API choices, and security checks before making a production decision.

Is this English article different from the Chinese original?

The English edition is localized for global AI readers while preserving the original diagrams, screenshots, prompts, code examples, and source context from the Chinese article.

What should I read after 2 Goal Manager: Pin the Agent's Main Objective Outside the Model?

Continue with AI Software Buyer Guides, AI Tools Workbench, Best AI Coding Agents, AI Model Benchmarks, OpenAI vs Anthropic API, or LLM Security Tools depending on the decision you need to make.

Can this article alone choose an AI product or model?

No. Treat the article as evidence and context, then validate fit with pricing, privacy requirements, integration effort, benchmark results, workflow tests, and fallback planning.

Continue

Keep reading from here

Browse English site

Reader Messages

Reader messages

Questions, corrections, extra sources, or hands-on results can be left here. No login is required.

Max 800 characters

To reduce spam, each message is checked for length, link count, and posting frequency.

0/800

Messages

0 messages
Loading messages...