Download README.md from Kyrlos11/nniback: direct link, hf CLI and curl.
- Browser
- Download file 4.9 kB
-
https://huggingface.co/spaces/Kyrlos11/nniback/resolve/main/README.md
- Command line
-
hf download hf://spaces/Kyrlos11/nniback/README.md
-
curl -L -o README.md https://huggingface.co/spaces/Kyrlos11/nniback/resolve/main/README.md
title: Kortix Backend API
emoji: ๐ค
colorFrom: blue
colorTo: purple
sdk: docker
pinned: false
license: apache-2.0
Kortix Backend API ๐
Backend API ูู ูุตุฉ Kortix - ู ูุตุฉ ู ุชูุงู ูุฉ ูุจูุงุก ูุฅุฏุงุฑุฉ AI Agents ุงูู ุณุชููุฉ.
๐ ุงูู ู ูุฒุงุช
- โ FastAPI Backend - API ุณุฑูุน ููุนุงู
- โ Multi-LLM Support - ุฏุนู Anthropic Claude, OpenAI, ูุบูุฑูุง
- โ Agent Management - ุฅุฏุงุฑุฉ ู ุชูุฏู ุฉ ููู AI Agents
- โ Thread Management - ุฅุฏุงุฑุฉ ุงูู ุญุงุฏุซุงุช ูุงูู sessions
- โ Supabase Integration - ูุงุนุฏุฉ ุจูุงูุงุช ูุชูุซูู ู ุชูุงู ู
- โ Background Tasks - ู ุนุงูุฌุฉ ุงูู ูุงู ูู ุงูุฎูููุฉ
- โ Tool Integration - ุฏุนู ุฃุฏูุงุช ู ุชุนุฏุฏุฉ ููู agents
๐ง Environment Variables ุงูู ุทููุจุฉ
ูุจู ุชุดุบูู ุงูู Spaceุ ุฃุถู ูุฐู ุงูู ุชุบูุฑุงุช ูู Settings โ Secrets:
Required (ู ุทููุจ):
# LLM Provider (ูุงุญุฏ ุนูู ุงูุฃูู)
ANTHROPIC_API_KEY=sk-ant-xxxxx
# Supabase Configuration
SUPABASE_URL=https://xxxxx.supabase.co
SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIs...
SUPABASE_SERVICE_KEY=eyJhbGciOiJIUzI1NiIs...
# Environment
ENVIRONMENT=production
Optional (ุงุฎุชูุงุฑู):
# Additional LLM Providers
OPENAI_API_KEY=sk-xxxxx
# Redis for Caching
REDIS_URL=redis://your-redis-url:6379
# Search APIs
TAVILY_API_KEY=tvly-xxxxx
FIRECRAWL_API_KEY=fc-xxxxx
# Logging
LOG_LEVEL=INFO
๐ ููููุฉ ุงูุงุณุชุฎุฏุงู
1. ุงููุตูู ููู API
ุจุนุฏ ุชุดุบูู ุงูู Spaceุ ุณูููู ุงูู API ู ุชุงุญ ุนูู:
https://YOUR_USERNAME-kortix-backend.hf.space
2. ุงูุชุญูู ู ู ุงูุตุญุฉ (Health Check)
curl https://YOUR_USERNAME-kortix-backend.hf.space/health
ุงูุฑุฏ ุงูู ุชููุน:
{
"status": "healthy",
"version": "1.0.0"
}
3. API Documentation
FastAPI ุชููุฑ documentation ุชูุงุนููุฉ ุชููุงุฆูุฉ:
- Swagger UI:
https://YOUR_USERNAME-kortix-backend.hf.space/docs - ReDoc:
https://YOUR_USERNAME-kortix-backend.hf.space/redoc
๐ API Endpoints
Core Endpoints:
GET /health- ุงูุชุญูู ู ู ุตุญุฉ ุงูู APIPOST /api/v1/agents- ุฅูุดุงุก agent ุฌุฏูุฏGET /api/v1/agents- ุนุฑุถ ุฌู ูุน ุงูู agentsPOST /api/v1/threads- ุฅูุดุงุก thread ู ุญุงุฏุซุฉ ุฌุฏูุฏPOST /api/v1/messages- ุฅุฑุณุงู ุฑุณุงูุฉ
Authentication:
ู ุนุธู endpoints ุชุญุชุงุฌ ูู JWT token ู ู Supabase:
curl -H "Authorization: Bearer YOUR_JWT_TOKEN" \
https://YOUR_USERNAME-kortix-backend.hf.space/api/v1/agents
๐๏ธ ุงูุจููุฉ ุงูุชูููุฉ
kortix-backend/
โโโ api.py # Entry point
โโโ auth/ # Authentication & authorization
โโโ core/ # Core business logic
โโโ evals/ # Evaluation & testing
โโโ scripts/ # Utility scripts
โโโ supabase/ # Database migrations & functions
โโโ tests/ # Unit & integration tests
๐ ุงูุฃู ุงู
- โ JWT Authentication ุนุจุฑ Supabase
- โ Rate limiting ููู API requests
- โ Input validation ู ุน Pydantic
- โ Environment variables ููู secrets
- โ CORS configuration
๐ ุงูู ุฑุงูุจุฉ ูุงูู Logs
ุงูู Space ูููุฑ logs ู ุจุงุดุฑุฉ ูู ุงููุงุฌูุฉ:
- Application logs
- Error tracking
- Performance metrics
โ ๏ธ ู ูุงุญุธุงุช ู ูู ุฉ
Hugging Face Free Tier:
- ู ูุงุฑุฏ ู ุญุฏูุฏุฉ (CPU)
- ูุฏ ุชุญุชุงุฌ ูู upgrade ููุฃุฏุงุก ุงูุฃูุถู
Cold Start:
- ุฃูู request ูุฏ ูุฃุฎุฐ ููุช ุฃุทูู
- ุจุนุฏ ุฐูู ุงูุณุฑุนุฉ ุชุชุญุณู
Persistence:
- ุงูุจูุงูุงุช ู ุฎุฒูุฉ ูู Supabase
- ุงูู ููุงุช ุงูู ุคูุชุฉ ูุฏ ุชูุญุฐู ุนูุฏ ุฅุนุงุฏุฉ ุงูุชุดุบูู
๐ ุฑูุงุจุท ู ููุฏุฉ
๐ค ุงูู ุณุงูู ุฉ
ูุฐุง ุงูู Space ูู deployment ููู ุดุฑูุน ุงูุฃุตูู Kortix Suna.
ููู ุณุงูู ุฉ ูู ุงูู ุดุฑูุน:
- Fork ุงูู repository ุงูุฃุตูู
- ุฅูุดุงุก branch ุฌุฏูุฏ
- ุนู ู Pull Request
๐ License
Apache License 2.0 - See LICENSE
๐ ุงูุฏุนู
ูุงุฌูุช ู ุดููุฉุ
- ุชุญูู ู ู ุงูู logs ูู ุงูู Space
- ุชุฃูุฏ ู ู ุฅุถุงูุฉ ูู ุงูู Environment Variables
- ุงูุถู ูู Discord Server ููู ุณุงุนุฏุฉ
Built with โค๏ธ by the Kortix Team Deployed on ๐ค Hugging Face Spaces