Supporting Services
This chapter covers the services and tools that support your agent workflow β container image storage (vCR), LLM model access (AIP), the Python SDK, and security best practices. These are not core AgentBase modules, but you will need them to build and deploy agents.
Container Registry (vCR)
Portal: https://vcr.console.vngcloud.vn
API Base URL:
https://vcr.api.vngcloud.vnRegistry Host:
vcr.vngcloud.vn
Note: vCR pagination is 1-indexed (
page=1is first page). Image paths use the repository'sbackendName(not the display name):vcr.vngcloud.vn/{backendName}/{imageName}:{tag}
Create a Repository
Portal (GUI)
Open https://vcr.console.vngcloud.vn β "Create Repository"
Fill in:
Repository Name: e.g.,
my-first-agent(unique, lowercase, alphanumeric and hyphens)Access: Private (recommended)
Quota Limit: e.g.,
10GB
Click Create
Note the backendName from the repository detail β use this in image paths
RESTful API
Prerequisite: All API examples below use
$TOKENβ an IAM bearer token. See Configure Authentication for how to obtain it.
Response includes backendName β use this in Docker image paths.
Create a Robot Account
Robot accounts are service accounts for Docker push/pull access.
Portal (GUI)
On the repository detail page β "Robot Accounts" β "Create Robot Account"
Fill in: Name, Duration (days), Permissions (push + pull)
Click Create
Immediately copy the Secret Key β shown only once
The full username (
backendName) has format:{prefix}-{chosen-name}(e.g.,109072-deploy-bot)
RESTful API
Response includes secretKey β save it immediately, cannot be retrieved again.
Push & Pull Images
Use in Runtime (runtime creation):
Manage Images
List images:
Delete image:
Delete repository:
Important: You MUST delete all images before deleting the repository.
Known API Quirks
name= is required for list images
Always include ?name= even if empty
Pagination is 1-based
Use page=1 β page=0 returns 400
Repo deletion fails if images exist
Delete all images first, then delete repo
Troubleshooting
Docker push denied
Robot account lacks push permission
Re-create with explicit push+pull permissions
Docker login fails
Wrong username format
Use full backendName (e.g., 109072-deploy-bot)
Repo deletion fails
Images still exist
Delete all images first
400 on image list
Missing name= param
Always include ?name= even if empty
AI Platform (AIP) β LLM Access
Portal: https://aiplatform.console.vngcloud.vn/models
Management API:
https://aiplatform-hcm.api.vngcloud.vnLLM Endpoint:
https://maas-llm-aiplatform-hcm.api.vngcloud.vn/v1(OpenAI-compatible)
Note: AIP uses 1-indexed pagination (
page=1). API key names must be^[a-z0-9\-]{5,50}$.
Browse Models
Portal (GUI)
Open https://aiplatform.console.vngcloud.vn/models
Browse available models β click a model to see its
path(used as themodelparameter in API calls)
RESTful API
Important: Use the
pathfield (notcode) as themodelparameter when calling the LLM endpoint.
Create an API Key
Note: API key creation is async β poll until status is
ACTIVE.
Portal (GUI)
Open https://aiplatform.console.vngcloud.vn/models β "API Keys" β "Create API Key"
Enter a Name (5β50 lowercase chars/digits/hyphens) β Create
Wait for status
ACTIVEβ copy the key value
RESTful API
Call LLM Models
Python (OpenAI SDK):
curl:
Troubleshooting
401 on LLM call
Invalid or expired AIP key
Check key status, create new key if needed
Model not found
Wrong model parameter
Use path field from model detail, not code
API key quota full
Too many keys
Delete unused key, then create new one
SDK & Integration
Installation
Authentication Setup
The SDK reads credentials in this priority order:
Environment variables (highest priority):
.greennode.jsonin the current working directory (fallback):
On AgentBase Runtime: GREENNODE_CLIENT_ID, GREENNODE_CLIENT_SECRET, and GREENNODE_AGENT_IDENTITY are automatically injected by the runtime.
Building an Agent with GreenNodeAgentBaseApp
GreenNodeAgentBaseAppGreenNodeAgentBaseApp is the SDK's built-in web server. It handles port binding, health check routing, and request dispatch.
RequestContext fields:
context.user_id
X-GreenNode-AgentBase-User-Id
End-user identifier (for Memory actor_id)
context.session_id
X-GreenNode-AgentBase-Session-Id
Session identifier (for LangGraph thread_id)
Credential Injection Decorators
Identity Client (IdentityClient)
IdentityClient)Memory Client (MemoryClient)
MemoryClient)LangGraph Integration (AgentBaseMemoryEvents)
AgentBaseMemoryEvents)For the complete pattern (short-term + long-term memory in a single agent), see Memory Β§ 6.10.
Security Best Practices
IAM Permissions
All AgentBase operations require a GreenNode IAM service account. See Getting Started for setup steps.
Recommended policies:
AgentBaseFullAccess
Full access to Identity, Runtime, and Memory services
Developers, platform team
vcrFullAccess
Full access to Container Registry
Build pipelines, developers
AiPlatformFullAccess
Access to AI Platform LLM models and API keys
Developers, agents
Principle of least privilege:
Use service accounts over personal accounts β never use personal API keys in CI/CD
Separate service accounts per environment (dev/prod)
Rotate keys regularly
Never share service account credentials
Auto-injected credentials on Runtime (no manual setup needed):
GREENNODE_CLIENT_ID
IAM service account client ID
GREENNODE_CLIENT_SECRET
IAM service account client secret
GREENNODE_AGENT_IDENTITY
Agent identity name
Credential Management
Secrets lifecycle:
Developer Workstation Security
Gitignore rules for AgentBase projects:
Credential storage guide:
IAM client_id/client_secret
Env vars or .greennode.json
Dockerfile, source code, git
LLM API key (AIP)
.env (local dev) or Access Control (production)
Dockerfile, source code, git
vCR robot account password
GREENNODE_VCR_PASSWORD env var (CI)
Source code, git
External API keys (OpenAI, etc.)
AgentBase Access Control as auth providers
Anywhere in code or config
Pre-commit hook to prevent secret commits:
Credential Rotation
Rotate a static API key (takes effect on next request):
Reset IAM service account credentials:
Go to https://iam.console.vngcloud.vn/service-accounts
Click the service account β "Security credentials" tab β "Reset"
Copy the new client secret (shown only once)
Update
GREENNODE_CLIENT_SECRETin your environment
Reset runtime service account (if runtime credentials are compromised):
Warning: This regenerates credentials for the runtime β the container will restart with new credentials.
Last updated

