diff options
| author | Ben Sima <ben@bensima.com> | 2025-12-14 22:52:20 -0500 |
|---|---|---|
| committer | Ben Sima <ben@bensima.com> | 2025-12-14 22:52:20 -0500 |
| commit | 6b4e8c4963ba286a6aaf3e6f1917290fee7677f3 (patch) | |
| tree | d48b4a5db145dc5cdc4f22a35b0b4dedc1ade565 /Omni/Agent/Telegram.hs | |
| parent | 8c07a16dd9a7a3ad1847d0c665265e98f7df5438 (diff) | |
Add HTTP request tools for agent API interactions
- Create Omni/Agent/Tools/Http.hs with http_get and http_post tools
- Support headers, query params, JSON body, 30s timeout
- Return structured JSON with status, headers, body
- Add 9 unit tests including real HTTP calls to httpbin.org
- Wire tools into Telegram agent's tool list
Completes t-265.2
Diffstat (limited to 'Omni/Agent/Telegram.hs')
| -rw-r--r-- | Omni/Agent/Telegram.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Omni/Agent/Telegram.hs b/Omni/Agent/Telegram.hs index 2f0a029..34cf0d1 100644 --- a/Omni/Agent/Telegram.hs +++ b/Omni/Agent/Telegram.hs @@ -90,6 +90,7 @@ import qualified Omni.Agent.Telegram.Types as Types import qualified Omni.Agent.Tools.Calendar as Calendar import qualified Omni.Agent.Tools.Email as Email import qualified Omni.Agent.Tools.Hledger as Hledger +import qualified Omni.Agent.Tools.Http as Http import qualified Omni.Agent.Tools.Notes as Notes import qualified Omni.Agent.Tools.Pdf as Pdf import qualified Omni.Agent.Tools.Python as Python @@ -961,7 +962,8 @@ processEngagedMessage tgConfig provider engineCfg msg uid userName chatId userMe then Email.allEmailTools else [] pythonTools = [Python.pythonExecTool] - tools = memoryTools <> searchTools <> webReaderTools <> pdfTools <> notesTools <> calendarTools <> todoTools <> messageTools <> hledgerTools <> emailTools <> pythonTools + httpTools = Http.allHttpTools + tools = memoryTools <> searchTools <> webReaderTools <> pdfTools <> notesTools <> calendarTools <> todoTools <> messageTools <> hledgerTools <> emailTools <> pythonTools <> httpTools let agentCfg = Engine.defaultAgentConfig |
