mirror of
https://github.com/cpacker/MemGPT.git
synced 2025-06-03 04:30:22 +00:00
feat: add mcp support to sleeptime (#1964)
This commit is contained in:
parent
cb4caf103a
commit
e3819cf066
@ -76,6 +76,7 @@ def load_multi_agent(
|
||||
agent_state=agent_state,
|
||||
interface=interface,
|
||||
user=actor,
|
||||
mcp_clients=mcp_clients,
|
||||
group_id=group.id,
|
||||
agent_ids=group.agent_ids,
|
||||
description=group.description,
|
||||
|
@ -1,9 +1,10 @@
|
||||
import asyncio
|
||||
import threading
|
||||
from datetime import datetime, timezone
|
||||
from typing import List, Optional
|
||||
from typing import Dict, List, Optional
|
||||
|
||||
from letta.agent import Agent, AgentState
|
||||
from letta.functions.mcp_client.base_client import BaseMCPClient
|
||||
from letta.groups.helpers import stringify_message
|
||||
from letta.interface import AgentInterface
|
||||
from letta.orm import User
|
||||
@ -26,6 +27,7 @@ class SleeptimeMultiAgent(Agent):
|
||||
interface: AgentInterface,
|
||||
agent_state: AgentState,
|
||||
user: User,
|
||||
mcp_clients: Optional[Dict[str, BaseMCPClient]] = None,
|
||||
# custom
|
||||
group_id: str = "",
|
||||
agent_ids: List[str] = [],
|
||||
@ -115,6 +117,7 @@ class SleeptimeMultiAgent(Agent):
|
||||
agent_state=participant_agent_state,
|
||||
interface=StreamingServerInterface(),
|
||||
user=self.user,
|
||||
mcp_clients=self.mcp_clients,
|
||||
)
|
||||
|
||||
prior_messages = []
|
||||
@ -212,6 +215,7 @@ class SleeptimeMultiAgent(Agent):
|
||||
agent_state=self.agent_state,
|
||||
interface=self.interface,
|
||||
user=self.user,
|
||||
mcp_clients=self.mcp_clients,
|
||||
)
|
||||
# Perform main agent step
|
||||
usage_stats = main_agent.step(
|
||||
|
Loading…
Reference in New Issue
Block a user