Documentation
Build with Hikigai
Deploy AI agents, ship full-stack applications, and connect healthcare MCP servers — everything you need to build with the Hikigai platform.
Developer Guide
Step-by-step getting started guide
Python SDK
Complete SDK documentation
App Deployment
Deploy full-stack apps from GitHub
Platform API Reference
Platform API endpoints
Getting Started
Quick Start
- Create a Hikigai account and get your API key
- Set up Project Members and roles for collaboration
- Deploy an agent using the web wizard or API
- Invoke your agent via REST API
Hikigai provides a simple way to deploy AI agents powered by Google's ADK and Vertex AI. You can create agents using our config-based approach (no code) or upload custom Python code.
Authentication
All API requests require authentication using a Bearer token. Get your API key from the dashboard.
curl -X GET "https://api.hikigai.com/v1/agents" \
-H "Authorization: Bearer YOUR_API_KEY"Deploy an Agent
Config-Based Deployment
The easiest way to deploy an agent. Just provide a name and instruction:
curl -X POST "https://api.hikigai.com/v1/agents/deploy/config" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "my-sentiment-analyzer",
"instruction": "Analyze the sentiment of the given text and return positive, negative, or neutral with a confidence score.",
"model": "gemini-2.0-flash",
"category": "Natural Language Processing"
}'Code-Based Deployment
For custom logic, upload your agent.py file:
# agent.py
from google.adk.agents import Agent
def analyze_sentiment(text: str) -> dict:
"""Custom sentiment analysis logic."""
return {"analyzed": True}
root_agent = Agent(
name="my-agent",
model="gemini-2.0-flash",
instruction="Analyze sentiment...",
tools=[analyze_sentiment],
)Invoke an Agent
Once deployed, invoke your agent with a simple POST request:
curl -X POST "https://api.hikigai.com/v1/agents/my-sentiment-analyzer/invoke" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"message": "I love this product! It works great."
}'Response
{
"agent_id": "abc123",
"response": "The sentiment is positive with high confidence (0.92).",
"metadata": {
"latency_ms": 245,
"timestamp": "2024-01-15T10:30:00Z"
}
}Deploy an App
Hikigai lets you deploy full-stack web applications directly from a GitHub repository. The platform handles framework detection, Docker image building, container orchestration, and gives your app a live production URL — all in minutes.
How App Deployment Works
Connect Source
Link your GitHub repo or upload a ZIP archive. Hikigai authenticates via a GitHub App for secure, scoped repository access.
Framework Detection
The platform analyzes your repository to detect the framework (Next.js, React, FastAPI, etc.) and generates an optimized Dockerfile.
Build & Push
AWS CodeBuild compiles your app into a Docker image and pushes it to a private ECR container registry.
Deploy to ECS
The image is deployed as a Fargate task on AWS ECS with auto-scaling, health checks, and zero-downtime updates.
Deploy via Console
The easiest way to deploy is through the Hikigai Console. Navigate to your project, click New App, and follow the 3-step wizard:
- Source — Choose GitHub and select your repository and branch, or upload a ZIP file.
- Configure — Review the auto-detected framework, set environment variables, choose CPU/memory resources, and configure the number of instances.
- Deploy — Click deploy and watch real-time streaming build logs. Once complete, your app is live.
Deploy via API
You can also create and deploy apps programmatically using the Platform API:
# Step 1: Create an app in your project
curl -X POST "https://api.hikigai.ai/v1/projects/{project_id}/apps" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"display_name": "My Healthcare Portal",
"framework": "nextjs"
}'# Step 2: Connect a GitHub repository
curl -X POST "https://api.hikigai.ai/v1/projects/{project_id}/apps/{app_id}/github/connect" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"installation_id": "136386010",
"repo_full_name": "your-org/your-repo",
"branch": "main"
}'# Step 3: Trigger a deployment
curl -X POST "https://api.hikigai.ai/v1/projects/{project_id}/apps/{app_id}/deploy" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"cpu": 256,
"memory": 512,
"min_instances": 1,
"env_vars": {
"NODE_ENV": "production"
}
}'Supported Frameworks
The platform auto-detects your framework from the repository structure and generates an optimized, multi-stage Dockerfile tailored to it:
| Framework | Detection | Base Image | Build Command |
|---|---|---|---|
| Next.js | next.config.* in root | node:20-alpine | npm run build (standalone) |
| React (Vite) | vite.config.* in root | node:20-alpine + nginx | npm run build → static serve |
| Express / Node.js | server.js or index.js | node:20-alpine | npm install → node start |
| FastAPI | main.py + fastapi in requirements | python:3.11-slim | pip install → uvicorn |
| Flask | app.py + flask in requirements | python:3.11-slim | pip install → gunicorn |
| Django | manage.py in root | python:3.11-slim | pip install → gunicorn |
| Static HTML | index.html in root | nginx:alpine | Copy files → nginx serve |
Build Pipeline
When you trigger a deployment, the following pipeline executes:
Real-time Build Logs
Monitor every phase of your build with server-sent event (SSE) streaming. Connect to the log stream endpoint to receive live updates in your terminal or application:
# Stream build logs in real time
curl -N "https://api.hikigai.ai/v1/projects/{project_id}/apps/{app_id}/deployments/{deploy_id}/logs/stream" \
-H "Authorization: Bearer YOUR_API_KEY"
# Response (SSE):
# data: {"phase": "BUILD", "message": "Step 1/8: FROM node:20-alpine AS base"}
# data: {"phase": "BUILD", "message": "Step 2/8: WORKDIR /app"}
# data: {"phase": "BUILD", "message": "Step 3/8: COPY package*.json ./"}
# data: {"phase": "DEPLOY", "message": "Task registered: arn:aws:ecs:..."}
# data: {"phase": "DEPLOY", "message": "Service updated, waiting for stability..."}
# data: {"phase": "COMPLETE", "message": "Deployment successful"}Auto-Deploy on Git Push
Once your GitHub repository is connected, Hikigai can automatically redeploy your app whenever you push to the configured branch. The GitHub App webhook triggers a new build with the latest commit SHA, so your production app stays in sync with your code.
App Environment
Every deployed app receives a set of platform environment variables that are automatically injected into the container at runtime. These let your app interact with Hikigai services without any manual configuration.
Auto-Injected Variables
| Variable | Description | Example |
|---|---|---|
| HIKIGAI_API_KEY | Deploy-scoped API key for calling platform services | hk_deploy_abc123... |
| HIKIGAI_PROJECT_ID | The project this app belongs to | proj_7f8a9b... |
| HIKIGAI_PLATFORM_URL | Base URL for platform API calls | https://api.hikigai.ai |
| HIKIGAI_APP_ID | Unique identifier for this app | app_3d4e5f... |
| PORT | Port your app should listen on | 3000 |
Using Platform Variables in Your App
Your deployed app can call any Hikigai agent using the auto-injected credentials. No API key management needed:
// Next.js API route — calling a Hikigai agent
export async function POST(req) {
const { clinical_note } = await req.json();
// These environment variables are auto-injected by the platform
const response = await fetch(
`${process.env.HIKIGAI_PLATFORM_URL}/v1/agents/icd-10-coder/invoke`,
{
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.HIKIGAI_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ message: clinical_note }),
}
);
return Response.json(await response.json());
}# FastAPI endpoint — calling a Hikigai agent
import os, httpx
@app.post("/analyze")
async def analyze(note: str):
async with httpx.AsyncClient() as client:
resp = await client.post(
f"{os.environ['HIKIGAI_PLATFORM_URL']}/v1/agents/icd-10-coder/invoke",
headers={"Authorization": f"Bearer {os.environ['HIKIGAI_API_KEY']}"},
json={"message": note},
)
return resp.json()Custom Environment Variables
In addition to auto-injected variables, you can set your own environment variables during the Configure step. These are encrypted at rest and injected alongside platform variables.
MCP Servers
The Model Context Protocol (MCP) is an open standard that lets AI agents connect to external data sources and tools through a unified interface. Hikigai provides purpose-built MCP servers for the healthcare ecosystem, giving your agents real-time access to clinical data, terminology systems, and EHR platforms.
What is MCP?
MCP servers act as a bridge between your AI agents and healthcare data sources. Instead of building custom integrations for each EHR, terminology service, or clinical database, your agent connects to a standardized MCP server that handles authentication, data formatting, and compliance.
Architecture
Available Healthcare MCP Servers
Epic EHR Server
epic-ehrFHIR R4-based access to patient demographics, encounters, conditions, medications, allergies, immunizations, procedures, and lab results from Epic EHR systems.
get_patient()get_patient_conditions()get_patient_medications()get_patient_encounters()search_patient_by_mrn()Clinical Terminology Server
clinical-terminologySemantic search and lookup across ICD-10-CM, CPT, SNOMED CT, LOINC, and RxNorm code systems. Supports code validation, cross-mapping, and hierarchical navigation.
lookup_icd10()search_snomed()map_code()validate_cpt()Drug Interaction Server
drug-interactionsReal-time drug-drug and drug-allergy interaction checking powered by RxNorm and NLM DailyMed. Returns severity levels, clinical effects, and recommended alternatives.
check_interactions()check_allergy_conflict()get_alternatives()Lab Results Server
lab-resultsStructured access to lab results with LOINC coding, reference ranges, critical value flagging, and trend analysis across patient encounters.
get_lab_results()get_trends()check_critical_values()Connecting Agents to MCP Servers
When deploying an agent, specify which MCP servers it should connect to. The platform handles authentication and connection management:
from hikigai.agentsdk import AgentBuilder
agent = AgentBuilder("clinical-note-coder") \
.instruction("Analyze clinical notes and suggest ICD-10 codes") \
.model("gemini-2.0-flash") \
.mcp_servers(["epic-ehr", "clinical-terminology"]) \
.build()
# The agent can now:
# - Pull patient context from Epic EHR
# - Look up and validate ICD-10 codes
# - Cross-reference SNOMED CT mappings# Invoking an MCP-connected agent
from hikigai.appsdk import AppClient
client = AppClient()
result = client.agent("clinical-note-coder").invoke(
clinical_note="Patient presents with acute chest pain...",
context={
"patient_mrn": "MRN12345", # Agent uses Epic EHR MCP to pull patient data
"encounter_id": "ENC-67890", # Agent fetches encounter context automatically
}
)
print(result.codes)
# [{"code": "R07.9", "description": "Chest pain, unspecified", "confidence": 0.94}]Platform API Reference
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/agents | List all agents |
| GET | /v1/agents/:id | Get agent details |
| POST | /v1/agents/deploy/config | Deploy with config |
| POST | /v1/agents/deploy/code | Deploy with code |
| POST | /v1/agents/:slug/invoke | Invoke agent |
| DELETE | /v1/agents/:id | Delete agent |
App Deployment Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /v1/projects/:id/apps | Create a new app |
| GET | /v1/projects/:id/apps | List all apps in a project |
| GET | /v1/projects/:id/apps/:app_id | Get app details |
| POST | /v1/projects/:id/apps/:app_id/github/connect | Connect GitHub repository |
| POST | /v1/projects/:id/apps/:app_id/deploy | Trigger deployment |
| GET | /v1/projects/:id/apps/:app_id/deployments | List deployment history |
| GET | /v1/.../deployments/:deploy_id/logs/stream | Stream build logs (SSE) |
| POST | /v1/projects/:id/apps/:app_id/stop | Stop a running app |
| POST | /v1/projects/:id/apps/:app_id/restart | Restart a stopped app |
| DELETE | /v1/projects/:id/apps/:app_id | Delete app and AWS resources |
SDKs
Official SDKs for popular languages:
Python
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ hikigai-agentsdk hikigai-appsdk hikigai-core --upgrade
AvailableJavaScript
npm install hikigai
Coming SoonGo
go get hikigai
Coming SoonRate Limits
Rate limits vary by plan. Exceeding limits returns HTTP 429.
| Plan | Requests/min | Requests/day |
|---|---|---|
| Free | 10 | 100 |
| Pro | 100 | 10,000 |
| Enterprise | Unlimited | Unlimited |