afm-cli 0.2.6__tar.gz → 0.2.7__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.
afm_cli-0.2.7/PKG-INFO ADDED
@@ -0,0 +1,152 @@
1
+ Metadata-Version: 2.4
2
+ Name: afm-cli
3
+ Version: 0.2.7
4
+ Summary: AFM CLI metapackage: installs afm-core and afm-langchain
5
+ License-Expression: Apache-2.0
6
+ Classifier: Development Status :: 3 - Alpha
7
+ Classifier: Programming Language :: Python :: 3.11
8
+ Requires-Dist: afm-core==0.1.4
9
+ Requires-Dist: afm-langchain>=0.1.0
10
+ Requires-Python: >=3.11
11
+ Project-URL: Repository, https://github.com/wso2/reference-implementations-afm
12
+ Description-Content-Type: text/markdown
13
+
14
+ # AFM CLI
15
+
16
+ [![PyPI version](https://img.shields.io/pypi/v/afm-cli.svg)](https://pypi.org/project/afm-cli/)
17
+ [![Python version](https://img.shields.io/pypi/pyversions/afm-cli.svg)](https://pypi.org/project/afm-cli/)
18
+ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
19
+
20
+ A command-line interface for running [Agent-Flavored Markdown (AFM)](https://github.com/wso2/agent-flavored-markdown) agents.
21
+
22
+ This package provides everything you need to run AFM agents, including:
23
+ - **afm-core**: Parser, validation, and interface implementations
24
+ - **afm-langchain**: LangChain-based execution backend with support for OpenAI and Anthropic
25
+
26
+ ## Installation
27
+
28
+ ```bash
29
+ pip install afm-cli
30
+ ```
31
+
32
+ ## Quick Start
33
+
34
+ ### 1. Set your API key
35
+
36
+ ```bash
37
+ export OPENAI_API_KEY="your-api-key-here"
38
+ # or
39
+ export ANTHROPIC_API_KEY="your-api-key-here"
40
+ ```
41
+
42
+ ### 2. Create an AFM file
43
+
44
+ Create a file named `agent.afm.md`:
45
+
46
+ ```markdown
47
+ ---
48
+ name: Friendly Assistant
49
+ interfaces:
50
+ - type: consolechat
51
+ model:
52
+ provider: openai
53
+ name: gpt-4o
54
+
55
+ ---
56
+ # Role
57
+ You are a helpful and friendly AI assistant.
58
+
59
+ # Instructions
60
+ - Be concise but thorough in your responses
61
+ - If you don't know something, say so honestly
62
+ - Always be polite and professional
63
+ ```
64
+
65
+ ### 3. Run the agent
66
+
67
+ ```bash
68
+ afm run agent.afm.md
69
+ ```
70
+
71
+ This will start an interactive console chat with your agent.
72
+
73
+ ## Usage
74
+
75
+ ### `afm run <file>`
76
+
77
+ Run an AFM agent file and start its configured interfaces.
78
+
79
+ ```bash
80
+ # Run with default settings
81
+ afm run agent.afm.md
82
+
83
+ # Run on a specific port (for web interfaces)
84
+ afm run agent.afm.md --port 8080
85
+ ```
86
+
87
+ ### `afm validate <file>`
88
+
89
+ Validate an AFM file without running it.
90
+
91
+ ```bash
92
+ afm validate agent.afm.md
93
+ ```
94
+
95
+ ### `afm framework list`
96
+
97
+ List available execution backends.
98
+
99
+ ```bash
100
+ afm framework list
101
+ ```
102
+
103
+ ## Configuration
104
+
105
+ ### Environment Variables
106
+
107
+ - `OPENAI_API_KEY` - Required for OpenAI models
108
+ - `ANTHROPIC_API_KEY` - Required for Anthropic models
109
+
110
+ ### CLI Options
111
+
112
+ - `-p, --port PORT` - Port for web interfaces (default: 8000)
113
+ - `--help` - Show help message
114
+
115
+ ## Features
116
+
117
+ ### Interface Types
118
+
119
+ AFM agents can expose multiple interfaces simultaneously:
120
+
121
+ - **consolechat**: Interactive terminal-based chat (default)
122
+ - **webchat**: HTTP API with built-in web UI
123
+ - **webhook**: Webhook endpoint for event-driven agents
124
+
125
+ ### MCP Tool Support
126
+
127
+ Agents can use external tools via Model Context Protocol (MCP).
128
+
129
+ For more examples and detailed documentation, see [AFM Examples](https://wso2.github.io/agent-flavored-markdown/examples/).
130
+
131
+ ## Docker
132
+
133
+ You can also run agents using Docker:
134
+
135
+ ```bash
136
+ # Build the image
137
+ docker build -t afm-langchain-interpreter .
138
+
139
+ # Run with an AFM file mounted
140
+ docker run -v $(pwd)/agent.afm.md:/app/agent.afm.md \
141
+ -e OPENAI_API_KEY=$OPENAI_API_KEY \
142
+ -p 8000:8000 \
143
+ afm-langchain-interpreter afm /app/agent.afm.md
144
+ ```
145
+
146
+ ## Documentation
147
+
148
+ For more detailed documentation, see the [project README](https://github.com/wso2/reference-implementations-afm/tree/main/python-interpreter).
149
+
150
+ ## License
151
+
152
+ Apache-2.0
@@ -0,0 +1,139 @@
1
+ # AFM CLI
2
+
3
+ [![PyPI version](https://img.shields.io/pypi/v/afm-cli.svg)](https://pypi.org/project/afm-cli/)
4
+ [![Python version](https://img.shields.io/pypi/pyversions/afm-cli.svg)](https://pypi.org/project/afm-cli/)
5
+ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
6
+
7
+ A command-line interface for running [Agent-Flavored Markdown (AFM)](https://github.com/wso2/agent-flavored-markdown) agents.
8
+
9
+ This package provides everything you need to run AFM agents, including:
10
+ - **afm-core**: Parser, validation, and interface implementations
11
+ - **afm-langchain**: LangChain-based execution backend with support for OpenAI and Anthropic
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ pip install afm-cli
17
+ ```
18
+
19
+ ## Quick Start
20
+
21
+ ### 1. Set your API key
22
+
23
+ ```bash
24
+ export OPENAI_API_KEY="your-api-key-here"
25
+ # or
26
+ export ANTHROPIC_API_KEY="your-api-key-here"
27
+ ```
28
+
29
+ ### 2. Create an AFM file
30
+
31
+ Create a file named `agent.afm.md`:
32
+
33
+ ```markdown
34
+ ---
35
+ name: Friendly Assistant
36
+ interfaces:
37
+ - type: consolechat
38
+ model:
39
+ provider: openai
40
+ name: gpt-4o
41
+
42
+ ---
43
+ # Role
44
+ You are a helpful and friendly AI assistant.
45
+
46
+ # Instructions
47
+ - Be concise but thorough in your responses
48
+ - If you don't know something, say so honestly
49
+ - Always be polite and professional
50
+ ```
51
+
52
+ ### 3. Run the agent
53
+
54
+ ```bash
55
+ afm run agent.afm.md
56
+ ```
57
+
58
+ This will start an interactive console chat with your agent.
59
+
60
+ ## Usage
61
+
62
+ ### `afm run <file>`
63
+
64
+ Run an AFM agent file and start its configured interfaces.
65
+
66
+ ```bash
67
+ # Run with default settings
68
+ afm run agent.afm.md
69
+
70
+ # Run on a specific port (for web interfaces)
71
+ afm run agent.afm.md --port 8080
72
+ ```
73
+
74
+ ### `afm validate <file>`
75
+
76
+ Validate an AFM file without running it.
77
+
78
+ ```bash
79
+ afm validate agent.afm.md
80
+ ```
81
+
82
+ ### `afm framework list`
83
+
84
+ List available execution backends.
85
+
86
+ ```bash
87
+ afm framework list
88
+ ```
89
+
90
+ ## Configuration
91
+
92
+ ### Environment Variables
93
+
94
+ - `OPENAI_API_KEY` - Required for OpenAI models
95
+ - `ANTHROPIC_API_KEY` - Required for Anthropic models
96
+
97
+ ### CLI Options
98
+
99
+ - `-p, --port PORT` - Port for web interfaces (default: 8000)
100
+ - `--help` - Show help message
101
+
102
+ ## Features
103
+
104
+ ### Interface Types
105
+
106
+ AFM agents can expose multiple interfaces simultaneously:
107
+
108
+ - **consolechat**: Interactive terminal-based chat (default)
109
+ - **webchat**: HTTP API with built-in web UI
110
+ - **webhook**: Webhook endpoint for event-driven agents
111
+
112
+ ### MCP Tool Support
113
+
114
+ Agents can use external tools via Model Context Protocol (MCP).
115
+
116
+ For more examples and detailed documentation, see [AFM Examples](https://wso2.github.io/agent-flavored-markdown/examples/).
117
+
118
+ ## Docker
119
+
120
+ You can also run agents using Docker:
121
+
122
+ ```bash
123
+ # Build the image
124
+ docker build -t afm-langchain-interpreter .
125
+
126
+ # Run with an AFM file mounted
127
+ docker run -v $(pwd)/agent.afm.md:/app/agent.afm.md \
128
+ -e OPENAI_API_KEY=$OPENAI_API_KEY \
129
+ -p 8000:8000 \
130
+ afm-langchain-interpreter afm /app/agent.afm.md
131
+ ```
132
+
133
+ ## Documentation
134
+
135
+ For more detailed documentation, see the [project README](https://github.com/wso2/reference-implementations-afm/tree/main/python-interpreter).
136
+
137
+ ## License
138
+
139
+ Apache-2.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "afm-cli"
3
- version = "0.2.6"
3
+ version = "0.2.7"
4
4
  description = "AFM CLI metapackage: installs afm-core and afm-langchain"
5
5
  readme = "README.md"
6
6
  classifiers = [
@@ -11,8 +11,8 @@ license = "Apache-2.0"
11
11
  requires-python = ">=3.11"
12
12
  urls = { Repository = "https://github.com/wso2/reference-implementations-afm" }
13
13
  dependencies = [
14
- "afm-core==0.1.3",
15
- "afm-langchain",
14
+ "afm-core==0.1.4",
15
+ "afm-langchain>=0.1.0",
16
16
  ]
17
17
 
18
18
  [project.scripts]
@@ -0,0 +1,17 @@
1
+ # Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
2
+ #
3
+ # WSO2 LLC. licenses this file to you under the Apache License,
4
+ # Version 2.0 (the "License"); you may not use this file except
5
+ # in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing,
11
+ # software distributed under the License is distributed on an
12
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
13
+ # KIND, either express or implied. See the License for the
14
+ # specific language governing permissions and limitations
15
+ # under the License.
16
+
17
+ """AFM CLI metapackage — installs afm-core and afm-langchain."""
afm_cli-0.2.6/PKG-INFO DELETED
@@ -1,13 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: afm-cli
3
- Version: 0.2.6
4
- Summary: AFM CLI metapackage: installs afm-core and afm-langchain
5
- License-Expression: Apache-2.0
6
- Classifier: Development Status :: 3 - Alpha
7
- Classifier: Programming Language :: Python :: 3.11
8
- Requires-Dist: afm-core==0.1.3
9
- Requires-Dist: afm-langchain
10
- Requires-Python: >=3.11
11
- Project-URL: Repository, https://github.com/wso2/reference-implementations-afm
12
- Description-Content-Type: text/markdown
13
-
afm_cli-0.2.6/README.md DELETED
File without changes
@@ -1,4 +0,0 @@
1
- # Copyright (c) 2025
2
- # Licensed under the Apache License, Version 2.0
3
-
4
- """AFM CLI metapackage — installs afm-core and afm-langchain."""