Works with the AI Agents you already use
ai integration architect
Architect, implement, and evaluate production-grade AI features, RAG pipelines, and agent workflows in any codebase.
$8.99
ai integration architect
Example session with this skill installed
Design a production-ready RAG integration for an existing TypeScript/Node.js backend.
The application serves multiple organizations, and each organization must only access its own documents.
We currently use PostgreSQL and are considering Pinecone for vector search. We want to integrate an LLM provider without tightly coupling our business logic to a specific vendor.
Analyze the requirements and propose
- The recommended architecture and component responsibilities.
- A secure multi-tenant retrieval strategy.
- The document ingestion, chunking, embedding, and retrieval workflow.
- A provider-independent AI client abstraction.
- Error handling, logging, retry strategies, and cost controls.
- A testing and evaluation strategy.
Inspect the existing project before making assumptions. Explain important trade-offs and identify security risks.
Do not invent existing files, dependencies, or implementation details. Do not modify files until you have presented the architecture and implementation plan.
- Read your context and instructions
- Compiled the ai integration architect
RAG Integration Architecture Review
- Architecture Overview
The recommended solution separates document processing, vector retrieval, and LLM generation into independent components.
Component| Responsibility| Recommended approach
Document Ingestion| Process and prepare documents| Dedicated ingestion service
Chunking| Split documents into searchable sections| Configurable chunking strategy
Embeddings| Convert text into vectors| Provider abstraction
Vector Store| Store and retrieve document embeddings| Pinecone
Retrieval Service| Retrieve relevant tenant documents| Mandatory tenant-scoped filtering
LLM Service| Generate grounded responses| Provider-independent interface
Evaluation| Measure retrieval and response quality| Automated evaluation dataset
- Security and Multi-Tenant Isolation
Every document must be associated with a trusted tenant identifier.
The tenant ID must come from the authenticated server-side context, never directly from an untrusted request parameter.
Recommended safeguards
- Apply tenant filtering to every vector search.
- Validate tenant ownership during document ingestion.
- Prevent users from modifying tenant identifiers.
- Enforce authorization before retrieving documents.
- Test cross-tenant access attempts.
- Avoid exposing sensitive document metadata in logs.
Important: Metadata filtering is one layer of isolation, not a complete security boundary. For higher-risk environments, evaluate separate indexes or namespaces, access restrictions, and additional authorization controls.
- Provider-Independent Client Design
Business logic should not depend directly on a specific AI provider.
A simplified TypeScript interface could look like this:
export interface EmbeddingProvider {
generateEmbedding(text: string): Promise<number[]>;
}
export interface VectorSearchProvider {
search(
embedding: number[],
tenantId: string,
): Promise<Array<{ content: string; score: number }>>;
}
export interface LanguageModelProvider {
generateAnswer(
question: string,
context: string[],
): Promise<string>;
}
Each provider can then have its own implementation.
This approach makes it easier to replace an LLM provider or vector database without rewriting business services.
-
Recommended Execution Flow
-
Authenticate the user.
-
Resolve the user's authorized tenant context.
-
Validate the incoming question.
-
Generate an embedding using the configured provider.
-
Search the vector database with mandatory tenant restrictions.
-
Retrieve and validate relevant document content.
-
Build a grounded prompt using the retrieved context.
-
Generate the response through the LLM abstraction.
-
Return the answer with relevant source references.
-
Record latency, token consumption, and errors without logging sensitive content.
-
Reliability and Cost Controls
Risk| Recommended mitigation
Provider downtime| Timeouts, retries with backoff, controlled fallback
Excessive token usage| Context limits and token budgets
Poor retrieval quality| Chunking experiments and retrieval evaluation
Hallucinations| Grounded prompts and source attribution
Duplicate ingestion| Document identifiers and idempotency
Unexpected expenses| Usage tracking and configurable limits
- Testing and Evaluation Strategy
Before production deployment, validate:
- Tenant isolation between different organizations.
- Embedding generation and vector retrieval.
- Empty or irrelevant retrieval results.
- Provider failures and timeout behavior.
- Malformed model responses.
- Token usage and latency.
- Retrieval relevance using a labeled evaluation dataset.
Use deterministic tests for application logic and separate evaluation datasets for model-dependent behavior.
- Implementation Roadmap
Phase| Deliverable
Phase 1| Provider interfaces and configuration
Phase 2| Document ingestion and chunking
Phase 3| Embedding generation and vector storage
Phase 4| Tenant-scoped retrieval
Phase 5| Grounded LLM response generation
Phase 6| Security tests, evaluation, and monitoring
Final Recommendation
The proposed architecture provides a modular foundation for a multi-tenant RAG system.
The most important design decision is to enforce tenant authorization throughout the entire retrieval pipeline rather than relying exclusively on vector database metadata filters.
Implementation should begin with provider abstractions and tenant isolation tests before introducing more advanced agent workflows.
Connects securely to your tools. The creator never sees your data.
About this skill
Software projects often fail during AI integration because developers bolt heavy frameworks onto fragile prototypes. This skill provides a disciplined engineering approach to adding LLM capabilities, agents, and RAG pipelines into existing codebases. It focuses on the simplest design that meets your reliability and budget requirements while maintaining your project's architectural integrity.
What it does
- Architects AI workflows by selecting the right pattern from single prompts to multi-agent loops.
- Integrates RAG pipelines covering ingestion, chunking, embedding, and grounded retrieval.
- Enforces AI security through prompt-injection defenses, tenant isolation, and least-privilege agent permissions.
- Optimizes performance by tuning token usage, latency budgets, and implementing robust retry logic with backoff.
- Validates outputs using schema-constrained JSON and structured validation to prevent downstream failures.
How it works
- Analyze the existing stack, dependency manifests, and data residency constraints to ensure compatibility.
- Design a technical brief using the ladder of complexity, starting with the simplest viable pattern.
- Implement the feature behind internal client wrappers to decouple your business logic from specific providers.
- Evaluate the integration using deterministic tests for infrastructure and labeled datasets for model behavior.
Frameworks & tools
Works with any language or framework (Python, TypeScript, Go, etc.) and any provider (OpenAI, Anthropic, LangChain, LlamaIndex). It targets specific maturity levels from prototype to production-grade services.
Why this beats prompting it yourself
Generic prompts often suggest insecure, expensive, or overly complex agent architectures that don't fit your project structure. This skill enforces senior-level engineering standards, ensuring AI features are isolated, testable, and production-ready from day one.
Use cases
- Adding tool-calling capabilities to an existing REST API.
- Building a RAG system for private documentation with specific vector store requirements.
- Converting brittle text-parsing logic into validated structured outputs.
- Reviewing an agentic workflow for security vulnerabilities and cost inefficiencies.
Known limitations
Does not perform general backend API design or non-AI database modeling. Requires the user to provide their own toolchains and provider credentials for running evaluations.
Does not perform general backend API design. Requires user-provided credentials and toolchains for evals. Cannot verify compliance claims like GDPR.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 13 days ago