FOUNDATIONS · 4 MIN READ
A map of the agent development stack
Understand the responsibilities before choosing product names.
Jump to a section 6 sections
EXAMPLE USE CASE
Select a minimal stack for a policy-answering assistant
A developer needs document retrieval and grounded answers without adding every product in the ecosystem.
- Input
- Approved policy documents, authenticated users, a query and a requirement to return source IDs.
- Expected output
- An owned application layer, one agent SDK, one retrieval store, source parsing, traces and an evaluation gate.
- Success check: Every selected component has a named responsibility and an integration example; existing infrastructure is reused where it meets the task.
- Try a failure: If the policies can be answered by one database query, compare that simpler application before adding an agent loop.
Example scope: A reference architecture and selection guide. The linked pages contain the actual installation and integration code.
Authenticate the caller and define which business operations are permitted.
Choose an execution abstraction and make its tool, state, and stopping behavior explicit.
invokeTo 03 · Models + toolsModels select actions; services enforce and execute the operations.
evidenceTo 06 · Evaluation + telemetryKeep authoritative records distinct from derived search indexes and recalled preferences.
contextBack to 02 · Agent SDKChoose process, container, or sandbox boundaries, network policy, and task lifetime.
enforceBack to 03 · Models + toolsMeasure task completion and record enough redacted evidence to explain failures.
Result or stopping point
Choose an execution abstraction and make its tool, state, and stopping behavior explicit.
Worked stack: answer a returns-policy question
- User task: “Can I return this after 20 days?” The answer must come from the authorized store’s current policy and preserve its source ID.
- Ingestion: Docling or Unstructured turns an approved document into text. Keep the source identifier, policy version and tenant on every chunk.
- Retrieval: Qdrant or pgvector selects authorized evidence. A vector result is an input to the answer, not proof that the answer is correct.
- Agent: LangChain or OpenAI Agents SDK calls retrieval only when necessary and returns the policy with its source.
- Operations: OpenTelemetry or Langfuse captures the path; Giskard or Ragas checks known questions and unsupported claims.
Assign each component one job
{
"application": "authentication, tenant scope, tool authorization",
"parsing": "documents → text + source IDs",
"retrieval": "query + tenant → ranked authorized evidence",
"agent": "question + evidence → answer + sources",
"memory": "only selected preferences needed on a later visit",
"evaluation": "fixtures + actual behavior → pass/block",
"runtime": "process lifetime, secrets, retries and resource limits"
}Reuse existing infrastructure deliberately
- Already using PostgreSQL? Try pgvector before operating another database. Need a dedicated retrieval service? Compare the same corpus and filters in Qdrant, Pinecone or another candidate.
- A one-shot fact lookup may need only an authenticated query and a template. Add model-directed tool selection only when the task has variable paths.
- Add long-term memory when a later interaction benefits from a retained fact or preference. Conversation history alone is not a retention policy.
Build in this order
- First: one authorized record lookup with a reliable missing-data result.
- Second: an SDK example that calls that lookup and reports evidence.
- Third: source parsing and retrieval, with a fixed evaluation set.
- Fourth: tracing, budgets and restart behavior. Add more components only when a measured failure requires them.