{"id":51702379,"url":"https://github.com/reaatech/faas-hot-runtime","last_synced_at":"2026-07-16T12:31:03.692Z","repository":{"id":354540470,"uuid":"1215176370","full_name":"reaatech/faas-hot-runtime","owner":"reaatech","description":"Minimal open-source FaaS runtime on EKS — warm pod pool, sub-100ms invoke, HTTP + queue triggers, OTel built in. Lambda without cold starts. Based on the pattern from a production agentic AI platform.","archived":false,"fork":false,"pushed_at":"2026-06-15T14:19:09.000Z","size":609,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-15T16:13:38.962Z","etag":null,"topics":["agentic-ai","aws","cold-start","container-orchestration","eks","faas","function-as-a-service","kubernetes","lambda-alternative","microservices","opentelemetry","runtime","serverless","typescript","warm-pods"],"latest_commit_sha":null,"homepage":"https://reaatech.com/products/deployment-runtime/faas-hot-runtime","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reaatech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-04-19T15:25:17.000Z","updated_at":"2026-06-08T14:39:22.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/reaatech/faas-hot-runtime","commit_stats":null,"previous_names":["reaatech/faas-hot-runtime"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/reaatech/faas-hot-runtime","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reaatech%2Ffaas-hot-runtime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reaatech%2Ffaas-hot-runtime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reaatech%2Ffaas-hot-runtime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reaatech%2Ffaas-hot-runtime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reaatech","download_url":"https://codeload.github.com/reaatech/faas-hot-runtime/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reaatech%2Ffaas-hot-runtime/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35544514,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-16T02:00:06.687Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic-ai","aws","cold-start","container-orchestration","eks","faas","function-as-a-service","kubernetes","lambda-alternative","microservices","opentelemetry","runtime","serverless","typescript","warm-pods"],"created_at":"2026-07-16T12:31:03.154Z","updated_at":"2026-07-16T12:31:03.686Z","avatar_url":"https://github.com/reaatech.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# faas-hot-runtime\n\n**Lambda without cold starts, exposed as MCP tools for AI agents.**\n\nMCP-native FaaS runtime with warm pod pools for sub-100ms invocations. Functions are exposed as MCP tools — point an AI agent at the MCP endpoint and your functions become callable tools. Supports HTTP and queue triggers (SQS primary, Pub/Sub secondary), built on EKS with multi-K8s support, and includes comprehensive OpenTelemetry observability and cost tracking.\n\n## Features\n\n- **Sub-100ms Invocation** — Warm pool eliminates cold starts\n- **MCP-Native** — Functions are MCP tools first, HTTP endpoints second\n- **Cost Transparency** — Every invocation's cost is tracked and reportable\n- **Observability Built-In** — OpenTelemetry tracing for every invocation\n- **Multi-Cloud Kubernetes** — Works on EKS, GKE, AKS with minimal changes\n- **Zero-Downtime Updates** — Hot-reload function definitions without service interruption\n\n## Quick Start\n\n### Prerequisites\n\n- Node.js 22+\n- Kubernetes cluster (EKS, GKE, AKS, or local k3d/minikube)\n- Docker\n\n### Installation\n\n```bash\n# Install from npm\nnpm install faas-hot-runtime\n\n# Or clone and build from source\ngit clone https://github.com/reaatech/faas-hot-runtime.git\ncd faas-hot-runtime\nnpm install\nnpm run build\n```\n\n### Local Development\n\n```bash\n# Set up environment\ncp .env.example .env\n# Edit .env with your configuration\n\n# Start the development server\nnpm run dev\n\n# Or use the CLI\nnpx faas-hot-runtime start --port 8080 --config-dir ./config/functions\n```\n\n### Define a Function\n\nCreate a function definition in `config/functions/hello-world.yaml`:\n\n```yaml\nname: hello-world\ndescription: Simple greeting function\nversion: 1.0.0\n\ncontainer:\n  image: myregistry/hello-world:latest\n  port: 8080\n  resources:\n    cpu: 100m\n    memory: 128Mi\n\npool:\n  min_size: 2\n  max_size: 10\n  target_utilization: 0.7\n  warm_up_time_seconds: 30\n\ntriggers:\n  - type: http\n    path: /hello\n    methods: [GET, POST]\n\nmcp:\n  enabled: true\n  tool_name: hello_world\n  description: Generate a greeting message\n  input_schema:\n    type: object\n    properties:\n      name:\n        type: string\n        description: Name to greet\n    required: [name]\n\ncost:\n  budget_daily: 10.00\n  cost_per_invocation_estimate: 0.0001\n\nobservability:\n  tracing_enabled: true\n  metrics_enabled: true\n  log_level: info\n```\n\n### Invoke via MCP\n\nPoint your AI agent at the MCP endpoint:\n\n```bash\n# The MCP server exposes functions as tools\ncurl -H \"X-API-Key: your-api-key\" \\\n  -X POST http://localhost:8080/mcp \\\n  -d '{\"jsonrpc\":\"2.0\",\"method\":\"tools/list\"}'\n```\n\n### Invoke via HTTP\n\n```bash\ncurl -X POST http://localhost:8080/hello \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\": \"World\"}'\n```\n\n## CLI Commands\n\n```bash\n# Start the runtime server\nfaas-hot-runtime start --port 8080 --config-dir ./config/functions\n\n# Invoke a function directly\nfaas-hot-runtime invoke hello-world --args '{\"name\":\"World\"}'\n\n# List all registered functions\nfaas-hot-runtime list\n\n# Stream function logs\nfaas-hot-runtime logs hello-world --follow\n\n# Show function metrics\nfaas-hot-runtime metrics hello-world --period 1h\n\n# Show cost breakdown\nfaas-hot-runtime cost --period 1d\n\n# Validate function configurations\nfaas-hot-runtime validate --config-dir ./config/functions\n```\n\n## Architecture\n\n```\n┌─────────────────┐     ┌──────────────────┐     ┌─────────────────┐\n│   AI Client     │────▶│  faas-hot-runtime │────▶│  Function Pods  │\n│  (Claude, etc)  │     │   (MCP Server)    │     │  (Warm Pool)    │\n└─────────────────┘     └──────────────────┘     └─────────────────┘\n                                │\n                                ▼\n                       ┌──────────────────┐\n                       │  Function        │\n                       │  Registry        │\n                       │  (YAML configs)  │\n                       └──────────────────┘\n```\n\n### Components\n\n| Component | Description |\n|-----------|-------------|\n| **MCP Server** | Exposes functions as MCP tools |\n| **Function Registry** | YAML-based function definitions with hot-reload |\n| **Warm Pool Manager** | Pre-warmed pods for sub-100ms invoke |\n| **Invocation Engine** | Routes requests to available pods |\n| **Trigger Handlers** | HTTP, SQS, Pub/Sub event handling |\n| **Cost Tracker** | Per-invocation cost accounting |\n\n## Configuration\n\n### Environment Variables\n\n| Variable | Description | Default |\n|----------|-------------|---------|\n| `MCP_PORT` | Port for MCP server | `8080` |\n| `MCP_HOST` | Host for MCP server | `0.0.0.0` |\n| `API_KEY` | API key for authentication | - |\n| `LOG_LEVEL` | Log level (debug, info, warn, error) | `info` |\n| `OTEL_EXPORTER_OTLP_ENDPOINT` | OTLP endpoint for tracing | - |\n\n### Function YAML Schema\n\nSee [AGENTS.md](./AGENTS.md) for the complete function YAML schema reference.\n\n## Observability\n\nThe runtime emits OpenTelemetry traces and metrics:\n\n### Traces\n\n- `faas.invoke` — Full invocation trace\n- `pool.select` — Pod selection trace\n- `function.execute` — Function execution trace\n- `cost.calculate` — Cost calculation trace\n\n### Metrics\n\n- `faas.invocations.total` — Total invocations\n- `faas.invocations.duration_ms` — Invocation latency\n- `faas.cold_starts.total` — Cold start count\n- `faas.pool.utilization` — Pool utilization\n- `faas.cost.total` — Total cost\n\n## Cost Management\n\nEvery invocation includes cost metadata:\n\n```json\n{\n  \"result\": {\n    \"content\": [...],\n    \"metadata\": {\n      \"cost_usd\": 0.000123,\n      \"cost_breakdown\": {\n        \"compute\": 0.000100,\n        \"network\": 0.000015,\n        \"queue\": 0.000008\n      }\n    }\n  }\n}\n```\n\nBudget limits can be configured per-function or globally.\n\n## Security\n\n- **API Key Authentication** — All MCP endpoints require authentication\n- **Input Validation** — JSON Schema validation for all inputs\n- **Rate Limiting** — Per-client rate limits to prevent abuse\n- **Pod Isolation** — Functions run in isolated pods with network policies\n\n## Documentation\n\n- [AGENTS.md](./AGENTS.md) — Agent development guide\n- [ARCHITECTURE.md](./ARCHITECTURE.md) — System design deep dive\n- [DEV_PLAN.md](./DEV_PLAN.md) — Development checklist\n- [skills/](./skills/) — Skill definitions for AI agents\n\n## Contributing\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md) for contribution guidelines.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freaatech%2Ffaas-hot-runtime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freaatech%2Ffaas-hot-runtime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freaatech%2Ffaas-hot-runtime/lists"}