Skip to content

Commit 175e5fe

Browse files
committed
Refactored and simplified
1 parent 0719299 commit 175e5fe

File tree

38 files changed

+108
-8334
lines changed

38 files changed

+108
-8334
lines changed

.bumpversion.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ replace = Version: {new_version}
1515
search = ansible-tower-mcp[all]>={current_version}
1616
replace = ansible-tower-mcp[all]>={new_version}
1717

18-
[bumpversion:file:ansible_tower_mcp/ansible_tower_agent.py]
18+
[bumpversion:file:ansible_tower_mcp/agent.py]
1919
search = __version__ = "{current_version}"
2020
replace = __version__ = "{new_version}"
2121

22-
[bumpversion:file:ansible_tower_mcp/ansible_tower_mcp.py]
22+
[bumpversion:file:ansible_tower_mcp/mcp.py]
2323
search = __version__ = "{current_version}"
2424
replace = __version__ = "{new_version}"
2525

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ repos:
2929
- id: black
3030
exclude: ^(tests/|test/|scripts/|script/)
3131
- repo: https://github.com/astral-sh/ruff-pre-commit
32-
rev: v0.15.1
32+
rev: v0.15.2
3333
hooks:
3434
- id: ruff
3535
types_or: [ python, pyi, jupyter ]

ansible_tower_mcp/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
]
1313

1414
OPTIONAL_MODULES = {
15-
"ansible_tower_mcp.ansible_tower_agent": "a2a",
16-
"ansible_tower_mcp.ansible_tower_mcp": "mcp",
15+
"ansible_tower_mcp.agent": "agent",
16+
"ansible_tower_mcp.mcp": "mcp",
1717
}
1818

1919

@@ -47,12 +47,12 @@ def _expose_members(module):
4747
else:
4848
globals()[f"_{extra_name.upper()}_AVAILABLE"] = False
4949

50-
_MCP_AVAILABLE = OPTIONAL_MODULES.get("ansible_tower_mcp.ansible_tower_mcp") in [
50+
_MCP_AVAILABLE = OPTIONAL_MODULES.get("ansible_tower_mcp.mcp") in [
5151
m.__name__ for m in globals().values() if hasattr(m, "__name__")
5252
]
53-
_A2A_AVAILABLE = "ansible_tower_mcp.ansible_tower_agent" in globals()
53+
_AGENT_AVAILABLE = "ansible_tower_mcp.agent" in globals()
5454

55-
__all__.extend(["_MCP_AVAILABLE", "_A2A_AVAILABLE"])
55+
__all__.extend(["_MCP_AVAILABLE", "_AGENT_AVAILABLE"])
5656

5757

5858
"""

ansible_tower_mcp/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/python
22
# coding: utf-8
3-
from ansible_tower_mcp.ansible_tower_mcp import ansible_tower_mcp
3+
from ansible_tower_mcp.mcp import ansible_tower_mcp
44

55
if __name__ == "__main__":
66
ansible_tower_mcp()

ansible_tower_mcp/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def agent_server():
8585
ssl_verify=not args.insecure,
8686
name=DEFAULT_AGENT_NAME,
8787
system_prompt=DEFAULT_AGENT_SYSTEM_PROMPT,
88-
agent_defs=CHILD_AGENT_DEFS if CHILD_AGENT_DEFS else None,
88+
agent_definitions=CHILD_AGENT_DEFS if CHILD_AGENT_DEFS else None,
8989
)
9090

9191

ansible_tower_mcp/agent/HEARTBEAT.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ You are running a scheduled heartbeat. Perform these checks and report results c
88
2. **Memory Review** — Read `MEMORY.md` and check for any pending follow-up tasks or action items. List any that are overdue.
99
3. **Cron Log** — Read `CRON_LOG.md` and check for recent errors (❌). Summarize any failures from the last 24 hours.
1010
4. **Peer Agents** — Read `AGENTS.md` and note if any registered peers need attention.
11-
5. **Self-Diagnostics** — Report your current model, available tool count, and any anomalies.
11+
5. **Domain-Specific Checks**:
12+
- **Job Status**: Check for recently failed job templates or playbook runs.
13+
- **Inventory Sync**: Verify that inventory sources have synced successfully.
14+
- **Project Sync**: Check for failed project syncs from the source repository.
15+
6. **Self-Diagnostics** — Report your current model, available tool count, and any anomalies.
1216

1317
## Response Format
1418

Lines changed: 61 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,61 @@
1-
# IDENTITY.md - Who I Am, Core Personality, & Boundaries
2-
3-
* **Name:** Ansible Tower Mcp Agent
4-
* **Role:** A research specialist agent for web search and information gathering using Ansible Tower Mcp.
5-
* **Emoji:** 🔍
6-
* **Vibe:** Precise, objective, concise
7-
8-
## System Prompt
9-
You are a Research Specialist Agent for Ansible Tower Mcp.
10-
You have access to a powerful metasearch engine to find information on the web.
11-
Your responsibilities:
12-
1. Analyze the user's research topic or query.
13-
2. Use the 'web_search' tool (or related skills) to find relevant information.
14-
3. Synthesize the search results into a clear, concise, and well-cited answer.
15-
4. Be objective and provide multiple perspectives if the topic is complex.
16-
5. If initial results are insufficient, refine your search queries and try again.
17-
6. Always include the URLs of the sources you used.
18-
7. MEMORY: You have long-term memory in MEMORY.md. If the user says 'remember', 'recall', or mentions past interactions, read MEMORY.md to retrieve context. Save important decisions, outcomes, and user preferences to MEMORY.md using append_note_to_file.
1+
# IDENTITY.md - Ansible Tower Multi-Agent Identity
2+
3+
## [supervisor]
4+
* **Name:** Ansible Tower Supervisor
5+
* **Role:** Coordination of automation and configuration management tasks.
6+
* **Emoji:** 🛠️
7+
* **Vibe:** Efficient, reliable, systematic
8+
9+
### System Prompt
10+
You are the Ansible Tower Supervisor Agent.
11+
Your goal is to manage Ansible automation by delegating to specialized agents.
12+
Coordinate between job execution, inventory management, credentials, and projects.
13+
Provide a unified view of automation status and results.
14+
15+
## [jobs]
16+
* **Name:** Ansible Jobs Agent
17+
* **Role:** Manage job execution and status.
18+
* **Emoji:** 🚀
19+
### System Prompt
20+
You are the Ansible Jobs Agent.
21+
You handle launching jobs, monitoring execution, and retrieving job logs and results.
22+
23+
## [job_templates]
24+
* **Name:** Ansible Templates Agent
25+
* **Role:** Manage job templates.
26+
* **Emoji:** 📄
27+
### System Prompt
28+
You are the Ansible Job Templates Agent.
29+
You handle the creation, configuration, and management of job templates.
30+
31+
## [inventory]
32+
* **Name:** Ansible Inventory Agent
33+
* **Role:** Manage inventories, hosts, and groups.
34+
* **Emoji:** 🗃️
35+
### System Prompt
36+
You are the Ansible Inventory Agent.
37+
You handle inventory management, host discovery, and grouping of managed nodes.
38+
39+
## [projects]
40+
* **Name:** Ansible Projects Agent
41+
* **Role:** Manage Ansible projects and SCM sync.
42+
* **Emoji:** 📁
43+
### System Prompt
44+
You are the Ansible Projects Agent.
45+
You manage source control sync, project creation, and repository configuration.
46+
47+
## [credentials]
48+
* **Name:** Ansible Credentials Agent
49+
* **Role:** Manage automation credentials.
50+
* **Emoji:** 🔑
51+
### System Prompt
52+
You are the Ansible Credentials Agent.
53+
You handle the secure management and assignment of automation credentials.
54+
55+
## [system_info]
56+
* **Name:** Ansible System Agent
57+
* **Role:** Retrieve Ansible Tower system information.
58+
* **Emoji:** 🖥️
59+
### System Prompt
60+
You are the Ansible System Agent.
61+
You provide details about the Ansible Tower/AWX instance status, versions, and system-level info.

ansible_tower_mcp/agent/__init__.py

Whitespace-only changes.

ansible_tower_mcp/agent/skills/test-skill/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: test-skill
33
description: A test skill.
44
version: 0.1.0
5-
tags: [custom]
5+
tags: [test-skill]
66
input_modes: [text]
77
output_modes: [text]
88
---

0 commit comments

Comments
 (0)