Shell (Executor) Configuration Guide
Shell is the runtime environment container in Wegent that provides Bots with capabilities such as code execution, file operations, and tool invocation. This guide will help you understand and configure Shells.
π Table of Contentsβ
- What is a Shell
- Shell Functions
- Runtime Selection Guide
- Preset Shells
- Configuration Steps
- YAML Configuration Reference
- Configuration Examples
- FAQ
- Related Resources
π― What is a Shellβ
A Shell is the "body" or "execution environment" of a Bot, determining what tools and runtime capabilities the Bot can use.
Position in Bot Architectureβ
Bot = Ghost (Soul) + Shell (Body) + Model (Brain)
Analogy:
- Ghost: A person's character and expertise
- Shell: A person's body and limbs (ability to perform actions)
- Model: A person's brain (thinking ability)
Database Relationshipβ
Shell resources are stored in the following database tables:
public_shells: Stores system-provided public Shell configurations (shared across all users)kinds: Stores user-defined custom Shell configurations (user_id specific)
Shell Resolution Orderβ
When a Bot references a Shell, the system follows this lookup order:
- User-defined Shells: First checks the
kindstable for user-specific Shells in the specified namespace - Public Shells: If not found, falls back to system-provided public Shells in the
public_shellstable
This allows users to:
- Use preset public Shells (like
ClaudeCode,Agno,Dify) without creating them - Override public Shells by creating custom Shells with the same name
- Define private Shells that only they can access
π Shell Functionsβ
Shells provide Bots with the following core capabilities:
- Code Execution Environment: Run code in various programming languages
- File Operations: Read/write files, manage directories
- Git Integration: Version control operations
- Tool Invocation: Call MCP (Model Context Protocol) tools
- System Commands: Execute Bash commands
π Runtime Selection Guideβ
Wegent currently supports three main runtimes:
ClaudeCode Runtime (Recommended)β
Use Cases:
- Code development and refactoring
- File operations and management
- Git branch management and commits
- Complex tasks requiring tool invocation
Features:
- β Based on Claude Agent SDK
- β Supports MCP tool invocation
- β Full filesystem access
- β Git integration
- β Mature and stable
Recommended for: Most development tasks
Agno Runtime (Experimental)β
Use Cases:
- Conversational interactions
- Experimental feature testing
- Special AI interaction needs
Features:
- β‘ Based on Agno framework
- β οΈ Experimental, features still being refined
- π¬ Suitable for advanced users
Recommended for: Conversational tasks or experimental scenarios
Dify Runtimeβ
Use Cases:
- Integration with Dify platform applications
- Workflow automation
- Multi-turn conversations with external AI services
- Agent-based chat applications
Features:
- β Supports multiple Dify application modes (chat, chatflow, workflow, agent-chat)
- β Session management for multi-turn conversations
- β Task cancellation support
- β Seamless integration with Dify ecosystem
Environment Variables:
DIFY_API_KEY: Your Dify API keyDIFY_BASE_URL: Dify server URL (default:https://api.dify.ai/v1)DIFY_APP_ID: Dify application IDDIFY_PARAMS: Additional parameters in JSON format
Recommended for: Teams using Dify for AI application development
Decision Tableβ
| Feature | ClaudeCode | Agno | Dify |
|---|---|---|---|
| Stability | βββββ Mature | βββ Experimental | ββββ Stable |
| Code Development | βββββ Excellent | ββ Basic | ββ Limited |
| Tool Invocation | βββββ Complete | βββ Partial | βββ Via Dify |
| Git Integration | βββββ Complete | ββ Limited | β None |
| Workflow Support | ββ Basic | ββ Basic | βββββ Excellent |
| Learning Curve | ββββ Simple | ββ Complex | ββββ Simple |
| Recommendation | β Development | β οΈ Advanced | β Workflows |
π Preset Shellsβ
Wegent comes with the following preset Shells that can be used immediately:
1. ClaudeCodeβ
Name: ClaudeCode
Runtime: ClaudeCode
Status: β
Available by default
Namespace: default
Recommended Scenarios:
- Daily code development
- Feature implementation
- Code refactoring
- Documentation writing
2. Agnoβ
Name: Agno
Runtime: Agno
Status: β οΈ Experimental
Namespace: default
Recommended Scenarios:
- Conversational interactions
- Experimental features
- Special requirements
3. Difyβ
Name: Dify
Runtime: Dify
Status: β
Available
Namespace: default
Recommended Scenarios:
- Integration with Dify platform
- Workflow automation tasks
- Multi-turn conversation applications
- Agent-chat interactions
π Configuration Stepsβ
Method 1: Use Preset Shells (Recommended for Beginners)β
The system already has ClaudeCode and Agno Shells preset. You can directly reference them when creating a Bot:
apiVersion: agent.wecode.io/v1
kind: Bot
metadata:
name: my-developer-bot
namespace: default
spec:
ghostRef:
name: my-ghost
namespace: default
shellRef:
name: ClaudeCode # Use preset Shell directly
namespace: default
modelRef:
name: my-model
namespace: default
Method 2: View Existing Shells via Web Interfaceβ
- Log in to Wegent Web interface (
http://localhost:3000) - Navigate to Resource Management β Shell Configuration
- View the list of Shells in the system
- Select an appropriate Shell for your Bot
Method 3: Create Custom Shellβ
If you need a custom Shell configuration:
Create via Web Interfaceβ
- Log in to Wegent Web interface
- Navigate to Resource Management β Shell Configuration
- Click Create New Shell button
- Fill in the following fields:
- Name: Unique identifier for the Shell (lowercase letters and hyphens)
- Namespace: Usually use
default - Runtime Type: Select
ClaudeCodeorAgno - Supported Model Types: (Optional) Specify model types this Shell supports
- Click Submit to create
Configure via YAML Fileβ
- Create a YAML configuration file (e.g.,
my-shell.yaml) - Write the configuration content (refer to YAML Configuration Reference below)
- Import the configuration via Web interface or API
π YAML Configuration Referenceβ
Complete Configuration Structureβ
apiVersion: agent.wecode.io/v1
kind: Shell
metadata:
name: <shell-name>
namespace: default
spec:
runtime: <runtime-type>
supportModel: []
status:
state: "Available"
Field Descriptionsβ
metadata Sectionβ
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Unique identifier for the Shell, use lowercase letters and hyphens |
namespace | string | Yes | Namespace, usually use default |
spec Sectionβ
| Field | Type | Required | Description |
|---|---|---|---|
runtime | string | Yes | Runtime type, options: ClaudeCode, Agno, Dify |
supportModel | array | No | List of supported model types, empty array means all models supported |
supportModel Explanation:
- Empty array
[]: Supports all model types - Specified list: Only supports model types in the list, e.g.,
["anthropic", "openai"]
status Sectionβ
| Field | Description |
|---|---|
state | Shell status: Available (available), Unavailable (unavailable) |
π‘ Configuration Examplesβ
Example 1: ClaudeCode Shell (Standard Configuration)β
apiVersion: agent.wecode.io/v1
kind: Shell
metadata:
name: ClaudeCode
namespace: default
spec:
runtime: ClaudeCode
supportModel: [] # Supports all model types
status:
state: "Available"
Description:
- This is the preset ClaudeCode Shell configuration
- Supports all types of AI models
- Suitable for most development tasks
Example 2: Agno Shell (Experimental)β
apiVersion: agent.wecode.io/v1
kind: Shell
metadata:
name: Agno
namespace: default
spec:
runtime: Agno
supportModel: [] # Supports all model types
status:
state: "Available"
Description:
- Preset Agno Shell configuration
- Experimental feature, suitable for advanced users
- Suitable for conversational interaction tasks
Example 3: Dify Shellβ
apiVersion: agent.wecode.io/v1
kind: Shell
metadata:
name: Dify
namespace: default
spec:
runtime: Dify
supportModel: [] # Supports all model types
status:
state: "Available"
Description:
- Preset Dify Shell configuration
- Integrates with Dify platform applications
- Supports chat, chatflow, workflow, and agent-chat modes
- Suitable for workflow automation and multi-turn conversations
Example 4: Custom Shell (Supports Specific Models Only)β
apiVersion: agent.wecode.io/v1
kind: Shell
metadata:
name: custom-claude-shell
namespace: default
spec:
runtime: ClaudeCode
supportModel: ["anthropic"] # Only supports Anthropic models
status:
state: "Available"
Description:
- Custom Shell configuration
- Only supports Anthropic models (Claude series)
- Suitable for scenarios with specific model restrictions
Example 5: Development Environment Shellβ
apiVersion: agent.wecode.io/v1
kind: Shell
metadata:
name: dev-environment-shell
namespace: development
spec:
runtime: ClaudeCode
supportModel: []
status:
state: "Available"
Description:
- Development environment dedicated Shell
- Uses separate namespace
development - Suitable for multi-environment management
π§ Shell Configuration and Bot Referenceβ
Referencing Shell in Botβ
apiVersion: agent.wecode.io/v1
kind: Bot
metadata:
name: my-bot
namespace: default
spec:
ghostRef:
name: my-ghost
namespace: default
shellRef:
name: ClaudeCode # Reference Shell
namespace: default
modelRef:
name: my-model
namespace: default
Cross-Namespace Referenceβ
apiVersion: agent.wecode.io/v1
kind: Bot
metadata:
name: my-bot
namespace: team-a
spec:
ghostRef:
name: my-ghost
namespace: team-a
shellRef:
name: ClaudeCode
namespace: default # Reference Shell from default namespace
modelRef:
name: my-model
namespace: team-a
β οΈ FAQβ
Q1: How to view available Shells in the system?β
Answer: View via the following methods:
Method 1: Web Interface
- Log in to Wegent Web interface
- Navigate to Resource Management β Shell Configuration
- View the Shell list
Method 2: API Query
- Visit
http://localhost:8000/api/docs - Use Shell-related API endpoints to query
Q2: What's the difference between ClaudeCode, Agno, and Dify?β
Answer:
| Feature | ClaudeCode | Agno | Dify |
|---|---|---|---|
| Maturity | Mature and stable | Experimental | Stable |
| Primary Use | Code development | Conversational interaction | Workflow automation |
| Tool Support | Complete | Partial | Via Dify platform |
| Recommendation | β Recommended | β οΈ Advanced users | β For workflows |
Suggestion:
- For code development tasks, use ClaudeCode
- For workflow automation and Dify integration, use Dify
- For experimental features, use Agno
Q3: How to check Shell status?β
Answer:
View Shell status via Web interface:
- Navigate to Resource Management β Shell Configuration
- Check the status column for each Shell
Availablemeans usable,Unavailablemeans not usable
Q4: How to troubleshoot configuration errors?β
Answer: Common errors and solutions:
Error 1: Shell status is Unavailable
- Check if runtime type is correct (
ClaudeCode,Agno, orDify) - Check if configuration format complies with YAML specification
- View backend logs:
docker-compose logs backend
Error 2: Bot cannot use Shell
- Check if Bot's Shell reference name and namespace are correct
- Confirm Shell status is
Available - Check if supportModel configuration restricts model types
Error 3: Cross-namespace reference fails
- Confirm Shell exists in target namespace
- Check namespace name spelling is correct
Q5: How to choose supportModel?β
Answer:
Use empty array [] (Recommended):
- Supports all model types
- Maximum flexibility
- Suitable for most scenarios
Specify model type list:
- Restricts available model types
- Suitable for scenarios with strict model requirements
- Example:
["anthropic"]only supports Claude models
Q6: Can I modify preset Shells?β
Answer:
The preset ClaudeCode and Agno Shells are recommended configurations; it's best not to modify them.
If you need custom configuration:
- Create a new Shell resource
- Use a different name
- Reference the newly created Shell in your Bot
Q7: Can one Shell be used by multiple Bots?β
Answer: Yes! This is the recommended approach.
# Multiple Bots sharing the same Shell
---
kind: Bot
metadata:
name: bot-1
spec:
shellRef:
name: ClaudeCode # Shared
namespace: default
---
kind: Bot
metadata:
name: bot-2
spec:
shellRef:
name: ClaudeCode # Shared
namespace: default
π Related Resourcesβ
Related Configuration Guidesβ
- Model Configuration Guide - Configure AI model parameters
Next Stepsβ
- Agent Settings - Configure agents and bots with Shells
Reference Documentationβ
- Core Concepts - Understand Shell's role in the architecture
- YAML Specification - Complete configuration format
π¬ Get Helpβ
Need assistance?
- π Check FAQ
- π Submit GitHub Issue
- π¬ Join community discussions
Configure your Shell and empower your Bots with powerful execution capabilities! π