Understanding SkyAIApp
Deep dive into SkyAIApp's core concepts to build efficient, reliable AI applications.
What is SkyAIApp?
SkyAIApp is an AI orchestration platform that helps developers build, deploy, and scale production-grade AI applications through intelligent routing, agent runtime, and enterprise-grade security controls.
Smart Routing
Smart Routing is the core capability of SkyAIApp. It automatically selects the optimal AI model to handle requests based on your goals (cost, quality, stability) and strategies.
How it works
- 1Analyze request features: complexity, length, type
- 2Evaluate available models: performance, cost, availability
- 3Apply optimization strategy: balance metrics based on goal
- 4Intelligent fallback: auto-switch when primary model unavailable
- 5Continuous learning: optimize based on historical data
// Simple routing example
const response = await sky.route({
goal: "cost", // Optimize for cost
strategy: "balanced", // Balanced strategy
messages: [...],
// Optional: Manual fallback chain
fallback: {
models: ["gpt-5.2-instant", "claude-haiku-4.5"],
maxRetries: 3
}
});Optimization Goals
Minimize API call costs. Ideal for large-scale batch processing and simple queries.
Use cases:
Pursue highest output quality. Ideal for complex reasoning and creative generation.
Use cases:
Ensure service reliability and consistency. Ideal for production and critical business scenarios.
Use cases:
Routing Strategies
Strategies define how to balance different metrics under a given goal.
balancedBalanced
Balance between cost, quality, and latency
cost-optimizedCost-Optimized
Aggressively minimize cost, may sacrifice some quality
quality-firstQuality-First
Prioritize most powerful models
latency-optimizedLatency-Optimized
Choose fastest responding models
💡 Tip: You can use custom strategies or create strategy templates in the dashboard. Learn more →
Agent Runtime
Agent Runtime enables you to build AI agents that can execute multi-step tasks, use tools, and make autonomous decisions.
Key Features
Tool Calling
Integrate external APIs, databases, search engines
Multi-step Reasoning
Auto-plan and execute complex tasks
Sandbox Execution
Safely isolated code execution
State Management
Maintain context across steps
const agent = sky.createAgent({
tools: ["web_search", "calculator", "code_exec"],
maxSteps: 10,
onStep: (step) => {
console.log(`${step.number}. ${step.action}`);
}
});
const result = await agent.run({
task: "Find Bitcoin price and calculate 10% commission"
});Enterprise Guardrails
Built-in security mechanisms to protect your applications from harmful content, privacy leaks, and other risks.
PII Filtering
Auto-detect and handle personally identifiable information
Supports: Email, phone, SSN, credit cards, etc.
Content Moderation
Filter harmful, inappropriate, or policy-violating content
Supports: Hate speech, violence, sexual content, etc.
Topic Filtering
Restrict discussions on specific topics or domains
Supports: Illegal activities, weapons, adult content, etc.
Semantic Caching
Semantic caching not only matches identical queries but also recognizes semantically similar requests, dramatically improving cache hit rates.
Traditional Caching
✓ "What is AI?"
✗ "What's artificial intelligence?"
✗ "Explain AI to me"
Semantic Caching
✓ "What is AI?"
✓ "What's artificial intelligence?"
✓ "Explain AI to me"
Significant Cost Reduction
Average 34% cache hit rate, saving 30-40% on API call costs.
const response = await sky.route({
goal: "cost",
messages: [...],
cache: true, // Enable semantic caching
});
// Check cache hit
console.log("Cache hit:", response.routing.cache_hit);Next Steps
Now that you understand the core concepts, you can start building your first AI application.
Was this page helpful?
Let us know how we can improve