agenta-6-self-hosted-deployment
Sub-skill of agenta: 6. Self-Hosted Deployment.
Best use case
agenta-6-self-hosted-deployment is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Sub-skill of agenta: 6. Self-Hosted Deployment.
Teams using agenta-6-self-hosted-deployment should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/6-self-hosted-deployment/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How agenta-6-self-hosted-deployment Compares
| Feature / Agent | agenta-6-self-hosted-deployment | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Sub-skill of agenta: 6. Self-Hosted Deployment.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 6. Self-Hosted Deployment
## 6. Self-Hosted Deployment
**Setting Up Self-Hosted Agenta:**
```python
"""
Configure and manage self-hosted Agenta deployment.
"""
import agenta as ag
from agenta import Agenta
from typing import Dict, Any, Optional
import os
import requests
from dataclasses import dataclass
@dataclass
class DeploymentConfig:
"""Configuration for self-hosted deployment."""
host: str
port: int
api_key: Optional[str]
database_url: str
redis_url: Optional[str]
enable_tracing: bool = True
class SelfHostedManager:
"""
Manage self-hosted Agenta deployment.
"""
def __init__(self, config: DeploymentConfig):
self.config = config
self.base_url = f"http://{config.host}:{config.port}"
self.client = None
def initialize(self) -> bool:
"""
Initialize connection to self-hosted instance.
Returns:
True if successful
"""
try:
# Set environment for SDK
os.environ["AGENTA_HOST"] = self.base_url
if self.config.api_key:
os.environ["AGENTA_API_KEY"] = self.config.api_key
# Initialize Agenta
ag.init()
self.client = Agenta()
# Test connection
response = requests.get(f"{self.base_url}/api/health")
return response.status_code == 200
except Exception as e:
print(f"Initialization failed: {e}")
return False
def create_app(
self,
name: str,
description: str = ""
) -> Dict:
"""
Create a new application.
Args:
name: Application name
description: Application description
Returns:
Created application details
"""
return self.client.create_app(
name=name,
description=description
)
def deploy_variant(
self,
app_name: str,
variant_name: str,
environment: str = "production"
) -> Dict:
"""
Deploy a variant to an environment.
Args:
app_name: Application name
variant_name: Variant to deploy
environment: Target environment
Returns:
Deployment details
"""
# Get variant
variants = self.client.list_variants(app_name=app_name)
variant = next((v for v in variants if v.name == variant_name), None)
if not variant:
raise ValueError(f"Variant '{variant_name}' not found")
# Deploy
return self.client.deploy_variant(
variant_id=variant.id,
environment=environment
)
def get_deployment_status(self, app_name: str) -> Dict:
"""
Get deployment status for an application.
Args:
app_name: Application name
Returns:
Deployment status
"""
response = requests.get(
f"{self.base_url}/api/apps/{app_name}/deployments",
headers={"Authorization": f"Bearer {self.config.api_key}"} if self.config.api_key else {}
)
return response.json()
def configure_observability(
self,
tracing_endpoint: str = None,
metrics_endpoint: str = None
) -> None:
"""
Configure observability endpoints.
Args:
tracing_endpoint: Endpoint for traces (e.g., Jaeger)
metrics_endpoint: Endpoint for metrics (e.g., Prometheus)
"""
config = {}
if tracing_endpoint:
config["tracing"] = {
"enabled": True,
"endpoint": tracing_endpoint
}
if metrics_endpoint:
config["metrics"] = {
"enabled": True,
"endpoint": metrics_endpoint
}
response = requests.post(
f"{self.base_url}/api/config/observability",
json=config,
headers={"Authorization": f"Bearer {self.config.api_key}"} if self.config.api_key else {}
)
if response.status_code != 200:
raise Exception(f"Failed to configure observability: {response.text}")
def generate_docker_compose(config: DeploymentConfig) -> str:
"""
Generate docker-compose.yml for self-hosted deployment.
Args:
config: Deployment configuration
Returns:
Docker compose YAML content
"""
compose = f"""version: '3.8'
services:
agenta-backend:
image: ghcr.io/agenta-ai/agenta-backend:latest
ports:
- "{config.port}:8000"
environment:
- DATABASE_URL={config.database_url}
- REDIS_URL={config.redis_url or "redis://redis:6379"}
- ENABLE_TRACING={str(config.enable_tracing).lower()}
depends_on:
- postgres
*Content truncated — see parent skill for full reference.*Related Skills
web-artifacts-builder-self-contained-architecture
Sub-skill of web-artifacts-builder: Self-Contained Architecture (+1).
planning-goal-example-1-software-deployment
Sub-skill of planning-goal: Example 1: Software Deployment (+2).
github-release-swarm-progressive-deployment
Sub-skill of github-release-swarm: Progressive Deployment.
self-improving-skills
Use after completing any complex task (5+ tool calls), fixing a tricky error, or discovering a non-trivial workflow. Also use when a loaded skill is outdated, incomplete, or wrong during execution.
agenta-langchain-integration
Sub-skill of agenta: Langchain Integration.
agenta-fastapi-integration
Sub-skill of agenta: FastAPI Integration.
agenta-connection-issues
Sub-skill of agenta: Connection Issues (+2).
agenta-5-model-comparison
Sub-skill of agenta: 5. Model Comparison.
agenta-4-playground-and-experimentation
Sub-skill of agenta: 4. Playground and Experimentation.
agenta-3-evaluation-metrics-and-testing
Sub-skill of agenta: 3. Evaluation Metrics and Testing.
agenta-2-ab-testing-prompts
Sub-skill of agenta: 2. A/B Testing Prompts.
agenta-1-prompt-versioning-strategy
Sub-skill of agenta: 1. Prompt Versioning Strategy (+2).