Learning Center/Foundations

Anatomy of an AI agent

Every AI product is built from the same few parts. Take one apart, layer by layer, and see which layers are yours to build.

The application is where the human interacts with the agent.

Hover an app to learn about it. Click any app to see the agent inside.

Read the stack as text

Application

The application is where the human interacts with the agent.

Assistants: ChatGPT, Claude, Gemini, Grok, Perplexity, Copilot, Meta AI, Le Chat, DeepSeek, Kimi, Poe, Gist, Character.AI.

Coding agents: Claude Code, Codex, GitHub Copilot, Cursor, Windsurf, Devin, Gemini CLI, Replit Agent, Lovable, Bolt, v0, Amazon Q Developer.

Work and enterprise: Microsoft 365 Copilot, Gemini Enterprise, Agentforce, Glean, Notion AI, ServiceNow AI Agents, Sierra, Decagon, Harvey, Writer.

Research and scholarly AI: OpenEvidence, NotebookLM, Elicit, Consensus, Deep research in ChatGPT, You.com, Scopus AI, Web of Science Research Assistant.

The agent

Agents have four primary parts that make them work.

LLM

The LLM is the brain of the agent.

Inference and hosting: Amazon Bedrock, Azure AI Foundry, Vertex AI, Together AI, Fireworks AI, Groq, Cerebras, Replicate, Hugging Face, OpenRouter, Ollama, vLLM, Baseten, Modal.

Frontier models

Frontier models are the most capable, and kept private by the labs that build them.

  • Claude: Anthropic’s models, known for careful reasoning, writing, and long documents.
  • GPT: OpenAI’s models, the ones behind ChatGPT.
  • Gemini: Google DeepMind’s models, built into Google’s products.
  • Grok: xAI’s models, built into X.

Frontier models: Claude, GPT, Gemini, Grok, Amazon Nova, Command, Mistral Large.

Open-weight models

Open-weight models can be downloaded, run, and changed by anyone.

  • Llama: Meta’s open-weight family, one of the most widely used.
  • Mistral: A French lab that publishes efficient open-weight models.
  • DeepSeek: A Chinese lab whose open models rival the frontier at low cost.
  • Qwen: Alibaba’s open-weight family, strong in many languages.
  • Gemma: Google’s small open-weight models, light enough to run almost anywhere.
  • gpt-oss: OpenAI’s open-weight models.

Open-weight models: Llama, Mistral, DeepSeek, Qwen, Gemma, gpt-oss, Phi, Kimi K2, GLM, Nemotron, OLMo.

Data licensing

Data licensing is how a model gets permission to learn from content.

Data licensing: CCC AI licensing, Created by Humans.

Harness

The harness is the program that runs the agent and keeps it on task.

Agent-building platforms: AgentKit, Copilot Studio, Bedrock AgentCore, Vertex AI Agent Builder, Agentforce, n8n, Zapier Agents, Relevance AI, Dify, Flowise.

Instructions

Instructions are the standing orders the model reads first.

  • System prompt: Who the agent is and what it is for, read before every task.
  • Voice and tone: How it sounds, so every answer feels like your brand.
  • Do and don’t: House standards the model should follow.
  • Worked examples: A few model answers that show exactly what good looks like.

Prompt management: PromptLayer, Vellum, Agenta, LangSmith Prompt Hub.

The loop

The loop is how the agent works through a job, step by step.

  • Think, act, check: The everyday loop: reason about the next step, take it, look at the result, and repeat. Use it when: A reader asks an open question, and the agent has to look around before it can answer.
  • Step by step: A fixed sequence of steps, with a check between them that can stop the run early. Use it when: Turning every new chapter into a summary, then a quiz, the same way each time.
  • Routing: Sort the request first, then send it down the path built for that kind of request. Use it when: One help desk that sends recipe questions, order problems, and rights requests to different handlers.
  • In parallel: Split the job into parts, work on them at the same time, then combine the results. Use it when: Reviewing a long manuscript: every chapter is checked at once, then the notes are combined.
  • Manager and helpers: One agent breaks the job down, hands pieces to helper agents, and assembles their work. Use it when: Building a reading list: the manager picks the topics and sends a helper to research each one.
  • Draft and critique: One agent writes; another reviews against the standards and sends notes until it passes. Use it when: Writing back-cover copy that must match house style; the reviewer sends it back until it does.
  • Plan, then do: Write the whole plan first, work through it, and re-plan when something changes. Use it when: Assembling a course pack: plan the chapters, gather each one, and re-plan if a title is unavailable.
  • Ask a person: Pause at the moments that matter and let a person approve before acting. Use it when: Anything that spends money or grants rights, such as approving a permissions request.

Evaluation and monitoring: LangSmith, Langfuse, Braintrust, Arize, Weave, Patronus AI, Galileo.

Rules

Rules are hard limits the model cannot talk its way past.

Guardrails and safety: Guardrails AI, NeMo Guardrails, Llama Guard, Lakera, LLM Guard.

Open-source harnesses

Open-source harnesses give you a head start on building your own.

  • LangGraph: Build an agent as a graph of steps you control, from LangChain.
  • OpenAI Agents SDK: OpenAI’s open-source kit for agents and hand-offs between them.
  • Claude Agent SDK: The harness behind Claude Code, open for you to build your own agents on.
  • Google ADK: Google’s open-source Agent Development Kit.
  • CrewAI: Teams of agents with roles that work together on a job.
  • Mastra: A TypeScript framework for agents and workflows.
  • AutoGen: Microsoft’s open-source framework for agents that talk to each other.
  • smolagents: Hugging Face’s small, simple library for agents that write code.

Open-source harnesses: LangGraph, OpenAI Agents SDK, Claude Agent SDK, Google ADK, CrewAI, Mastra, AutoGen, Semantic Kernel, smolagents, LlamaIndex, Pydantic AI, AI SDK, Haystack, DSPy, Agno.

Tools and data

Tools and data give the agent what the LLM doesn’t have: fresh information, your content, and the ability to act.

Connectors (MCP)

Connectors plug the agent into outside tools and content through one standard: MCP.

MCP gateways and registries: MCP Registry, Smithery, Composio, Pipedream MCP, Zapier MCP, Remote MCP on Workers.

Content and research connectors: Scite, Dimensions, Semantic Scholar, JSTOR, Scholar Gateway, Silverchair.

Cashmere Connect

Cashmere Connect is the platform publishers launch their own MCP connectors on.

  • Launch your own server: Your own branded MCP server, live without building or running any infrastructure.
  • Ingestion: Works with every format you publish in.
  • Normalization: Everything is converted to Omnipub, one clean format that agents can read and cite.
  • Powerful MCP tools: Search, deep research, and more, ready for any agent to call.
  • Subscriptions: Sell access to readers, teams, and AI companies, plan by plan.
  • Publisher controls: Licensing, entitlements, and rights in one place: what is live, for whom, and on what terms.
  • Auth and security: Sign-in for people and agents, and every request checked against the license.
  • Detailed reporting: Every search, passage, and citation counted, down to the title.

Publisher MCP engines: Cashmere Connect.

Other MCP servers

Thousands of systems already have an MCP server.

  • GitHub: Lets an agent read code, issues, and pull requests.
  • Google Drive: Lets an agent find and read your documents.
  • Notion: Lets an agent search and update team notes and wikis.
  • Slack: Lets an agent read and post team messages.
  • Figma: Lets an agent read designs and their details.
  • Stripe: Lets an agent look up payments and customers.
  • Scholar Gateway: Wiley’s connector to its scholarly content.
  • Scite: Lets an agent see how research papers cite each other.

MCP servers: GitHub, Google Drive, Slack, Stripe, Notion, Jira and Confluence, Linear, Sentry, Figma, Shopify, Supabase, HubSpot, Box.

Licensed content

Licensed content gives an agent access to publisher content on the publisher’s terms, whatever it is used for.

  • Cashmere Fiber: The license-aware AI search gateway: get discovered by AI, without giving up control.
  • TollBit: Agents pay a toll to fetch a publisher’s pages.
  • Pay per crawl: Cloudflare charges AI crawlers to fetch the sites it serves.

Licensed content: Cashmere Fiber, TollBit, Pay per crawl.

Memory

Memory is what the agent knows about this job, and the last one.

  • Conversation: Everything said so far in this chat, sent back to the model each turn.
  • Long-term memory: Facts it keeps about you between conversations.
  • Knowledge base: Your own documents, searched for the passages that matter right now.
  • Working notes: A scratchpad the agent writes to while it works through a long job.
  • Context window: How much the model can hold at once. Anything beyond it must be fetched again.

Memory and vector stores: Pinecone, Weaviate, Qdrant, Chroma, Milvus, Atlas Vector Search, pgvector, Mem0, Zep, Letta.

Built-in tools

Built-in tools come with the harness: the agent can use them without any setup.

  • Web search: Look up what is happening now, beyond what the model learned in training.
  • Web browsing: Open a page, read it, click through, and fill in forms.
  • Code: Run code to calculate, analyze data, or draw a chart.
  • Files: Read the PDFs, spreadsheets, and documents you hand it.
  • Computer use: Use a screen, keyboard, and mouse the way a person would.
  • Images: Create or edit pictures from a description.

Search and browsing: Tavily, Exa, Brave Search API, Sonar API, SerpApi, Firecrawl, Jina Reader, Browserbase, Browser Use.

Code sandboxes: E2B, Daytona, Modal Sandboxes.

Objective

The objective is the job, and what done looks like.

Need Help Applying This to Your Catalog, Contracts, or AI Roadmap?

Our team works with publishers to navigate AI strategy, licensing, and implementation.

Talk to Us