meshagent-agents 0.0.37__tar.gz → 0.0.39__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of meshagent-agents might be problematic. Click here for more details.

Files changed (52) hide show
  1. {meshagent_agents-0.0.37 → meshagent_agents-0.0.39}/CHANGELOG.md +6 -0
  2. meshagent_agents-0.0.39/PKG-INFO +64 -0
  3. meshagent_agents-0.0.39/README.md +29 -0
  4. meshagent_agents-0.0.39/meshagent/agents/__init__.py +32 -0
  5. {meshagent_agents-0.0.37 → meshagent_agents-0.0.39}/meshagent/agents/adapter.py +18 -9
  6. {meshagent_agents-0.0.37 → meshagent_agents-0.0.39}/meshagent/agents/agent.py +317 -214
  7. {meshagent_agents-0.0.37 → meshagent_agents-0.0.39}/meshagent/agents/chat.py +392 -267
  8. {meshagent_agents-0.0.37 → meshagent_agents-0.0.39}/meshagent/agents/context.py +58 -30
  9. meshagent_agents-0.0.39/meshagent/agents/development.py +30 -0
  10. meshagent_agents-0.0.39/meshagent/agents/hosting.py +182 -0
  11. {meshagent_agents-0.0.37 → meshagent_agents-0.0.39}/meshagent/agents/indexer.py +241 -224
  12. {meshagent_agents-0.0.37 → meshagent_agents-0.0.39}/meshagent/agents/listener.py +55 -52
  13. {meshagent_agents-0.0.37 → meshagent_agents-0.0.39}/meshagent/agents/mail.py +145 -109
  14. {meshagent_agents-0.0.37 → meshagent_agents-0.0.39}/meshagent/agents/planning.py +294 -199
  15. {meshagent_agents-0.0.37 → meshagent_agents-0.0.39}/meshagent/agents/prompt.py +14 -12
  16. meshagent_agents-0.0.39/meshagent/agents/pydantic.py +204 -0
  17. meshagent_agents-0.0.39/meshagent/agents/schemas/__init__.py +11 -0
  18. meshagent_agents-0.0.39/meshagent/agents/schemas/document.py +49 -0
  19. meshagent_agents-0.0.39/meshagent/agents/schemas/gallery.py +34 -0
  20. meshagent_agents-0.0.39/meshagent/agents/schemas/presentation.py +48 -0
  21. meshagent_agents-0.0.39/meshagent/agents/schemas/schema.py +129 -0
  22. meshagent_agents-0.0.39/meshagent/agents/schemas/super_editor_document.py +53 -0
  23. {meshagent_agents-0.0.37 → meshagent_agents-0.0.39}/meshagent/agents/single_shot_writer.py +37 -31
  24. meshagent_agents-0.0.39/meshagent/agents/thread_schema.py +102 -0
  25. {meshagent_agents-0.0.37 → meshagent_agents-0.0.39}/meshagent/agents/utils.py +20 -12
  26. meshagent_agents-0.0.39/meshagent/agents/version.py +1 -0
  27. {meshagent_agents-0.0.37 → meshagent_agents-0.0.39}/meshagent/agents/worker.py +48 -28
  28. {meshagent_agents-0.0.37 → meshagent_agents-0.0.39}/meshagent/agents/writer.py +36 -23
  29. meshagent_agents-0.0.39/meshagent_agents.egg-info/PKG-INFO +64 -0
  30. {meshagent_agents-0.0.37 → meshagent_agents-0.0.39}/meshagent_agents.egg-info/requires.txt +6 -6
  31. {meshagent_agents-0.0.37 → meshagent_agents-0.0.39}/pyproject.toml +6 -6
  32. meshagent_agents-0.0.37/PKG-INFO +0 -36
  33. meshagent_agents-0.0.37/README.md +0 -1
  34. meshagent_agents-0.0.37/meshagent/agents/__init__.py +0 -7
  35. meshagent_agents-0.0.37/meshagent/agents/development.py +0 -32
  36. meshagent_agents-0.0.37/meshagent/agents/hosting.py +0 -119
  37. meshagent_agents-0.0.37/meshagent/agents/pydantic.py +0 -167
  38. meshagent_agents-0.0.37/meshagent/agents/schemas/__init__.py +0 -0
  39. meshagent_agents-0.0.37/meshagent/agents/schemas/document.py +0 -38
  40. meshagent_agents-0.0.37/meshagent/agents/schemas/gallery.py +0 -25
  41. meshagent_agents-0.0.37/meshagent/agents/schemas/presentation.py +0 -32
  42. meshagent_agents-0.0.37/meshagent/agents/schemas/schema.py +0 -75
  43. meshagent_agents-0.0.37/meshagent/agents/schemas/super_editor_document.py +0 -47
  44. meshagent_agents-0.0.37/meshagent/agents/thread_schema.py +0 -60
  45. meshagent_agents-0.0.37/meshagent/agents/version.py +0 -1
  46. meshagent_agents-0.0.37/meshagent_agents.egg-info/PKG-INFO +0 -36
  47. {meshagent_agents-0.0.37 → meshagent_agents-0.0.39}/LICENSE +0 -0
  48. {meshagent_agents-0.0.37 → meshagent_agents-0.0.39}/MANIFEST.in +0 -0
  49. {meshagent_agents-0.0.37 → meshagent_agents-0.0.39}/meshagent_agents.egg-info/SOURCES.txt +0 -0
  50. {meshagent_agents-0.0.37 → meshagent_agents-0.0.39}/meshagent_agents.egg-info/dependency_links.txt +0 -0
  51. {meshagent_agents-0.0.37 → meshagent_agents-0.0.39}/meshagent_agents.egg-info/top_level.txt +0 -0
  52. {meshagent_agents-0.0.37 → meshagent_agents-0.0.39}/setup.cfg +0 -0
@@ -1,3 +1,9 @@
1
+ ## [0.0.39]
2
+ - Stability
3
+
4
+ ## [0.0.38]
5
+ - Stability
6
+
1
7
  ## [0.0.37]
2
8
  - Stability
3
9
 
@@ -0,0 +1,64 @@
1
+ Metadata-Version: 2.4
2
+ Name: meshagent-agents
3
+ Version: 0.0.39
4
+ Summary: Agent Building Blocks for Meshagent
5
+ License-Expression: Apache-2.0
6
+ Project-URL: Documentation, https://docs.meshagent.com
7
+ Project-URL: Website, https://www.meshagent.com
8
+ Project-URL: Source, https://www.meshagent.com
9
+ Requires-Python: >=3.12
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Requires-Dist: pyjwt~=2.10
13
+ Requires-Dist: pytest~=8.4
14
+ Requires-Dist: pytest-asyncio~=0.26
15
+ Requires-Dist: meshagent-api~=0.0.39
16
+ Requires-Dist: meshagent-tools~=0.0.39
17
+ Requires-Dist: meshagent-openai~=0.0.39
18
+ Requires-Dist: pydantic~=2.11
19
+ Requires-Dist: opentelemetry-distro~=0.54b1
20
+ Provides-Extra: all
21
+ Requires-Dist: meshagent-api[all]~=0.0.39; extra == "all"
22
+ Requires-Dist: chonkie~=0.5.1; extra == "all"
23
+ Requires-Dist: chonkie[semantic]~=0.5.1; extra == "all"
24
+ Requires-Dist: chonkie[openai]~=0.5.1; extra == "all"
25
+ Requires-Dist: aiosmtplib~=4.0.1; extra == "all"
26
+ Provides-Extra: sync
27
+ Requires-Dist: meshagent-api[sync]~=0.0.39; extra == "sync"
28
+ Provides-Extra: mail
29
+ Requires-Dist: aiosmtplib~=4.0.1; extra == "mail"
30
+ Provides-Extra: rag
31
+ Requires-Dist: chonkie~=0.5.1; extra == "rag"
32
+ Requires-Dist: chonkie[semantic]~=0.5.1; extra == "rag"
33
+ Requires-Dist: chonkie[openai]~=0.5.1; extra == "rag"
34
+ Dynamic: license-file
35
+
36
+ ### MeshAgent Agents
37
+
38
+ The ``meshagent.agents`` package provides higher-level agent classes that orchestrate tools and tasks. The primary agents you will build will use the ``TaskRunner``, ``Worker``, and ``ChatBot`` agent types. These agents extend the base ``Agent`` and ``SingleRoomAgent`` classes which setup the fundamentals for working with Agents in MeshAgent Rooms.
39
+
40
+ Note that agents use LLMAdapters and ToolResponseAdapters to translate between language model calls and tool executions. They also use the ServiceHost to run.
41
+
42
+ ### Agent
43
+ The ``Agent`` base class handles static info such as the agent name, description, and requirements. This class is not used directly, but is the foundation for specialized agents.
44
+
45
+ ### SingleRoomAgent
46
+ The ``SingleRoomAgent``extends the ``Agent`` class, connects to a ``RoomClient``, and installs any declared schemas or toolkits when the agent starts up. All other MeshAgent Agent types extend the ``SingleRoomAgent`` class with additional functionality.
47
+
48
+ ### TaskRunner
49
+ The ``TaskRunner`` agent is useful when you want to invoke an agent with a well-defined JSON schemas for input and output. This is important for running agents-as-tools or running remote tasks. Often you will define a ``TaskRunner`` and pass it to a ``ChatBot`` or ``VoiceBot`` as a tool for that agent to use.
50
+
51
+ ### Worker
52
+ The ``Worker`` is a queue-based ``SingleRoomAgent`` that processes queued messages with an LLM and optional tools. This is particularly helpful for running asynchronous jobs. With the ``Worker`` agent you can create a set of tasks that need to run in a Room and the ``Worker`` will execute all of the tasks in the queue.
53
+
54
+ ### ChatBot
55
+ The ``ChatBot`` is a conversational agent derived from the ``SingleRoomAgent``. It wires an LLMAdapter, optoinal tools, and manages chat threads for each user. This means multiple users can be in the same room interacting with a chat agent, but each user will have private messages with the agent. Check out the [Build and Deploy a Chat Agent](https://docs.meshagent.com/agents/standard/buildanddeploychatbot) example to learn how to create a simple Chat Agent without tools then add built-in MeshAgent tools and custom tools to the agent.
56
+
57
+ ---
58
+ ### Learn more about MeshAgent on our website or check out the docs for additional examples!
59
+
60
+ **Website**: [www.meshagent.com](https://www.meshagent.com/)
61
+
62
+ **Documentation**: [docs.meshagent.com](https://docs.meshagent.com/)
63
+
64
+ ---
@@ -0,0 +1,29 @@
1
+ ### MeshAgent Agents
2
+
3
+ The ``meshagent.agents`` package provides higher-level agent classes that orchestrate tools and tasks. The primary agents you will build will use the ``TaskRunner``, ``Worker``, and ``ChatBot`` agent types. These agents extend the base ``Agent`` and ``SingleRoomAgent`` classes which setup the fundamentals for working with Agents in MeshAgent Rooms.
4
+
5
+ Note that agents use LLMAdapters and ToolResponseAdapters to translate between language model calls and tool executions. They also use the ServiceHost to run.
6
+
7
+ ### Agent
8
+ The ``Agent`` base class handles static info such as the agent name, description, and requirements. This class is not used directly, but is the foundation for specialized agents.
9
+
10
+ ### SingleRoomAgent
11
+ The ``SingleRoomAgent``extends the ``Agent`` class, connects to a ``RoomClient``, and installs any declared schemas or toolkits when the agent starts up. All other MeshAgent Agent types extend the ``SingleRoomAgent`` class with additional functionality.
12
+
13
+ ### TaskRunner
14
+ The ``TaskRunner`` agent is useful when you want to invoke an agent with a well-defined JSON schemas for input and output. This is important for running agents-as-tools or running remote tasks. Often you will define a ``TaskRunner`` and pass it to a ``ChatBot`` or ``VoiceBot`` as a tool for that agent to use.
15
+
16
+ ### Worker
17
+ The ``Worker`` is a queue-based ``SingleRoomAgent`` that processes queued messages with an LLM and optional tools. This is particularly helpful for running asynchronous jobs. With the ``Worker`` agent you can create a set of tasks that need to run in a Room and the ``Worker`` will execute all of the tasks in the queue.
18
+
19
+ ### ChatBot
20
+ The ``ChatBot`` is a conversational agent derived from the ``SingleRoomAgent``. It wires an LLMAdapter, optoinal tools, and manages chat threads for each user. This means multiple users can be in the same room interacting with a chat agent, but each user will have private messages with the agent. Check out the [Build and Deploy a Chat Agent](https://docs.meshagent.com/agents/standard/buildanddeploychatbot) example to learn how to create a simple Chat Agent without tools then add built-in MeshAgent tools and custom tools to the agent.
21
+
22
+ ---
23
+ ### Learn more about MeshAgent on our website or check out the docs for additional examples!
24
+
25
+ **Website**: [www.meshagent.com](https://www.meshagent.com/)
26
+
27
+ **Documentation**: [docs.meshagent.com](https://docs.meshagent.com/)
28
+
29
+ ---
@@ -0,0 +1,32 @@
1
+ from .agent import (
2
+ Agent,
3
+ AgentCallContext,
4
+ AgentChatContext,
5
+ RequiredToolkit,
6
+ TaskRunner,
7
+ SingleRoomAgent,
8
+ )
9
+ from .development import connect_development_agent
10
+ from .listener import Listener, ListenerContext
11
+ from .hosting import RemoteTaskRunnerServer
12
+ from .adapter import ToolResponseAdapter, LLMAdapter
13
+ from .thread_schema import thread_schema
14
+ from .version import __version__
15
+
16
+
17
+ __all__ = [
18
+ Agent,
19
+ AgentCallContext,
20
+ AgentChatContext,
21
+ RequiredToolkit,
22
+ TaskRunner,
23
+ SingleRoomAgent,
24
+ connect_development_agent,
25
+ Listener,
26
+ ListenerContext,
27
+ RemoteTaskRunnerServer,
28
+ ToolResponseAdapter,
29
+ LLMAdapter,
30
+ thread_schema,
31
+ __version__,
32
+ ]
@@ -7,40 +7,49 @@ from typing import Any, Optional, Callable, TypeVar, Generic
7
7
 
8
8
  T = TypeVar("T")
9
9
 
10
+
10
11
  class ToolResponseAdapter(ABC):
11
12
  def __init__(self):
12
13
  pass
13
-
14
+
14
15
  @abstractmethod
15
16
  async def to_plain_text(self, *, room: RoomClient, response: Response):
16
17
  pass
17
18
 
18
19
  @abstractmethod
19
- async def create_messages(self, *, context: AgentChatContext, tool_call: Any, room: RoomClient, response: Response) -> list:
20
+ async def create_messages(
21
+ self,
22
+ *,
23
+ context: AgentChatContext,
24
+ tool_call: Any,
25
+ room: RoomClient,
26
+ response: Response,
27
+ ) -> list:
20
28
  pass
21
29
 
22
30
 
23
31
  class LLMAdapter(Generic[T]):
24
-
25
32
  def create_chat_context(self) -> AgentChatContext:
26
33
  return AgentChatContext()
27
-
34
+
28
35
  @abstractmethod
29
- async def check_for_termination(self, *, context: AgentChatContext, room: RoomClient):
36
+ async def check_for_termination(
37
+ self, *, context: AgentChatContext, room: RoomClient
38
+ ):
30
39
  return True
31
40
 
32
41
  @abstractmethod
33
- async def next(self,
42
+ async def next(
43
+ self,
34
44
  *,
35
45
  context: AgentChatContext,
36
46
  room: RoomClient,
37
47
  toolkits: Toolkit,
38
48
  tool_adapter: Optional[ToolResponseAdapter] = None,
39
49
  output_schema: Optional[dict] = None,
40
- event_handler: Optional[Callable[[T],None]] = None
41
- ) -> Any:
50
+ event_handler: Optional[Callable[[T], None]] = None,
51
+ ) -> Any:
42
52
  pass
43
53
 
44
54
  def validate(response: dict, output_schema: dict):
45
55
  validate(response, output_schema)
46
-