Hi there,
I’m are building an AI Agent that uses skill.md files.
Each skill.md contains:
- Skill metadata
- skill_name
- description
- examples
- business domain
- tags
- Execution instructions
- SQL query itself
- Snowflake execution details
Workflow:
- User asks a question.
- LLM reviews available skill metadata.
- LLM selects the most relevant skill.
- Full skill.md is loaded.
- SQL executes on Snowflake.
- Results are returned to UI.
Requirements:
- New skills must be dynamically discoverable at runtime.
- No application redeployment when adding new skills.
- Minimize latency.
- Avoid fetching all skill files for every user request.
- Enterprise-grade architecture.
- Skills may be updated at any time.
- Skill selection must scale to hundreds or thousands of skills.(if needed)
- Agent runs in Kubernetes.
- Snowflake is the data source, skill.md files loookup is in oracle database
- MCP can be used if necessary but should not become a bottleneck.
Current Ideas:
Approach A:
- Store skills in a Git repository.
- Use MCP to fetch skills.
- Rejected due to dependency on external Git-based workflow.
Approach B:
- Store skills in oracle DB lookup tables.
- using MCP Call to Load all skills into memory during pod startup.
- LLM uses metadata to select skill.
- Full skill loaded from memory when selected.
- Problem: Pod restart required when new skills are added.
Approach C:
- Invoke MCP and fetch skills on every user request.
- Rejected due to performance and latency concerns.
Tasks:
- Design an enterprise-grade architecture for dynamic skill management.
- Explain how large-scale AI agents typically manage dynamic skills.
- Recommend:
- Skill registry design
- Metadata catalog design
- Cache strategy
- Refresh strategy
- Versioning strategy
- Skill discovery architecture
- Skill selection architecture
- MCP usage strategy
- Kubernetes deployment pattern
- Explain whether polling, event-driven refresh, or cache invalidation is best.
- Explain how new skills can become available immediately without pod restarts.
- Provide reference architecture diagrams using Mermaid.
- Provide scalability considerations for:
- 100 skills
- Describe best practices used by enterprise AI platforms.
- Provide a final recommended architecture with pros, cons, implementation steps, and operational considerations.
Tech Stack :
Python 3.13, Langchain, LangGraph, FastAPI, Pydantic V2, Angular frontend, LLM - Azure OpenAI models - Gpt - 5 - Mini