This guide walks you through running Agent Stack in your own self-hosted environment so you can evaluate, develop, and integrate agents as backend services. Agent Stack provides a consistent runtime for agents—handling model access, storage, authentication, and service wiring—so teams can move from agent code to a running service with minimal setup. Agent Stack deploys with Kubernetes via our provided Helm chart, ensuring a standardized setup within your infrastructure.Agent Stack is designed for trusted environments and early-stage integration work. It’s well suited for local development, shared team environments, and internal evaluation. It is not intended to be directly exposed to untrusted public traffic or used as a hardened, multi-tenant production platform today. If you’re evaluating Agent Stack for broader organizational use, deploy it behind your existing network and security boundaries.If you’re an application or agent developer, this guide helps you get agents running in your deployment environment and callable from your application. If you’re part of a platform or IT team, this guide provides a concrete runtime to assess how agent services run inside your infrastructure using our Helm-based deployment, how they integrate with your security and observability tooling, and how they fit your deployment standards.Proceed to the installation guide below to configure your environment and deploy the Agent Stack cluster.
Create a config.yaml file to define your registry, agents, and security keys. This is a minimal example, more advanced options
are explained in the Configuration Options section.
Copy
Ask AI
# External registries for default catalogs (change release/tag accordingly):externalRegistries: public_github: "https://github.com/i-am-bee/agentstack@v0.4.3#path=agent-registry.yaml"# Custom agents as docker imagesproviders: - location: <docker-image-id> # e.g. location: ghcr.io/i-am-bee/agentstack-starter/my-agent:latest# Use the key generated in Step 1encryptionKey: "encryption-key-from-command"# Basic authentication settings requires passing an admin password to certain endpoints, you can disable auth for insecure deploymentsauth: enabled: true basic: enabled: true adminPassword: "my-secret-password"
Integration with existing Auth0, Okta, or Enterprise IDPs.
The current authentication model is basic and intended for development use.
For any deployment beyond local testing, carefully consider your security
requirements and network access controls.
Use an internal Keycloak instance to handle OIDC and bridge to GitHub, Google, or SAML.
Keycloak is deployed automatically when auth.enabled is true.
Copy
Ask AI
trustProxyHeaders: true # This is important if validate_audience is enabledauth: enabled: true # Next.js settings nextauthUrl: "https://example.com" # Public URL of the UI apiUrl: "https://api.example.com" # Public URL of the APIkeycloak: enabled: true # Internal URL used by the server for token validation (default shown) internalIssuerUrl: "http://keycloak:8336/realms/agentstack" # Public URL used by the browser publicIssuerUrl: "https://keycloak.example.com/realms/agentstack"
Connect your own OIDC provider (e.g., Auth0, Okta, or your own Keycloak) by disabling the bundled Keycloak.
Copy
Ask AI
auth: enabled: true # Next.js settings nextauthUrl: "https://example.com" # Public URL of the UI apiUrl: "https://api.example.com" # Public URL of the APIkeycloak: enabled: falseexternalOidcProvider: issuerUrl: "https://your-oidc-provider.com" name: "My IDP" # Optional display name used in the UI id: "my-idp" # Optional ID used internally rolesPath: "realm_access.roles" # JSON path to roles in JWT claims (can be an array or a semicolon separated string) uiClientId: "agentstack-ui" serverClientId: "agentstack-server" # Secrets can be provided directly or via existing secrets uiClientSecret: "..." serverClientSecret: "..." # existingSecret: "my-oidc-secret" # uiClientSecretKey: "ui-secret-key" # Key in my-oidc-secret # serverClientSecretKey: "server-secret-key" # Key in my-oidc-secret
Critical: Endpoint ExposureIf using OIDC (Bundled or External), you must expose the following endpoints publicly via Ingress, Gateway API, OpenShift Routes, or other tools:
UI: https://example.com
API: https://api.example.com used by the CLI to authenticate
Keycloak: https://keycloak.example.com used by the UI and CLI to authenticate
⚠️ Failure to configure these endpoints with proper https may leave your application vulnerable.
By default, Agent Stack includes PostgreSQL and SeaweedFS (S3-compatible storage). For production environments, it is highly recommended to use external, managed services.
To use an external PostgreSQL instance, disable the built-in subchart and provide connection details. This is required if you prefer a managed database like AWS RDS or Google Cloud SQL.Example configuration:
Copy
Ask AI
postgresql: enabled: false # disable builtin subchartexternalDatabase: host: "<your-postgres-host>" port: 5432 user: "<your-postgres-user>" database: "<your-postgres-database>" password: "<your-postgres-password>" # Required when initContainers.createVectorDbExtension is enabled adminUser: "<postgres-admin-user>" adminPassword: "<postgres-admin-password>" ssl: true sslRootCert: "" # SSL certificate for the external database to ensure ssl connection, for example: # sslRootCert: | # -----BEGIN CERTIFICATE----- # ... # -----END CERTIFICATE-----
If the migration fails while installing the vector extension, you can disable automated creation and run the SQL manually.
Copy
Ask AI
initContainers.createVectorDbExtension=false
Then make sure the following SQL statements were executed in your database:
Copy
Ask AI
-- Manual SQL setup for External DBCREATE EXTENSION IF NOT EXISTS vector;SET maintenance_work_mem = '512MB';SET hnsw.ef_search = 1000;SET hnsw.iterative_scan = strict_order;SET hnsw.max_scan_tuples = 1000000;
You may want to have Agent Stack connect to an external object storage rather than installing seaweedfs inside
your cluster. This chart allows you to specify credentials for an external storage streaming with the
externalS3. You should also disable the seaweedfs installation with the seaweedfs.enabled
option.Example configuration:
Redis is used for rate limiting and caching. While disabled by default, it is required if replicaCount > 1 to ensure counters are synchronized across replicas.Enable Built-in Redis:
Copy
Ask AI
redis: enabled: true
External Redis:To use an external Redis instance, ensure the built-in subchart is disabled (default) and provide connection details:
If you are running multiple replicas (replicaCount > 1), Redis is
required for rate limiting to work correctly across all instances. Without
Redis, each replica maintains its own rate limit counters, allowing users to
exceed limits by distributing requests across replicas.
Agent Stack supports Cross-Origin Resource Sharing (CORS) to allow web applications hosted on different domains to interact with the Agent Stack API.
Copy
Ask AI
cors: enabled: true allowOrigins: - http://localhost:3000 - https://my-ui.example.com allowMethods: - GET - POST - PUT - DELETE - OPTIONS allowHeaders: - Content-Type - Authorization allowCredentials: true
cors.enabled: Set to true to enable CORS. Default is false.
cors.allowOrigins: A list of origins (e.g., http://localhost:3000) that are allowed to make cross-site requests to the Agent Stack API.
cors.allowMethods: A list of HTTP methods (e.g., GET, POST) that are allowed for cross-origin requests. Default is ["*"].
cors.allowHeaders: A list of HTTP request headers (e.g., Content-Type, Authorization) that can be used when making the actual cross-origin request. Default is ["*"].
cors.allowCredentials: Set to true to indicate that the client can send cookies and HTTP authentication credentials with the cross-origin request. Note that allowOrigins cannot be ["*"] when allowCredentials is true. Default is false.
To manage agents within Agent Stack, you must configure how the platform accesses existing images, how it registers them for use, and how it builds new agents from source code.
If your agent images or source code are hosted in private environments, you must provide authentication credentials to allow the cluster to retrieve them.
When using agents stored in private Docker registries, you must specify the name of a Kubernetes custom-registry-secret. This allows the cluster to pull the images during deployment.
For building agents from private or Enterprise GitHub repositories, Agent Stack supports both Personal Access Token (PAT) and GitHub Apps. This configuration enables the build engine to clone your source code.
Once access is configured, you must define which agents are available to the platform. You can do this by listing specific images or by syncing with a remote catalog.
OpenShift Users: In-cluster builds require a service account with the appropriate Security Context Constraints (SCC) to allow the elevated permissions necessary for container image construction.
The guide above covers the primary configuration paths for production environments. For a comprehensive list of every available parameter, including low-level resource limits, node selectors, and detailed sub-chart settings, refer to the source configuration file.All configuration options, including their default values and technical descriptions, are documented in the values.yaml file within the official repository.If your infrastructure has specific requirements (such as custom sidecars, unique volume mounts, or specific network policies) that are not currently exposed via the Helm chart, please open a GitHub issue to request a new configuration toggle.
# Check pod statuskubectl get pod# Check server logskubectl logs deployment/agentstack-server# If server is not starting, check specific init container logs (e.g. migrations)kubectl logs deployment/agentstack-server -c run-migrations# Check eventskubectl get events --sort-by=.lastTimestamp
Authentication issues:
Redirect URIs: Your Identity Provider must whitelist https://<your-url>/api/auth/callback. For CLI usage, you must also whitelist http://localhost:9001/callback.
CLI Application: Consider creating a separate public OIDC application for the CLI
Audience Claim: The audience claim in your JWT must match the public URL of your application exactly, with no trailing slash (e.g., https://example.com).
Proxy Headers: If you are behind a load balancer or ingress, trustProxyHeaders: true must be enabled in your config to correctly forward request URLs.