mentortools/libs/: deep-agent-connector-0.1.0+2365441646 metadata and description

Simple index Newer version available

HTTP connector library for Mentortools Deep Agent API

author Mentortools
author_email dev@mentortools.com
classifiers
  • Programming Language :: Python :: 3
  • Programming Language :: Python :: 3.11
  • Programming Language :: Python :: 3.12
  • Programming Language :: Python :: 3.13
  • Programming Language :: Python :: 3.14
description_content_type text/markdown
requires_dist
  • aiohttp (>=3.13.0,<4.0.0)
  • http-tools-abm (>=6.5.77270,<7.0.0)
  • pydantic (>=2.0.0,<3.0.0)
requires_python >=3.11,<4.0
File Tox results History
deep_agent_connector-0.1.0+2365441646-py3-none-any.whl
Size
5 KB
Type
Python Wheel
Python
3
deep_agent_connector-0.1.0+2365441646.tar.gz
Size
3 KB
Type
Source

Deep Agent Connector Library

This folder follows the corporate team_member_server blueprint pattern: an installable Python package that acts as an HTTP client for this service.

Install (from source)

cd connector_library
poetry install

Usage

import asyncio

from deep_agent_connector.deep_agent_connector import (
    ChatMessageAttachment,
    ChatMessageAttachmentType,
    DeepAgentConnector,
)


async def main() -> None:
    async with DeepAgentConnector(base_url="http://localhost:8000", api_key=None) as client:
        health = await client.health()
        run = await client.create_run(
            user_id=1,
            portal_id=42,
            assistant_id=7,
            message="Hello",
            chat_id=123,
            chat_session_id=456,
            bot_chat_member_id=789,
        )
        print(health)
        print(run.run_id)


asyncio.run(main())

Attachments

The create_run method supports optional attachments. Use the ChatMessageAttachment model with ChatMessageAttachmentType enum values (IMAGE, VIDEO, ATTACHMENT).

import asyncio

from deep_agent_connector.deep_agent_connector import (
    ChatMessageAttachment,
    ChatMessageAttachmentType,
    DeepAgentConnector,
)


async def main() -> None:
    async with DeepAgentConnector(base_url="http://localhost:8000", api_key=None) as client:
        attachments = [
            ChatMessageAttachment(file_id="123", attachment_type=ChatMessageAttachmentType.IMAGE),
            ChatMessageAttachment(file_id="456", attachment_type=ChatMessageAttachmentType.VIDEO),
        ]
        run = await client.create_run(
            user_id=1,
            portal_id=42,
            assistant_id=7,
            message="Hello with attachment",
            chat_id=123,
            chat_session_id=456,
            bot_chat_member_id=789,
            attachments=attachments,
        )
        print(run.run_id)


asyncio.run(main())

Notes: