Documentation
Build with Hikigai
Deploy AI agents, ship full-stack applications, and run MCP tool servers on GCP or AWS — 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
The platform builds a Docker image and pushes it to a private container registry for the selected cloud provider.
Deploy
The image is deployed to your chosen cloud target on GCP or AWS — with health checks and a live HTTPS URL.
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) lets AI agents call external tools through a unified interface. Hikigai supports two paths: deploy your own MCP servers from GitHub, and connect to registry connectors (Epic EHR, Cerner, Athena Health, Google Health Connect, and more).
Deploy your own MCP server
From a project, create an MCP server, connect a GitHub repo (Python or Node), and deploy. The orchestrator builds the image, deploys to your chosen cloud target (GCP or AWS), probes initialize + tools/list, and auto-registers the server in the MCP registry and project connectors.
Deploy pipeline (high level)
- Source resolution from GitHub
- Runtime / framework detection
- Dockerfile generation
- Build and push image
- Deploy to catalog target on GCP or AWS
- MCP protocol validation (probe)
- Registry sync & marketplace metadata
Registry connectors
Epic EHR
epic-ehrConnect to Epic FHIR APIs for patient records, appointments, medications, conditions, and observations.
get_patient()search_appointments()get_medications()get_conditions()get_observations()Cerner
cernerOracle Health (Cerner) access for demographics, allergies, immunizations, procedures, and clinical notes.
get_patient()get_allergies()get_immunizations()get_procedures()search_clinical_notes()Athena Health
athena-healthCloud EHR for patient management, encounters, vitals, and documents.
get_patient()search_encounters()get_vitals()get_documents()update_patient()Google Health Connect
google-health-connectVitals, activity, sleep, and fitness data from Android devices via Health Connect.
sync_from_device()read_heart_rate()read_steps()read_sleep()get_vital_signs_dashboard()Connecting agents to MCP connectors
Pass linked connector slugs when deploying or invoking an agent. The platform handles connection management; credentials are configured per project connector.
from hikigai.appsdk import AppClient
client = AppClient()
result = client.agent("clinical-note-coder").invoke(
{"note": "Patient presents with acute chest pain..."},
connectors={"epic-ehr": {}},
)Multi-Cloud Deployment
Apps, agents, and MCP servers deploy to Google Cloud or AWS. Targets are catalog-driven (GET /api/v1/cloud/catalog) — the console and SDKs render forms from the same JSON Schema the API validates.
Google Cloud (GCP)
Deploy apps, MCP servers, and agents
Amazon Web Services (AWS)
Deploy apps, MCP servers, and agents
BYOC credentials
Attach AWS (assume-role preferred, or access key) or GCP service-account credentials on the project. With none attached, deployments use the platform account — unchanged from before BYOC.
from hikigai.appsdk import AppClient
client = AppClient(api_key=..., project_id=...)
catalog = client.cloud.catalog(workload="agent")
for service in catalog.services:
print(service.id, service.display_name)
# AgentSDK deploy with an explicit target
from hikigai.agentsdk import AgentClient
agent = AgentClient(api_key=..., project_id=...).deploy(
config,
cloud_service="gcp-cloud-run", # pick from the cloud catalog
region="us-central1",
)Rooms & Event Bus
Rooms
Project-scoped WebSocket rooms for realtime pub/sub — presence, bounded replay, and SDK RoomSession clients. See the API reference and AppSDK / AgentSDK Rooms docs.
Event Bus & webhooks
Platform events (agent deploy/delete, jobs, invocations, storage) ride a CloudEvents bus with in-memory, GCP Pub/Sub, or AWS EventBridge backends. Tenants receive events via HMAC-signed webhooks (client.events) or a realtime WebSocket stream. Configure subscriptions in the project Webhooks tab.
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 cloud resources |
MCP Server Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /v1/projects/:id/mcp-servers | Create an MCP server |
| GET | /v1/projects/:id/mcp-servers | List MCP servers in a project |
| POST | /v1/projects/:id/mcp-servers/:sid/deploy | Trigger MCP deployment |
| POST | /v1/projects/:id/mcp-servers/:sid/refresh-tools | Re-probe tools/list |
Cloud Catalog Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/cloud/catalog | List providers, services, regions, schemas |
| POST | /v1/cloud/targets/validate | Dry-run a deployment target |
SDKs
Official SDKs for popular languages:
Python
pip install hikigai-agentsdk hikigai-appsdk hikigai-core --upgrade
AvailableGo
go get hikigai
Coming SoonRate Limits
Rate limits vary by plan. Exceeding limits returns HTTP 429. For a full breakdown of what consumes quota (SDK invoke, playground, HTTP, deploy, identity, and more), see Usage Limits.
| Plan | Requests/min | Requests/day |
|---|---|---|
| Free | 100 | 3,000 |
| Pro | 100 | 10,000 |
| Enterprise | 1,000 | 100,000 |