Digital Employee Core
A Python library for building and managing AI-powered digital employees with support for tools, MCPs (Model Context Protocol), and flexible configuration management.
Setup
This project supports Python 3.11, 3.12, and 3.13. Python 3.12 is the recommended development version.
1. Install Dependencies
poetry install
2. Configure Environment
Copy the example environment file and add your credentials:
cp .env.example .env
Edit .env with your configuration:
# Required
AIP_API_URL=https://your-ai-platform-url.com
AIP_API_KEY=your-api-key
Tool-Specific Requirements
E2B Sandbox Tool
This tool requires an api_key parameter to be provided. You can either:
- Pass the API key directly as a parameter when using the tool, or
- Set the
E2B_API_KEYenvironment variable (the tool will use this automatically if no parameter is provided)
Hybrid Vector Retrieval Tool
This tool requires AWS credentials to be configured in the AIP environment where the digital employee is deployed.
Configuration Management
Understanding MCP Configuration Placeholders
The library uses YAML configuration templates (digital_employee_core/config_templates/mcp_configs.yaml and tool_configs.yaml) that contain placeholder keys in dollar-brace format (e.g., ${GOOGLE_CALENDAR_MCP_URL}). These placeholders need to be replaced with actual values at runtime.
How Placeholders Work:
- Configuration Template (in
mcp_configs.yaml):
digital_employee_google_calendar_mcp:
config:
url: ${GOOGLE_CALENDAR_MCP_URL}
allowed_tools: ${GOOGLE_CALENDAR_MCP_ALLOWED_TOOLS:[]}
authentication:
type: api-key
key: X-API-Key
value: ${GOOGLE_MCP_X_API_KEY}
- Supply Values using
DigitalEmployeeConfiguration:
from digital_employee_core import DigitalEmployeeConfiguration
configurations = [
DigitalEmployeeConfiguration(
key="GOOGLE_CALENDAR_MCP_URL",
value="https://api.example.com/calendar/mcp"
),
DigitalEmployeeConfiguration(
key="GOOGLE_MCP_X_API_KEY",
value="your-secret-api-key"
),
]
- Pass to Digital Employee:
from digital_employee_core import DigitalEmployee
from digital_employee_core.connectors.mcps import google_calendar_mcp
de = DigitalEmployee(
identity=identity,
mcps=[google_calendar_mcp],
configurations=configurations # Placeholder values will be replaced automatically
)
de.deploy()
Available Placeholder Keys
Refer to digital_employee_core/config_templates/mcp_configs.yaml and tool_configs.yaml to see all available placeholders. Common ones include:
Google MCPs:
GOOGLE_CALENDAR_MCP_URLGOOGLE_CALENDAR_MCP_ALLOWED_TOOLSGOOGLE_DOCS_MCP_URLGOOGLE_DOCS_MCP_ALLOWED_TOOLSGOOGLE_DRIVE_MCP_URLGOOGLE_DRIVE_MCP_ALLOWED_TOOLSGOOGLE_MAIL_MCP_URLGOOGLE_MAIL_MCP_ALLOWED_TOOLSGOOGLE_SHEETS_MCP_URLGOOGLE_SHEETS_MCP_ALLOWED_TOOLSGOOGLE_MCP_X_API_KEY
GitHub MCP:
GITHUB_MCP_URLGITHUB_MCP_X_API_KEY
SQL Tool MCP:
SQL_TOOL_MCP_URLSQL_AUTH_TOKENSQL_API_KEYSQL_IDENTIFIER
Configuration Priority
Configurations can be supplied in three ways:
- At Initialization (applied during
deploy()):
de = DigitalEmployee(
identity=identity,
mcps=[google_calendar_mcp],
configurations=configurations
)
- At Runtime (applied per
run()call):
response = de.run(
message="Check my calendar",
configurations=runtime_configurations
)
- Combined (initialization configs + runtime configs are merged):
# Initialization configs for persistent settings
de = DigitalEmployee(
identity=identity,
configurations=base_configurations
)
de.deploy()
# Runtime configs for per-request overrides
response = de.run(
message="Send email",
configurations=request_specific_configurations
)
Run Examples
Basic Usage
poetry run python examples/basic_usage.py
Configuration Usage
poetry run python examples/configuration_usage.py
Subclass Example
poetry run python examples/subclass_example.py
Coordinator BYOK Model Example
MODEL_ID="openai/gpt-5.6-luna" \
MODEL_BASE_URL="https://api.openai.com/v1" \
MODEL_API_KEY="your_api_key_here" \
MODEL_HYPERPARAMETERS='{"reasoning": {"effort": "none"}}' \
poetry run python examples/byok_model_example.py
Additional BYOK examples for remote runs and subagent configuration are available in the examples directory.
MODEL_API_KEY may be loaded from .env or supplied in the environment. Set MODEL_ID and MODEL_BASE_URL directly in the environment or inline as shown above. If needed, set MODEL_HYPERPARAMETERS to a JSON object when supported.
When MODEL_ID and MODEL_BASE_URL are omitted, the examples default to openai/gpt-5.5 and https://api.openai.com/v1.
Credentials on a configured Model are sent to the server when a new agent is deployed. Remote readback does not return them. Treat the local model state, including agent.model_dump(), as secret material, and use agent.sanitized_model_dump() for logging or inspection.
Run Tests
# Run all tests
poetry run pytest
# Run with verbose output
poetry run pytest -v
# Run with coverage
poetry run coverage run -m pytest
poetry run coverage report
# Run with coverage HTML report
poetry run coverage run -m pytest
poetry run coverage html
# Open htmlcov/index.html in browser
# Run specific test file
poetry run pytest tests/digital_employee/test_digital_employee.py
Metadata
Release files for digital-employee-core 0.0.43
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| digital_employee_core-0.0.43.tar.gz | 94.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| digital_employee_core-0.0.43-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 222.6 kB
Release files / digital_employee_core-0.0.43.tar.gz
| Download URL | digital_employee_core-0.0.43.tar.gz |
|---|---|
| Size | 94.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a90dfe96115774f904837581f47b9afacae30f398cffba48f8c302d796112dcf
|
|
BLAKE2b-256 checksum How to use checksums |
29ed27b68d948b97f0fc036fe4b004fcb89fd79b44d91aca87dac1c77dd75543
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.12.3 Linux/6.14.0-1011-aws
|
Release files / digital_employee_core-0.0.43-py3-none-any.whl
| Download URL | digital_employee_core-0.0.43-py3-none-any.whl |
|---|---|
| Size | 128.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
400a0b896774063e274e5d58a921d6e21e1df5f366df1019f00d8d645d05ed4c
|
|
BLAKE2b-256 checksum How to use checksums |
8e574bd8366328302e44935a78538e3ea3a7d8defb50e2631117567a59e8c4cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.12.3 Linux/6.14.0-1011-aws
|
Security for digital-employee-core 0.0.43
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.