Skip to main content
A context is background knowledge you inject into an agent so it understands the context to do a specific task. It is not a task instruction (prompt) or a behavioral rule (persona) - it is information. Architecture decisions, product requirements, team conventions, domain knowledge, reference documentation. This is the asset type that solves the “every new session starts from zero” problem. Instead of re-explaining your stack and conventions every time, you write it once as a context asset and ingest manually or your agents do when needed automatically.

What goes in a context

  • Architecture decisions and technical conventions
  • Product requirements or domain-specific terminology
  • Reference material the AI needs to reason correctly
  • Team standards (code style, naming, patterns to use or avoid)
  • Any background the AI would otherwise need to ask about

Tips

  • Keep a context file (.md, .docx, .txt, .pdf, etc.) under 2000 tokens when possible — shorter context produces more coherent output.
  • Write references to other context files, so your contexts are task-scoped and provide only essential information AI needs to complete a task.
  • Use markdown over plain text. LLMs understand markdown formatting better, which helps them prioritize information and make better decisions.
  • Define metadata such as tags, keywords, related files, importance, recency, etc. for better agent discoverability and decisiveness.

API value

Example