{"id":50492409,"url":"https://github.com/digitalkin-ai/digitalkin","last_synced_at":"2026-06-02T04:00:52.777Z","repository":{"id":356071905,"uuid":"936656046","full_name":"DigitalKin-ai/digitalkin","owner":"DigitalKin-ai","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-20T08:17:20.000Z","size":13072,"stargazers_count":1,"open_issues_count":12,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-20T11:36:04.318Z","etag":null,"topics":["agentic-ai","agentic-framework","agentic-mesh","digitalkin","python","sdk"],"latest_commit_sha":null,"homepage":"https://digitalkin-ai.github.io/digitalkin/main","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DigitalKin-ai.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-21T13:09:52.000Z","updated_at":"2026-05-20T08:14:53.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/DigitalKin-ai/digitalkin","commit_stats":null,"previous_names":["digitalkin-ai/digitalkin"],"tags_count":49,"template":false,"template_full_name":null,"purl":"pkg:github/DigitalKin-ai/digitalkin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DigitalKin-ai%2Fdigitalkin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DigitalKin-ai%2Fdigitalkin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DigitalKin-ai%2Fdigitalkin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DigitalKin-ai%2Fdigitalkin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DigitalKin-ai","download_url":"https://codeload.github.com/DigitalKin-ai/digitalkin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DigitalKin-ai%2Fdigitalkin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33805341,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-02T02:00:07.132Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic-ai","agentic-framework","agentic-mesh","digitalkin","python","sdk"],"created_at":"2026-06-02T04:00:47.632Z","updated_at":"2026-06-02T04:00:52.761Z","avatar_url":"https://github.com/DigitalKin-ai.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DigitalKin Python SDK\n\n[![CI](https://github.com/DigitalKin-ai/digitalkin/actions/workflows/ci.yml/badge.svg)](https://github.com/DigitalKin-ai/digitalkin/actions/workflows/ci.yml)\n[![PyPI](https://img.shields.io/pypi/v/digitalkin.svg)](https://pypi.org/project/digitalkin/)\n[![Python Version](https://img.shields.io/pypi/pyversions/digitalkin.svg)](https://pypi.org/project/digitalkin/)\n[![License](https://img.shields.io/github/license/DigitalKin-ai/digitalkin)](https://github.com/DigitalKin-ai/digitalkin/blob/main/LICENSE)\n\nThe DigitalKin Python SDK for building and managing modules within the\nDigitalKin agentic mesh. Create custom **Tools** and **Archetypes** that\ncommunicate over gRPC, register with a service mesh, and scale independently.\n\n## Features\n\n- **Async-native gRPC module system** — every module is a gRPC server built on\n  `grpcio` with full async support\n- **Typed module contracts** — Pydantic models for Input, Output, Setup, and\n  Secret schemas with protocol-based trigger dispatch\n- **Module-to-module communication** — tools and archetypes discover each other\n  via the registry and exchange requests over gRPC\n- **Tool resolution** — archetypes dynamically resolve and invoke tool modules\n  at runtime\n- **Admission queue \u0026 backpressure** — built-in request admission with\n  configurable concurrency limits\n- **Healthcheck protocols** — automatic ping, services, and status healthcheck\n  triggers registered on every module\n- **Profiling** — optional `[profiling]` extra with asyncio-inspector,\n  pyinstrument, viztracer, and yappi\n- **Batched history writes** — efficient storage writes for conversation history\n- **TaskIQ integration** — optional distributed task execution backed by\n  RabbitMQ and Redis (`[taskiq]` extra)\n\n## Installation\n\n```bash\n# With uv (recommended)\nuv add digitalkin\n\n# With pip\npip install digitalkin\n```\n\n**Optional extras:**\n\n```bash\n# Distributed task execution (RabbitMQ + Redis)\nuv add \"digitalkin[taskiq]\"\n\n# Async profiling tools\nuv add \"digitalkin[profiling]\"\n```\n\n## Quick Start\n\n### 1. Define your models\n\n```python\nfrom pydantic import BaseModel\nfrom digitalkin.models.module.base_types import DataModel, DataTrigger\n\n\nclass MessageInput(DataTrigger):\n    protocol: str = \"message\"\n    content: str\n\n\nclass InputModel(DataModel[MessageInput]):\n    root: MessageInput\n\n\nclass MessageOutput(DataTrigger):\n    protocol: str = \"message\"\n    reply: str\n\n\nclass OutputModel(DataModel[MessageOutput]):\n    root: MessageOutput\n```\n\n### 2. Create a module and trigger\n\n```python\nfrom digitalkin import ArchetypeModule, ModuleContext, TriggerHandler\nfrom digitalkin.models.module.setup_types import SetupModel\n\n\nclass MyArchetype(ArchetypeModule[InputModel, OutputModel, SetupModel, BaseModel]):\n    async def initialize(self, context: ModuleContext, setup_data: SetupModel) -\u003e None:\n        pass\n\n    async def cleanup(self, context: ModuleContext) -\u003e None:\n        pass\n\n\n@MyArchetype.register\nclass MessageTrigger(TriggerHandler[InputModel, SetupModel, OutputModel]):\n    protocol = \"message\"\n    input_format = InputModel\n    output_format = OutputModel\n\n    def __init__(self, context: ModuleContext) -\u003e None:\n        super().__init__(context)\n\n    async def handle(\n        self,\n        input_data: InputModel,\n        setup_data: SetupModel,\n        context: ModuleContext,\n    ) -\u003e None:\n        output = OutputModel(root=MessageOutput(reply=f\"Echo: {input_data.root.content}\"))\n        await self.send_message(context, output)\n```\n\n### 3. Run the server\n\n```python\nimport asyncio\nfrom digitalkin.grpc_servers.module_server import ModuleServer\n\nasync def main() -\u003e None:\n    server = ModuleServer(MyArchetype)\n    await server.start_async()\n    await server.await_termination()\n\nasyncio.run(main())\n```\n\n## TaskIQ with RabbitMQ\n\nTaskIQ integration allows the module to scale for heavy CPU tasks by\ndistributing requests to stateless worker instances.\n\n- **Decoupled Scalability**: RabbitMQ brokers messages, letting producers and\n  consumers scale independently.\n- **Reliability**: Durable queues, acknowledgements, and dead-lettering ensure\n  tasks aren't lost.\n- **Concurrency Control**: TaskIQ's worker pool manages parallel execution\n  without custom schedulers.\n- **Flexibility**: Built-in retries, exponential backoff, and Redis\n  result-backend for resilient workflows.\n\nTo enable RabbitMQ streaming:\n\n```bash\nsudo rabbitmq-plugins enable rabbitmq_stream\ntask start-taskiq\n```\n\n## Development\n\n### Prerequisites\n\n- Python 3.10+\n- [uv](https://astral.sh/uv) — modern Python package management\n- [Task](https://taskfile.dev/) — task runner\n\n### Setup\n\n```bash\ngit clone --recurse-submodules https://github.com/DigitalKin-ai/digitalkin.git\ncd digitalkin\n\ntask setup-dev\nsource .venv/bin/activate\n```\n\n### Common Tasks\n\n```bash\ntask linter               # Format + lint (ruff) + type check (mypy)\ntask check                # Linter + mypy + tests\ntask run-tests            # Run pytest via Docker\ntask build-package        # Build distribution\ntask bump-version -- patch|minor|major\n\ntask docs-serve           # Serve docs locally (mkdocs)\ntask docs-build           # Build docs\n\ntask generate-certificates  # Generate mTLS certs for gRPC\ntask start-taskiq           # Start TaskIQ worker\n\ntask clean                # Remove build artifacts + __pycache__\ntask clean-all            # Above + remove .venv\n```\n\n### Publishing Process\n\n1. Update code and commit changes (following conventional branch/commit\n   standard).\n2. Use `task bump-version -- major|minor|patch` to commit the new version.\n3. Use GitHub \"Create Release\" workflow to publish the new version.\n4. Workflow automatically publishes to Test PyPI and PyPI.\n\n## License\n\nThis project is licensed under the terms specified in the LICENSE file.\n\n---\n\nFor more information, visit our [Documentation](https://digitalkin.com) or\nreport issues on our\n[Issues page](https://github.com/DigitalKin-ai/digitalkin/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalkin-ai%2Fdigitalkin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigitalkin-ai%2Fdigitalkin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalkin-ai%2Fdigitalkin/lists"}