12-factor-agents/content/factor-03-own-your-context-window.md at main · humanlayer/12-factor-agents
What are the principles we can use to build LLM-powered software that is actually good enough to put in the hands of production customers? - humanlayer/12-factor-agents
← Back to README 3. Own your context window You don't necessarily need to use standard message-based formats for conveying context to an LLM. At any given point, your input to an LLM in an agent is "here's what's happened so far, what's the next step" Everything is context engineering. LLMs are stateless functions that turn inputs into outputs. To get the best outputs, you need to give them the best inputs. Creating great context means: The prompt and instructions you give to the model Any documents or external data you retrieve (e.g. RAG) Any past state, tool calls, results, or other history
related reading
- Effective context engineering for AI agents \ Anthropicanthropic.com
- LLM Powered Autonomous Agents | Lil'Loglilianweng.github.io
- LangChain: the open agent platform to own your intelligencelangchain.com
- How Long Contexts Faildbreunig.com
- Cookbookcookbook.openai.com
- Contextcontext.ai
- GitHub - brexhq/prompt-engineering: Tips and tricks for working with Large Language Models like OpenAI's GPT-4.github.com
- GitHub - muratcankoylan/Agent-Skills-for-Context-Engineering: A comprehensive collection of Agent Skills for context engineering, multi-agent architectures, and production agent systems. Use when building, optimizing, or debugging agent sysgithub.com
- Building reliable AI agents · parth sareenparthsareen.com
- Prompting best practicesdocs.anthropic.com
- Context Engineering for AI Agents: Lessons from Building Manusmanus.im
- GitHub - emcie-co/parlant: Build reliable customer-facing AI agents with Parlant: an interaction control harness optimized for controlled, consistent, and predictable LLM interactions.github.com