Skip to content

Commit 07dc019

Browse files
committed
Add example configuration and entrypoint for callable agent; implement simple run function
1 parent 387d492 commit 07dc019

4 files changed

Lines changed: 3 additions & 35 deletions

File tree

examples/crewai_with_logs/app.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from crewai.tools import BaseTool
55
from pydantic import BaseModel, Field
66
from langchain_community.tools import DuckDuckGoSearchResults
7-
from unified_agent_interface.utils import patch_log
7+
from unified_agent_interface.utils import patch_log as capture
88

99
load_dotenv()
1010

@@ -58,7 +58,8 @@ def _run(self, query: str) -> str:
5858
return response
5959

6060

61-
patch_log(MyCustomDuckDuckGoTool._run, label="crewai", capture_return=True)
61+
capture(MyCustomDuckDuckGoTool._run, label="crewai", capture_return=True)
62+
capture(Agent.execute_task, label="crewai", capture_return=True)
6263

6364
search_tool = MyCustomDuckDuckGoTool()
6465

idea.md

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)