Skip to content

Commit 630cb8a

Browse files
committed
Remove MCPAgentDecorator (unused)
1 parent 71c8bb3 commit 630cb8a

File tree

5 files changed

+0
-264
lines changed

5 files changed

+0
-264
lines changed

LLMS.txt

Lines changed: 0 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -924,24 +924,6 @@ async def main():
924924
print(result)
925925
```
926926

927-
### Decorator Style Agent
928-
929-
```python
930-
from mcp_agent.core.decorator_app import MCPAgentDecorator
931-
932-
agent_app = MCPAgentDecorator("my-app")
933-
934-
@agent_app.agent(
935-
name="basic_agent",
936-
instruction="A simple agent that helps with basic tasks",
937-
servers=["filesystem"]
938-
)
939-
async def main():
940-
async with agent_app.run() as agent:
941-
result = await agent.send("basic_agent", "What files are here?")
942-
print(result)
943-
```
944-
945927
### Router-Based Workflow
946928

947929
```python
@@ -1777,67 +1759,6 @@ Provides both global fallback and instance-specific context support.
17771759
- `self`
17781760
- `context` ('Context')
17791761

1780-
### src/mcp_agent/core/decorator_app.py
1781-
1782-
**Module Description**: Decorator-based interface for MCP Agent applications. Provides a simplified way to create and manage agents using decorators.
1783-
1784-
**Class: `MCPAgentDecorator`**
1785-
- **Description**: A decorator-based interface for MCP Agent applications.
1786-
Provides a simplified way to create and manage agents using decorators.
1787-
1788-
**Class: `AgentAppWrapper`**
1789-
- **Description**: Wrapper class providing a simplified interface to the agent application.
1790-
1791-
**Function:** `MCPAgentDecorator.__init__(self, name: str, config_path: Optional[str] = None)`
1792-
1793-
- **Description**: Initialize the decorator interface. Args: name: Name of the application config_path: Optional path to config file
1794-
- **Parameters**
1795-
- `self`
1796-
- `name` (str): Name of the application
1797-
- `config_path` (Optional[str], optional): Optional path to config file
1798-
1799-
**Function:** `MCPAgentDecorator._load_config(self)`
1800-
1801-
- **Description**: Load configuration, properly handling YAML without dotenv processing
1802-
- **Parameters**
1803-
- `self`
1804-
1805-
**Function:** `MCPAgentDecorator.agent(self, name: str, instruction: str, servers: List[str]) -> Callable`
1806-
1807-
- **Description**: Decorator to create and register an agent. Args: name: Name of the agent instruction: Base instruction for the agent servers: List of server names the agent should connect to
1808-
- **Parameters**
1809-
- `self`
1810-
- `name` (str): Name of the agent
1811-
- `instruction` (str): Base instruction for the agent
1812-
- `servers` (List[str]): List of server names the agent should connect to
1813-
- **Returns**
1814-
- `Callable`: Return value
1815-
1816-
**Function:** `MCPAgentDecorator.decorator(func: Callable) -> Callable`
1817-
1818-
1819-
**Function:** `MCPAgentDecorator.wrapper()`
1820-
1821-
1822-
**Function:** `MCPAgentDecorator.run(self)`
1823-
1824-
- **Description**: Context manager for running the application. Handles setup and teardown of the app and agents.
1825-
- **Parameters**
1826-
- `self`
1827-
1828-
**Function:** `AgentAppWrapper.__init__(self, app: MCPApp, agents: Dict[str, Agent])`
1829-
1830-
1831-
**Function:** `AgentAppWrapper.send(self, agent_name: str, message: str) -> Any`
1832-
1833-
- **Description**: Send a message to a specific agent and get the response. Args: agent_name: Name of the agent to send message to message: Message to send Returns: Agent's response
1834-
- **Parameters**
1835-
- `self`
1836-
- `agent_name` (str): Name of the agent to send message to
1837-
- `message` (str): Message to send
1838-
- **Returns**
1839-
- `Any`: Agent's response
1840-
18411762
### src/mcp_agent/core/exceptions.py
18421763

18431764
**Module Description**: Custom exceptions for the mcp-agent library. Enables user-friendly error handling for common issues.

examples/basic/decorator/main.py

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

examples/basic/decorator/mcp_agent.config.yaml

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

examples/basic/decorator/requirements.txt

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

src/mcp_agent/core/decorator_app.py

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

0 commit comments

Comments
 (0)