mentortools/libs/: deep-agent-connector-0.1.0+2365441646 metadata and description
HTTP connector library for Mentortools Deep Agent API
| author | Mentortools |
| author_email | dev@mentortools.com |
| classifiers |
|
| description_content_type | text/markdown |
| requires_dist |
|
| requires_python | >=3.11,<4.0 |
| File | Tox results | History |
|---|---|---|
deep_agent_connector-0.1.0+2365441646-py3-none-any.whl
|
|
|
deep_agent_connector-0.1.0+2365441646.tar.gz
|
|
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:
- Maximum 10 attachments per request
file_idmust be a string (the Mentortools API will convert it to an integer)attachment_typemust be one of:IMAGE,VIDEO,ATTACHMENT- Attachments are optional; omit the parameter or pass
Nonefor no attachments