LearnAI
Новинки AI · AI-агенты · Lesson 5/10
← To the catalog
Task

Agent Context and Memory

Collect context for the agent for the task of “letters to clients.” Return JSON {"agentBrief":"...","keyFacts":"...","outOfScope":"..."}: agentBrief - short constant brief (who you are, for whom, rules), keyFacts - facts needed for the task, outOfScope - what to ignore and not touch.

Unlock access to submit solutions for instant AI review.
Prepare context for the agent
💡 A piece of theory

The agent only knows what you gave it in this task, plus general knowledge of the model. He doesn’t remember yesterday’s conversation unless you remind him, and he doesn’t see your files until you give him access. This is the context - a set of facts and materials with which the agent is working right now. Mechanics: the more important the fact, the closer to the beginning it should be put, briefly and unambiguously. An insider technique is the “agent brief”: 5-7 lines of constant facts about your situation (who you are, for whom the result is, what is not allowed, what are the rules of tone), which you insert at the beginning of each task. This replaces "memory" and makes the responses stable. The second technique is to clearly outline what is outside the task: “don’t touch past orders,” “ignore drafts.” Boundaries save energy and remove unnecessary things. A typical mistake is to assume that the agent “already remembers” the context from the last time or that he himself will guess your rules. He won't guess. Give the key facts and boundaries - and the quality will increase without any magic.

How is it assessed · passing 70

  • 1Valid JSON without text around it20%
  • 2The required fields are there25%
  • 3Context replaces memory rather than relying on it55%
Your promptClaude ⌄
🔒

Unlock access to submit solutions for instant AI review.