Prompt
I need to build an agent that can read docs, query a database, and create tickets, what stack should I use?
Latest observation
Nov 20, 2026
OpenAI APIWeb search: off
A good stack for this kind of agent is:
Recommended architecture
1) Agent orchestration
Use one of:
- LangGraph if you want a robust, stateful agent with tool use and multi-step workflows
- OpenAI Responses API / Agents SDK if you want the simplest path with strong tool calling
- LlamaIndex if document retrieval is the core of the system
My default recommendation:
- OpenAI Responses API + LangGraph if you expect the agent to branch, retry, or need human approval steps.
2) Document ingestion / search
Use:
- Postgres + pgvector for smaller to medium-scale RAG systems
- Pinecone / Weaviate / Milvus if you need a managed or larger-scale vector store
- LlamaIndex or LangChain loaders for parsing PDFs, docs, HTML, Confluence, Google Drive, etc.
For many teams, Postgres + pgvector is enough and keeps the stack simpler.
3) Database querying
- Use a normal backend service layer rather than letting the agent hit the DB directly
- Expose only approved query tools, e.g.:
run_customer_lookupget_order_statusfetch_account_summary
If you need ad hoc SQL, use a read-only DB user and strict query validation.
4) Ticket creation
Depends on your ticketing system:
- Jira API
- ServiceNow API
- Zendesk API
- Linear API
- GitHub Issues API
Wrap these in tools with validation and idempotency keys.
5) Backend service
Use:
- Python + FastAPI for fastest agent backend development
- Node.js + NestJS/Express if your team is TypeScript-heavy
Default recommendation: Python + FastAPI.
6) Storage / workflow state
- Postgres for conversation state, audit logs, job status, and ticket mappings
- Redis for short-lived queues, caching, or background jobs
7) Async / background processing
- Celery + Redis or RQ in Python
- BullMQ if using Node.js
8) Authentication / permissions
- OAuth for enterprise systems
- Service accounts for DB and ticketing tools
- Role-based access controls so the agent can only do what the user is allowed to do
9) Observability
Use:
- OpenTelemetry
- LangSmith or OpenAI tracing/tools
- Structured logs in Datadog / Grafana / ELK
This is critical because agents can fail in subtle ways.
A practical “best default” stack
If you want something modern and production-friendly:
- Python
- FastAPI
- OpenAI Responses API
- LangGraph
- Postgres + pgvector
- Redis
- Jira/ServiceNow/Zendesk API wrappers
- OpenTelemetry + Datadog
- Docker + Kubernetes if you need scale
If you want the simplest MVP
Use:
- OpenAI Responses API
- FastAPI
- Postgres + pgvector
- One ticketing API
- A few strict tools
- No framework-heavy orchestration at first
This gets you to production faster and avoids overengineering.
Key design advice
For an agent that reads docs, queries DBs, and creates tickets:
- Keep tools narrow and explicit
- Don’t let the model write raw SQL or create tickets without validation
- Add a human approval step for ticket creation at first
- Log every tool call and result
- Use retrieval + structured tools, not “one giant prompt”
My recommendation by stage
MVP
- OpenAI Responses API
- FastAPI
- Postgres + pgvector
- Jira/ServiceNow tool wrapper
Production
- LangGraph for orchestration
- FastAPI
- Postgres + pgvector
- Redis
- OpenTelemetry
- Strong auth and approval workflows
Enterprise scale
- Kubernetes
- Dedicated workflow engine if needed
- Strict IAM, audit trails, multi-tenant separation
- Managed vector DB if retrieval load is high
If you want, I can also suggest:
- a Python-only stack,
- a TypeScript stack, or
- a reference architecture diagram for this agent.