AI Service
Build intelligent, project-aware AI features with the Codmir AI Service. Powered by knowledge bases generated from your codebase.
15+ min
Stream duration
RAG
Context retrieval
Multi-model
OpenAI & Anthropic
Quick Start
Get started with the AI service in under 5 minutes.
Chat API
Send messages and stream AI responses with project context.
Knowledge Base
Generate and query project knowledge for context-aware AI.
Tasks API
Dispatch long-running analysis and indexing tasks.
Client SDK
Use the React hooks and client library for easy integration.
Architecture
Understand how AI and Agent services work together.
Quick Example
import { useAIChat } from '@/hooks/use-ai-chat'
function ProjectChat({ projectId }) {
const { messages, sendMessage, isStreaming } = useAIChat({
projectId,
provider: 'openai',
model: 'gpt-5',
})
return (
<div>
{messages.map(m => <Message key={m.id} {...m} />)}
<input onSubmit={e => sendMessage(e.target.value)} />
</div>
)
}