Skip to content

Commit 1312801

Browse files
committed
Update README to reflect Chef to Ansible conversion focus and remove MCP references
1 parent 27d7368 commit 1312801

1 file changed

Lines changed: 26 additions & 27 deletions

File tree

README.md

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,55 @@
1-
# X2A API
1+
# X2A API - Chef to Ansible Conversion
22

33
## Overview
44

5-
The X2A API is a FastAPI application that provides multiple specialized agents that handle Chef cookbook analysis, code generation, validation, and context retrieval using LlamaStack .
5+
The X2A API is a FastAPI application that provides specialized agents for converting Chef cookbooks to Ansible playbooks. The system uses LlamaStack for AI-powered analysis, validation, and code generation, specifically focused on Chef to Ansible migration workflows.
66

77
## Architecture
88

9-
10-
119
### Core Components
1210

13-
- **FastAPI Application**: Multi-agent REST API platform
11+
- **FastAPI Application**: Multi-agent REST API platform for Chef to Ansible conversion
1412
- **LlamaStack Integration**: AI analysis engine using `meta-llama/Llama-3.1-8B-Instruct`
15-
- **MCP Tools**: Model Context Protocol integration for ansible-lint validation
13+
- **Custom Tools**: Custom ansible-lint tool integration for validation
1614
- **Gunicorn/Uvicorn**: ASGI server for production deployment
1715

1816
### Container Image
1917

2018
The service is packaged using UBI 9 Python 3.11 base image:
2119

2220
```
23-
ghcr.io/x2ansible/x2a-api:latest
21+
ghcr.io/x2ansible/x2a-api-chef:latest
2422
```
2523

2624
## Available Agents
2725

2826
### 1. Chef Analysis Agent (`/api/chef/*`)
29-
Analyzes Chef cookbooks for migration planning.
27+
Analyzes Chef cookbooks for migration planning and conversion to Ansible.
3028

3129
**Features:**
3230
- Version requirement analysis (Chef/Ruby versions)
3331
- Dependency mapping and wrapper detection
34-
- Migration effort estimation
35-
- Consolidation recommendations
32+
- Migration effort estimation for Chef to Ansible conversion
33+
- Consolidation recommendations for Ansible playbook structure
3634

3735
### 2. Context Agent (`/api/context/*`)
38-
Retrieves infrastructure context using RAG (Retrieval-Augmented Generation).
36+
Retrieves infrastructure context using RAG (Retrieval-Augmented Generation) for Chef to Ansible conversion.
3937

4038
**Features:**
4139
- Knowledge search with vector database (ChromaDB)
42-
- Best practices retrieval
43-
- Pattern matching for infrastructure components
40+
- Best practices retrieval for Ansible playbook creation
41+
- Pattern matching for infrastructure components during conversion
4442

4543
### 3. Generate Agent (`/api/generate/*`)
46-
Generates Ansible playbooks from input code.
44+
Generates Ansible playbooks from Chef cookbook code.
4745

4846
**Features:**
49-
- Code conversion (Chef/Puppet → Ansible)
47+
- Chef to Ansible code conversion
5048
- Context-aware playbook generation
5149
- YAML format output without markdown wrappers
5250

5351
### 4. Validate Agent (`/api/validate/*`)
54-
Validates Ansible playbooks using MCP ansible-lint integration.
52+
Validates generated Ansible playbooks using custom ansible-lint tool integration.
5553

5654
**Features:**
5755
- Multiple validation profiles (basic, moderate, safety, shared, production)
@@ -64,7 +62,7 @@ Validates Ansible playbooks using MCP ansible-lint integration.
6462

6563
### Chef Analysis
6664
```bash
67-
# Analyze cookbook files
65+
# Analyze Chef cookbook files for conversion
6866
POST /api/chef/analyze
6967
{
7068
"cookbook_name": "apache-cookbook",
@@ -80,7 +78,7 @@ POST /api/chef/analyze/stream
8078

8179
### Context Search
8280
```bash
83-
# Search knowledge base
81+
# Search knowledge base for Chef to Ansible conversion
8482
POST /api/context/query
8583
{
8684
"code": "nginx configuration",
@@ -93,7 +91,7 @@ POST /api/context/query/stream
9391

9492
### Code Generation
9593
```bash
96-
# Generate Ansible playbook
94+
# Generate Ansible playbook from Chef code
9795
POST /api/generate/playbook
9896
{
9997
"input_code": "package 'httpd' do\n action :install\nend",
@@ -106,7 +104,7 @@ POST /api/generate/playbook/stream
106104

107105
### Playbook Validation
108106
```bash
109-
# Validate playbook with profile
107+
# Validate generated Ansible playbook with profile
110108
POST /api/validate/playbook
111109
{
112110
"playbook_content": "---\n- name: Test\n hosts: all\n tasks: []",
@@ -160,7 +158,7 @@ llamastack:
160158
agents:
161159
- name: "chef_analysis_chaining"
162160
model: "meta-llama/Llama-3.1-8B-Instruct"
163-
instructions: "You are an expert Chef cookbook analyst..."
161+
instructions: "You are an expert Chef cookbook analyst for Ansible conversion..."
164162

165163
- name: "context"
166164
model: "meta-llama/Llama-3.1-8B-Instruct"
@@ -178,7 +176,8 @@ agents:
178176

179177
- name: "validate"
180178
model: "meta-llama/Llama-3.1-8B-Instruct"
181-
toolgroups: ["mcp::ansible_lint"]
179+
tools:
180+
- name: "ansible_lint_tool"
182181
tool_config:
183182
tool_choice: "auto"
184183
max_infer_iters: 5
@@ -233,7 +232,7 @@ GET /api/agents/status
233232

234233
### Debug Endpoints
235234
```bash
236-
# Check MCP tool availability
235+
# Check custom tool availability
237236
GET /api/validate/debug/tools
238237

239238
# Test tool functionality
@@ -298,8 +297,8 @@ http://localhost:8000/docs
298297
- Reuses existing agents across application restarts
299298
- Session management per validation request
300299

301-
### MCP Integration
302-
- Uses Model Context Protocol for ansible-lint
300+
### Custom Tool Integration
301+
- Uses custom ansible-lint tool for validation
303302
- Structured JSON responses from linting tools
304303
- Profile-based validation rules
305304

@@ -340,8 +339,8 @@ http://localhost:8000/docs
340339
- Use single worker: `-w 1`
341340
- Check playbook size limits
342341

343-
### MCP Tool Issues
344-
- Verify ansible-lint toolgroup availability
342+
### Custom Tool Issues
343+
- Verify ansible-lint tool availability
345344
- Check LlamaStack connectivity
346345
- Review agent configuration
347346

0 commit comments

Comments
 (0)