Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ jinoos/
agents/__pycache__/
conversation_logs/
agents/test.py
.claude
dist/
nanda_agent/
*egg-info
26 changes: 20 additions & 6 deletions agents/agent_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,24 +256,38 @@ def send_to_terminal(text, terminal_url, conversation_id, metadata=None):


def send_to_ui_client(message_text, from_agent, conversation_id):
print(f"[DEBUG] send_to_ui_client called with:")
print(f"[DEBUG] message_text: {message_text[:100]}...")
print(f"[DEBUG] from_agent: {from_agent}")
print(f"[DEBUG] conversation_id: {conversation_id}")
print(f"[DEBUG] UI_CLIENT_URL: {UI_CLIENT_URL}")

if not UI_CLIENT_URL:
print(f"No UI client URL configured. Cannot send message to UI client")
return False

try:
payload = {
"message": message_text,
"from_agent": from_agent,
"conversation_id": conversation_id,
"timestamp": datetime.now().isoformat()
}
print(f"[DEBUG] Payload being sent: {payload}")
print(f"Sending message to UI client: {message_text[:50]}...")

response = requests.post(
UI_CLIENT_URL,
json={
"message": message_text,
"from_agent": from_agent,
"conversation_id": conversation_id,
"timestamp": datetime.now().isoformat()
},
json=payload,
timeout=10,
verify=False # add this line to disable SSL verification
)

print(f"[DEBUG] Response status code: {response.status_code}")
print(f"[DEBUG] Response headers: {response.headers}")
print(f"[DEBUG] Response content: {response.content}")
print(f"[DEBUG] Response text: {response.text}")

if response.status_code == 200:
print(f"Successfully sent message to UI client")
return True
Expand Down
9 changes: 9 additions & 0 deletions agents/run_ui_agent_https.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,19 @@ def receive_message():
timestamp = data.get('timestamp', '')

reg_url = get_registry_url()
print(f"[DEBUG] Looking up sender name for agent: {from_agent}")
print(f"[DEBUG] Registry URL: {reg_url}")
print(f"[DEBUG] Full sender lookup URL: {reg_url}/sender/{from_agent}")

sender_name = requests.get(
f"{reg_url}/sender/{from_agent}",
verify=False # For development with self-signed certs
)

print(f"[DEBUG] Sender lookup response status: {sender_name.status_code}")
print(f"[DEBUG] Sender lookup response content: {sender_name.content}")
print(f"[DEBUG] Sender lookup response text: {sender_name.text}")

sender_name = sender_name.json().get("sender_name")

print("\n--- New message received ---")
Expand Down