23 Commits

Author SHA1 Message Date
Jack Gerrits
853b00b0f0 Add message context to message handler (#367)
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-08-17 03:14:09 +00:00
peterychang
bc26ec3de4 Azure container code execution (#346)
* Azure container code execution

* fix check errors. Remove unnecessary file

* add TokenProvider class

* update deps

* addressing PR comments

* update docstring

* switch to aiohttp

* fix client timeout
2024-08-14 10:41:49 -04:00
Jack Gerrits
437dbefc32 Rename fields in agent id (#334)
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-08-07 10:25:44 -07:00
Jack Gerrits
1f9d5177d3 Instantiation context refactor (#293)
* WIP refactor instantiation context

* finish up changes

* Update python/src/agnext/core/_agent_runtime.py

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

* Update python/src/agnext/core/_agent_runtime.py

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

* add warning

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-08-02 11:02:45 -04:00
peterychang
136af65b74 Code execute cancellation (#299)
* Hook cancelation token into code execution

* Add unit test for code cancellation

* actually save the merge
2024-07-29 23:46:04 -07:00
peterychang
070a97ceaa make code execution async (#219)
* make code execution async

* python 3.10 does not support asyncio.timeout()

* make code execution cancellable

* make code execution async

* python 3.10 does not support asyncio.timeout()

* make code execution cancellable

* make entire callstack for code_executor async

* Update python/src/agnext/components/code_executor/_impl/local_commandline_code_executor.py

Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>

* fix variable description

* remove unnecessary code

* fix usage of execute_code_blocks

* fix usage of execute_code_blocks

---------

Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-07-26 22:37:34 +00:00
Jack Gerrits
7e75dc8df8 Add core components for topics (#278)
* Add core components for topics

* rename topic to topic id
2024-07-26 14:38:08 -04:00
Eric Zhu
84d4e27776 Add tool agent class for convience of creating AI agents (#271)
* Add tool agent class for convience of creating AI agents

* Merge remote-tracking branch 'origin/main' into ekzhu-tool-agent

* feat: Add return type annotation to test_tool_agent function
2024-07-25 11:20:42 -07:00
Jack Gerrits
3ba7a48b13 Implement try_get_underlying_agent_instance (#249) 2024-07-23 19:38:37 -04:00
Jack Gerrits
a52d3bab53 Agent factory can be async (#247) 2024-07-23 14:49:38 -04:00
Eric Zhu
c85da398a0 Cancellation for model client #90 (#240)
* Cancellation for model client #90

* format

* Use future
2024-07-22 10:59:16 -07:00
Eric Zhu
2041905acb Add token counting to chat completion client #220 (#239)
* Add token counting to chat completion client

* fix mypy

* ignore pyright for object type

* format
2024-07-19 18:44:22 -07:00
Jack Gerrits
05e72084e8 Allow model client to accept the tool schema directly (#196) 2024-07-09 16:44:58 -04:00
Jack Gerrits
bf32bb67ae [Python] Specify subscriptions as strings and not types (#169)
* Add infra for message serialization

* Add message type registry to handle type registration
2024-07-08 16:45:14 -04:00
Jack Gerrits
766635394a Update send_message to be a single async operation. Add start helper to runtime to manage this (#165) 2024-07-01 11:53:45 -04:00
Jack Gerrits
13b0d0deb4 Implement closure agent (#143) 2024-06-28 10:22:44 -04:00
Eric Zhu
8308c928cb Add process_until_idle; add tests for cascading scenario. (#136)
* Add process_until_idle; add tests for cascading scenario.

* await publish

* update examples

* update examples

---------

Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2024-06-27 11:46:06 -07:00
Jack Gerrits
ec17dd16ed Organize logging (#138) 2024-06-27 14:36:05 -04:00
Jack Gerrits
a13c971b16 Change send/publish api to better support async and represent reality (#137)
* Make send and publish better represent reality

* fix team-one
2024-06-27 13:40:12 -04:00
Jack Gerrits
f5f4c39238 Add infra for message serialization (#122) 2024-06-25 12:08:38 -04:00
Jack Gerrits
6189fdb05c simplify namespace usage (#116)
* simplify namespace usage

* format

* pyright
2024-06-24 16:52:09 -04:00
Jack Gerrits
2d74fa9caf add example of use contextvar (#105) 2024-06-22 14:50:32 -04:00
Jack Gerrits
d365a588cb Move python code to subdir (#98) 2024-06-20 15:19:56 -04:00