Introduce Expert Agent. Prompt agents from UI.

This commit is contained in:
Shivering Ocelot committed 2025-07-17 19:50:14 -05:00
1 parent a7cc529e38
commit 7853b71587
6 files changed
+194 -28

No files matched your search

+9 -8
View File
@@ -12,10 +12,10 @@ import replicate
import database as db
import agent as agent_mod
import agents as agents_mod
from server import start_server
from chat import ChatView, Message, MESSAGE_PAGE_SIZE
from agents.character import CharacterAgent
from app_mixins import ChatMixin
class App(ChatMixin):
@@ -37,12 +37,13 @@ class App(ChatMixin):
# `Agent` is the kind 'basic', will be class `BasicAgent` in the future
self.agent_classes = [
agent_mod.BasicAgent,
CharacterAgent,
agents_mod.CharacterAgent,
agents_mod.ExpertAgent,
agent_mod.LlamaAgent,
agent_mod.CoderV1Agent,
agent_mod.ToolUsingAgent,
agent_mod.DebugAgent,
#agent_mod.LlamaAgent,
#agent_mod.CoderV1Agent,
#agent_mod.ToolUsingAgent,
#agent_mod.DebugAgent,
]
def sql_session(self):
@@ -231,9 +232,9 @@ class App(ChatMixin):
return fields
return {}
async def send_agent_prompt(self, agent_id, message):
async def send_agent_prompt(self, agent_id, instruction, input=None, options={}):
control = self.get_agent_control(agent_id)
response = await control.prompt(message)
response = await control.prompt(instruction, input, **options)
return response
async def call_agent_action(self, agent_id, action, args):