MD VesselMD Vessel
All posts

November 15, 2026·10 min read

What Is Agent Context?

AI agents are powerful, but they share a critical flaw: every conversation starts from zero. Show an agent your project once, and it understands it — close the session, reopen it, and the agent knows nothing again. No memory of the architecture discussion you had yesterday. No recollection of the deployment steps you figured out last week. No shared knowledge between the agent that wrote the code and the agent that reviewed it.

This gap is what agent context is designed to solve. Agent context is the background information, project knowledge, behavioral rules, and operational memory that an AI agent carries into every interaction. It's the difference between an agent that needs to be told everything each time and an agent that already knows how your project works.


Agent context is any information that helps an AI agent understand its environment, your preferences, and the task at hand. It includes:

  • Project rules — coding conventions, architecture decisions, deployment targets
  • Task instructions — how to build, test, and deploy specific components
  • Behavioral guidelines — what the agent should and shouldn't do
  • Shared knowledge — decisions, lessons learned, and reasoning from past sessions
  • Environment details — available tools, API keys, service endpoints

A context-aware AI agent can access this information automatically — it knows to check for a project's CLAUDE.md before writing code, to follow the team's git commit conventions, and to prefer the project's established testing framework.

Without agent context, every session is a fresh, stateless interaction. With it, the agent builds on everything that came before.

Context Agent vs. Context File

The terms "context agent" and "agent context" are often used interchangeably, but they refer to different things:

TermMeaning
Agent contextThe information itself — the data, files, and knowledge the agent uses
Context agentA system or tool that manages, stores, and retrieves agent context
AI agent context fileA specific file (like CLAUDE.md, SKILL.md, or AGENTS.md) that contains context
Agent context protocolA standard way for agents and context stores to communicate

MD Vessel is an agent context store — it manages, stores, and serves agent context files so every agent in your workflow has access to the same shared knowledge.


Why Agent Context Matters

Without shared context, every AI agent session is a blank slate. This creates several problems:

Repetition. You explain your project structure, your coding standards, and your deployment pipeline in every new conversation. Every time.

Inconsistency. One agent follows convention A, another follows convention B. Without a shared source of truth, different agents drift toward different behaviors.

Lost knowledge. The brilliant insight from yesterday's debugging session — the one that took two hours to figure out — is gone. The next agent will have to rediscover it.

Agent collaboration limits. When you run multiple agents (a coder, a reviewer, a deployer), they can't share context. What the coder learned doesn't help the reviewer.

Agent context solves all of this. A well-managed context system means every agent starts each session already knowing your project — its rules, its conventions, its history.


Types of Agent Context

There are several ways to deliver context to AI agents, and most projects use a combination:

1. Project-Level Context Files

These are markdown files that live in your project repository and define how agents should behave:

FileUsed ByPurpose
CLAUDE.mdClaude CodeProject-level context for Anthropic's Claude
SKILL.mdHermes AgentReusable procedural memory — how to do tasks
AGENTS.mdHermes, Claude Code, CodexPortable agent instructions across tools
.cursorrules / .cursor/rules/*.mdcCursorProject rules for Cursor AI editor
SOUL.mdHermes AgentAgent identity and behavioral boundaries

These files are the most common form of AI agent context file — they're simple markdown, version-controlled with your code, and readable by any agent that enters the project.

2. Persistent Memory

Some agents maintain a persistent memory store that survives across sessions. When you tell the agent a preference once ("always use pnpm," "deploy to staging first"), it remembers in the next session. This is different from chat history — memory is curated, factual, and stable.

3. Shared Context Stores

A shared context store like MD Vessel takes agent context further. Instead of each agent keeping its own private memory, all agents read from and write to the same shared store. What one agent learns, all agents know.

This is the "agent shared context" model — a single source of truth for every agent in your workflow.

4. Context-Aware Agent Protocols

As AI agents become more sophisticated, standardized protocols for managing context are emerging. The agent context protocol defines how agents discover, retrieve, and update their context information from a central store. MD Vessel implements this through its HTTP API and MCP (Model Context Protocol) integration.


How to Write Good Agent Context

Writing effective agent context is a skill. Here are the principles:

Be explicit. Don't assume the agent knows your conventions. Spell out the rules: "We use kebab-case for filenames," "Tests go next to the source file, not in a separate directory."

Be structured. Use headings, lists, and code blocks. Agents parse structure better than prose. A well-organized markdown file is easier for the agent to reference.

Be specific to the task. General context ("we're a software company") is less useful than specific context ("the login module uses NextAuth with a custom database adapter").

Keep it current. Outdated context is worse than no context — it misleads the agent. Review and update your context files regularly.

Make it discoverable. Store your context files where agents can find them. A dedicated folder, a shared repository, or a context store like MD Vessel.


Agent Context vs. Agent Memory

These two concepts are often confused, but they serve different purposes:

Agent ContextAgent Memory
ScopeShared across agentsPer-agent / per-session
ContentsProject rules, conventions, instructionsFacts, preferences, past decisions
PersistenceLong-lived, curatedAuto-generated, can expire
StorageFiles (markdown)Database (key-value)
UpdateManual or via workflowAutomatic (agent writes as it works)

Both are important. Context tells the agent how to behave; memory tells it what happened. A markdown memory agent uses markdown files to store both — making its memory as readable and shareable as its context.


Getting Started with Agent Context

Step 1: Create your first context file

Start with a project-level context file. The format depends on your preferred agent, but the content is the same:

# agent-context.md

## Project Overview
- Name: My App
- Stack: Next.js 14, PostgreSQL, Prisma
- Hosting: Vercel (production), Railway (staging)

## Code Conventions
- Use TypeScript strictly — no `any`
- Components go in /components/ui/
- API routes in /app/api/
- Tests alongside source files with .test.ts extension

## Git Rules
- Branch convention: feat/, fix/, chore/, refactor/
- Commit style: conventional commits
- PRs require 1 approval

## Deployment
- Production: `git push main` triggers Vercel deploy
- Staging: auto-deployed from develop branch
- Migrations: run `npx prisma migrate deploy` after deploy

Step 2: Point your agent to it

  • Claude Code: Save as CLAUDE.md in the project root
  • Hermes Agent: Save as a SKILL.md in ~/.hermes/skills/
  • Cursor: Save as .cursorrules or use .cursor/rules/*.mdc
  • Any agent: Store in MD Vessel and connect via API

Step 3: Build a shared context store

For teams and multi-agent workflows, a shared context store is essential. MD Vessel provides:

  • A central repository for all your agent context files
  • API access for any agent to read and write context
  • Version tracking so you know what changed
  • Search and discovery to find the right context file fast
# Store an agent context file via MD Vessel API
curl -X POST https://www.md-vessel.com/api/v1/files \
  -H "Authorization: Bearer md_..." \
  -H "Content-Type: text/markdown" \
  -d '# deploy-guide.md

## Production Deploy
1. Run tests: npm run test
2. Build: npm run build
3. Deploy: npx vercel --prod
4. Smoke test the production URL'

FAQ

What is a context-aware AI agent? A context-aware AI agent automatically reads and applies context information — project files, configuration, and instructions — without being told to. It knows to check for rules before writing code.

What is agent shared context? Agent shared context means multiple agents read from and write to the same context store. What one agent learns — deployment steps, code conventions, API usage patterns — is immediately available to every other agent.

What is a context memory agent? A context memory agent combines context (how to behave) with memory (what happened) in a single system. By storing both as markdown files, it makes its knowledge readable, shareable, and versionable.


Related