Skip to main content

No project description provided

Project description

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

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

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 angle brackets (e.g., <GOOGLE_CALENDAR_MCP_URL>). These placeholders need to be replaced with actual values at runtime.

How Placeholders Work:

  1. Configuration Template (in mcp_configs.yaml):
digital_employee_google_calendar_mcp:
  config:
    url: <GOOGLE_CALENDAR_MCP_URL>
  authentication:
    type: api-key
    key: X-API-Key
    value: <GOOGLE_MCP_X_API_KEY>
  1. 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"
    ),
]
  1. 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_URL
  • GOOGLE_DOCS_MCP_URL
  • GOOGLE_DRIVE_MCP_URL
  • GOOGLE_MAIL_MCP_URL
  • GOOGLE_SHEETS_MCP_URL
  • GOOGLE_MCP_X_API_KEY

GitHub MCP:

  • GITHUB_MCP_URL
  • GITHUB_MCP_X_API_KEY

SQL Tool MCP:

  • SQL_TOOL_MCP_URL
  • SQL_AUTH_TOKEN
  • SQL_API_KEY
  • SQL_IDENTIFIER

Configuration Priority

Configurations can be supplied in three ways:

  1. At Initialization (applied during deploy()):
de = DigitalEmployee(
    identity=identity,
    mcps=[google_calendar_mcp],
    configurations=configurations
)
  1. At Runtime (applied per run() call):
response = de.run(
    message="Check my calendar",
    configurations=runtime_configurations
)
  1. 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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

digital_employee_core-0.0.2.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

digital_employee_core-0.0.2-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file digital_employee_core-0.0.2.tar.gz.

File metadata

  • Download URL: digital_employee_core-0.0.2.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.3 Linux/6.14.0-1011-aws

File hashes

Hashes for digital_employee_core-0.0.2.tar.gz
Algorithm Hash digest
SHA256 f38ad00e5c97c5a87048e88cf69120a99eaf91fa7967cb1dae318975bbf36730
MD5 b9780b09017af988657240eb20656dcf
BLAKE2b-256 a078422684403d95f818f3ca8c2f90503c9c17f78881c8097bc985fb2e654189

See more details on using hashes here.

File details

Details for the file digital_employee_core-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for digital_employee_core-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 37c6066a1450e90e5aae1e74293b735f9f1384a38795ae3a593e038f3dbd38ef
MD5 38936fcba1a31bf8e7f4a8e0071a65f8
BLAKE2b-256 9c3e5b28c45789a38f80603f2a85786102044b73d52b91db1cb269f9dbec260c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page