From greennode-agentbase
Reference guide for GreenNode AgentBase platform: architecture, services (Identity, Runtime, Memory, Observability), SDK, IAM setup, and credentials. Activated for platform overview questions.
How this skill is triggered — by the user, by Claude, or both
Slash command
/greennode-agentbase:agentbaseThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
New to GreenNode AgentBase? Use `/agentbase-wizard` for step-by-step guidance from zero to deployed agent.
references/auth-setup.mdreferences/endpoints.mdreferences/resource-discovery.mdreferences/runtime-contract.mdscripts/aip.shscripts/auth.shscripts/check_credentials.shscripts/check_env.shscripts/cr.shscripts/discovery.shscripts/docker_login.shscripts/get_token.shscripts/identity.shscripts/lib/common.shscripts/lib/config.shscripts/memory.shscripts/openclaw.shscripts/prepare_image_auth.shscripts/redact_response.shscripts/runtime.shNew to GreenNode AgentBase? Use /agentbase-wizard for step-by-step guidance from zero to deployed agent.
AgentBase is a dedicated infrastructure platform for enterprise AI agents by GreenNode. It provides identity management, containerized runtime, memory services, and observability.
https://agentbase.api.vngcloud.vn/identity/api/v1Base URL: https://agentbase.api.vngcloud.vn/runtime
Console: https://aiplatform.console.vngcloud.vn/agent-runtime?tab=runtime
Hosts two resource types:
/agent-runtimes) — user-built Docker images. Supports autoscaling, named endpoints (canary + DEFAULT), versioning, zero-downtime deploys, and optional VPC network mode (networkConfig with mode, vpcId, subnetId, routeCidrs). Default trigger for wizard-built agents./openclaws) — pre-built template agents (Telegram / Zalo chat bots) parameterized by version, flavor, model provider, and channel tokens. No Docker image required.See /agentbase-deploy for both flows.
VPC mode discovery — Custom Agent VPC mode requires vpcId and subnetId from VNG Cloud's vServer service (https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway, or han-1.* for HAN). Use bash .claude/skills/agentbase/scripts/vserver.sh projects | vpcs | subnets | validate-vpc to look them up and check vDNS + CIDR-overlap pre-flight before calling runtime.sh create. The default forbidden system CIDR is 172.30.0.0/16 (AGENTBASE_SYSTEM_CIDR).
https://agentbase.api.vngcloud.vn/memory/agentbase-monitor skill for log viewing and debuggingAll AgentBase API calls require a GreenNode IAM bearer token, obtained from an IAM Service Account.
Runtime vs Local Development: When an agent is deployed on AgentBase Runtime, the runtime system automatically manages the IAM service account and Agent Identity, and injects them as environment variables (
GREENNODE_CLIENT_ID,GREENNODE_CLIENT_SECRET,GREENNODE_AGENT_IDENTITY) into the container. The SDK automatically uses these — no manual credential configuration needed in agent code. The manual setup below is only needed for local development and for calling platform management APIs (e.g., creating runtimes, managing identities) from outside the runtime environment.
agentbase-dev)On the Service Account detail page, go to the "Permission" tab and click "Attach Policies".
To ensure smooth usage without permission issues, search for and attach these policies:
AgentBaseFullAccessvcrFullAccessAiPlatformFullAccessIf no AgentBase-specific policy appears, you can create a custom policy at https://iam.console.vngcloud.vn/policies — select the desired actions, then attach the policy to your service account.
Store credentials using one of the methods below. The SDK checks them in this priority order:
macOS/Linux:
export GREENNODE_CLIENT_ID="<your-client-id>"
export GREENNODE_CLIENT_SECRET="<your-client-secret>"
Windows (PowerShell):
$env:GREENNODE_CLIENT_ID = "<your-client-id>"
$env:GREENNODE_CLIENT_SECRET = "<your-client-secret>"
.greennode.json in the current working directory (fallback):{
"client_id": "<your-client-id>",
"client_secret": "<your-client-secret>"
}
Credential storage guide: IAM credentials (
client_id,client_secret) go in environment variables or.greennode.json. LLM configuration (LLM_API_KEY,LLM_BASE_URL,LLM_MODEL) goes in.env. These are separate concerns — IAM credentials authenticate with GreenNode platform APIs, while.envholds application-level config like LLM provider settings. The agent supports any OpenAI-compatible LLM provider (GreenNode AIP, OpenAI, Ollama, etc.).
Use the token script: TOKEN=$(bash .claude/skills/agentbase/scripts/get_token.sh). It caches the token in .agentbase/token_cache and validates expiry via JWT exp claim. On 401: re-run with --force.
Never fetch tokens with inline curl — always use the token script.
Use in API calls: Authorization: Bearer $TOKEN
Cross-platform note: The bash/curl commands in this guide work on macOS, Linux, WSL, and Git Bash. On Windows PowerShell, use
$TOKEN(instead ofTOKEN),$env:VAR(instead of$VAR), and backtick`(instead of\) for line continuation. Usecurl.exe(notcurl) in PowerShell, sincecurlis an alias forInvoke-WebRequest.
See the shared reference at references/endpoints.md for all API base URLs, pagination conventions, and response shape documentation.
Important: Pagination is not consistent across services:
page is 0-indexed (first page = page=0)page is 1-indexed (first page = page=1)page is 1-indexed (first page = page=1)Important: Response shapes differ across services:
.content, count in .totalElements, pages in .totalPages.listData, count in .totalItem, pages in .totalPageSee references/endpoints.md for full response JSON examples.
from greennode_agentbase import (
GreenNodeAgentBaseApp, # Web server for agent
RequestContext, # HTTP request metadata
PingStatus, # Health status enum (HEALTHY, HEALTHY_BUSY)
IdentityClient, # Identity service client
MemoryClient, # Memory service client
IAMCredentials, # Auth credentials
requires_api_key, # Decorator for static API key injection
requires_access_token, # Decorator for OAuth2 token injection
)
from greennode_agentbase.identity import (
CreateAgentIdentityRequest,
UpdateAgentIdentityRequest,
CreateApikeyProviderRequest,
UpdateApikeyProviderRequest,
CreateDelegatedApiKeyProviderRequest,
CreateOauth2ProviderRequest,
UpdateOauth2ProviderRequest,
GetDelegatedApiKeyRequest,
GetM2mTokenRequest,
ThreeLoTokenRequest,
)
from greennode_agentbase.memory.models import (
MemoryCreateRequest,
LongTermMemoryStrategy,
EventCreateRequest,
ChatMessage,
MemoryRecordSearchRequest,
)
# For long-term memory, use MemoryClient in tool-based approach
# (remember/recall tools). See /agentbase-memory for details.
Configuration (priority: env vars > .greennode.json > defaults):
GREENNODE_CLIENT_ID / GREENNODE_CLIENT_SECRET - IAM credentialsGREENNODE_AGENT_IDENTITY - Agent identity nameOn AgentBase Runtime, IAM service account and Agent Identity are managed by the runtime system and automatically available to the SDK — no manual configuration needed.
from greennode_agent_bridge import (
AgentBaseMemoryEvents, # LangGraph CheckpointSaver (short-term memory)
)
Long-term memory: For long-term memory operations (semantic search, fact storage/retrieval), use tool-based approach with
MemoryClientSDK (remember/recalltools). See/agentbase-memoryfor details.
See the shared reference at references/runtime-contract.md for the full Runtime Service Contract (port, health check, headers, auto-injection).
When any AgentBase skill needs IAM credentials and the user does not have a service account yet, follow this flow:
client_id and client_secret for the existing service account (or reset it themselves manually)yes, confirm, ok, approve, proceed, go ahead, do it, lgtm, or equivalent affirmative. If the user responds with ANYTHING ELSE (parameter changes, questions, corrections, or ambiguous text), treat it as adjustment input — update and re-present for confirmation again. NEVER interpret a non-confirmation response as approval.https://iam.console.vngcloud.vn/service-accountsagentbase-dev, but let the user chooseAgentBaseFullAccess — access to AgentBase services (Identity, Runtime, Memory)vcrFullAccess — access to GreenNode Container Registry (needed for Docker image push/pull)AiPlatformFullAccess — access to AI Platform LLM models and API keysclient_id and client_secret:
GREENNODE_CLIENT_ID and GREENNODE_CLIENT_SECRET, or.greennode.jsonInform the user that they need to create an IAM Service Account manually, and direct them to the instructions in the "Authentication (All Services)" section above (Step 1 through Step 3). Provide the direct link: https://iam.console.vngcloud.vn/service-accounts
/agentbase-wizard - Guided full lifecycle wizard (start here if new). Also handles project scaffolding (/agentbase-wizard init) and testing (/agentbase-wizard test)/agentbase-identity - Manage agent identities and outbound authentication (API keys, OAuth2)/agentbase-memory - Add memory to agents — conversation history and long-term fact extraction/agentbase-deploy - Full deploy workflow, runtime management, and managed Container Registry (CR)/agentbase-monitor - View logs, metrics, status dashboard, and debug running agents/agentbase-teardown - Clean up and remove all resources for a project/agentbase-llm - Manage GreenNode AI Platform resources (API keys, models)npx claudepluginhub vngcloud/greennode-agentbase-skillsGuides users step-by-step through building, scaffolding, testing, and deploying AI agents on GreenNode AgentBase. Invoke for any agent creation request.
Deploys ADK agents to Agent Runtime, Cloud Run, or GKE. Covers CI/CD, secrets, service accounts, rollback, and production infrastructure.
Guides developers to create new AgentCore agent projects on AWS: framework selection (Strands, LangGraph), project scaffolding, first deploy, and invocation. For beginners or 'agentcore create'.