refactor(agent): remove memory agent, simplify runtime config system
This commit is contained in:
@@ -18,6 +18,7 @@ from schemas.agent.forwarded_props import (
|
||||
RuntimeMode,
|
||||
)
|
||||
from schemas.agent.visibility import SystemVisibilityBit, bit_mask
|
||||
from schemas.automation import RuntimeConfig
|
||||
from schemas.messages.chat_message import (
|
||||
AgentChatMessageMetadata,
|
||||
UserMessageAttachment,
|
||||
@@ -72,6 +73,7 @@ class AgentService:
|
||||
*,
|
||||
run_input: RunAgentInput,
|
||||
current_user: CurrentUser,
|
||||
runtime_config: RuntimeConfig | None = None,
|
||||
) -> TaskAccepted:
|
||||
created = False
|
||||
thread_id = run_input.thread_id
|
||||
@@ -82,6 +84,13 @@ class AgentService:
|
||||
except ValueError as exc:
|
||||
raise HTTPException(status_code=422, detail=str(exc)) from exc
|
||||
|
||||
if runtime_config is None:
|
||||
from v1.agent.system_agents_config import (
|
||||
build_runtime_config_from_system_agents,
|
||||
)
|
||||
|
||||
runtime_config = build_runtime_config_from_system_agents()
|
||||
|
||||
try:
|
||||
owner = await self._repository.get_session_owner(session_id=thread_id)
|
||||
except HTTPException as exc:
|
||||
@@ -124,6 +133,9 @@ class AgentService:
|
||||
"run_input": run_input.model_dump(
|
||||
mode="json", by_alias=True, exclude_none=True
|
||||
),
|
||||
"runtime_config": runtime_config.model_dump(
|
||||
mode="json", by_alias=True, exclude_none=True
|
||||
),
|
||||
"queue": queue,
|
||||
},
|
||||
dedup_key=None,
|
||||
|
||||
Reference in New Issue
Block a user