aigency 0.0.1rc235167702__py3-none-any.whl → 0.1.0__py3-none-any.whl

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.
@@ -0,0 +1,171 @@
1
+ Metadata-Version: 2.4
2
+ Name: aigency
3
+ Version: 0.1.0
4
+ Summary: Add your description here
5
+ Requires-Python: >=3.12
6
+ Description-Content-Type: text/markdown
7
+ Requires-Dist: google-adk>=1.11.0
8
+ Requires-Dist: a2a-sdk>=0.3.0
9
+ Requires-Dist: litellm<1.73.0,>=1.72.6
10
+ Requires-Dist: pyyaml==6.0.2
11
+ Requires-Dist: PyJWT==2.10.1
12
+
13
+ # Aigency
14
+
15
+ AI Agent Development Acceleration Kit — build, run, and orchestrate intelligent agents with a production‑ready Agent‑to‑Agent (A2A) runtime.
16
+
17
+ Aigency provides primitives and utilities to define agents via simple YAML, instantiate them programmatically, and serve them over HTTP using the A2A server. It is designed to be modular, observable, and extensible.
18
+
19
+ - Python: >= 3.12
20
+ - PyPI package: `aigency`
21
+ - Core deps: `a2a-sdk`, `pyyaml`, `litellm`, `PyJWT`, `google-adk`
22
+
23
+ ## Features
24
+ - Config‑first agents: define agent behavior, skills, tools, and model in YAML
25
+ - Agent generator: instantiate agents, build agent cards, and executors programmatically
26
+ - A2A integration: serve agents over HTTP with Starlette‑based A2A server
27
+ - MCP‑friendly: integrate external tools/services via Model Context Protocol (optional)
28
+ - Observability: compatible with Phoenix and A2A Inspector for tracing and debugging
29
+ - Docker‑friendly: used across example demos and containers
30
+
31
+ ## Installation
32
+ ```bash
33
+ pip install aigency
34
+ ```
35
+ Requires Python 3.12+.
36
+
37
+ ## Quickstart
38
+ Minimal example for a single agent (no MCP) that responds in the user’s language.
39
+
40
+ 1) Create an agent config file (e.g., `agent_config.yaml`):
41
+ ```yaml
42
+ metadata:
43
+ name: hello_agent
44
+ description: A simple example agent that greets and answers briefly.
45
+ version: 1.0.0
46
+
47
+ service:
48
+ url: http://hello-agent:8080
49
+ capabilities:
50
+ streaming: true
51
+ interface:
52
+ default_input_modes: [text, text/plain]
53
+ default_output_modes: [text, text/plain]
54
+
55
+ agent:
56
+ model:
57
+ name: gemini-2.0-flash
58
+
59
+ instruction: |
60
+ """
61
+ You are a friendly, concise assistant. Always reply in the same language as the user.
62
+ Keep responses short and helpful.
63
+ """
64
+
65
+ skills:
66
+ - id: greet
67
+ name: Greet
68
+ description: Greets users and offers help
69
+ examples:
70
+ - "Hello! How can I help you today?"
71
+ ```
72
+
73
+ 2) Run a tiny A2A app (e.g., `app.py`):
74
+ ```python
75
+ import os
76
+ import uvicorn
77
+ from a2a.server.apps import A2AStarletteApplication
78
+ from a2a.server.request_handlers import DefaultRequestHandler
79
+ from a2a.server.tasks import InMemoryTaskStore
80
+ from aigency.agents.generator import AgentA2AGenerator
81
+ from aigency.utils.config_service import ConfigService
82
+
83
+ CONFIG_PATH = os.path.join(os.path.dirname(__file__), "agent_config.yaml")
84
+
85
+ config_service = ConfigService(config_file=CONFIG_PATH)
86
+ agent_config = config_service.config
87
+
88
+ agent = AgentA2AGenerator.create_agent(agent_config=agent_config)
89
+ agent_card = AgentA2AGenerator.build_agent_card(agent_config=agent_config)
90
+ executor = AgentA2AGenerator.build_executor(agent=agent, agent_card=agent_card)
91
+
92
+ request_handler = DefaultRequestHandler(
93
+ agent_executor=executor,
94
+ task_store=InMemoryTaskStore(),
95
+ )
96
+ app = A2AStarletteApplication(
97
+ agent_card=agent_card,
98
+ http_handler=request_handler,
99
+ ).build()
100
+
101
+ if __name__ == "__main__":
102
+ uvicorn.run(app, host="0.0.0.0", port=8080)
103
+ ```
104
+
105
+ 3) Start the server:
106
+ ```bash
107
+ python app.py
108
+ ```
109
+ Then open http://localhost:8080 to interact via the A2A HTTP interface or connect a compatible client.
110
+
111
+ ## Using Models & Providers
112
+ Aigency integrates with LLM providers via its dependencies. For Google Gemini models:
113
+
114
+ - Use API key (Google AI Studio):
115
+ - `GEMINI_API_KEY=your_gemini_api_key`
116
+ - `GOOGLE_GENAI_USE_VERTEXAI=FALSE`
117
+ - Or use Vertex AI (requires additional env like project/region and credentials):
118
+ - `GOOGLE_GENAI_USE_VERTEXAI=TRUE`
119
+
120
+ Set these environment variables before running your app if you use Gemini‑based models.
121
+
122
+ ## Configuration Reference (YAML)
123
+ Common top‑level sections:
124
+
125
+ - `metadata`: name, description, version
126
+ - `service`: url, capabilities, interface defaults
127
+ - `agent`:
128
+ - `model`: model name (e.g., `gemini-2.0-flash`)
129
+ - `instruction`: system prompt/persona
130
+ - `skills`: list of skills with `id`, `name`, `description`, and `examples`
131
+ - `tools`: optional integrations (e.g., MCP tools)
132
+ - `observability`: optional Phoenix/A2A Inspector configuration
133
+
134
+ Example of adding an MCP tool:
135
+ ```yaml
136
+ tools:
137
+ - type: mcp
138
+ name: sample_mcp
139
+ description: Example MCP tool
140
+ mcp_config:
141
+ url: sample-mcp-service
142
+ port: 8080
143
+ path: /mcp/
144
+ ```
145
+
146
+ ## Examples & Demos
147
+ Explore ready‑to‑run demos built with Aigency:
148
+
149
+ - Reception Agent (single agent, no MCP):
150
+ https://aigency-project.github.io/get_started/demos/reception_aigent
151
+ - Gossip Agent (single agent + MCP tools):
152
+ https://aigency-project.github.io/get_started/demos/gossip_agent
153
+ - Detective Aigency (multi‑agent system):
154
+ https://aigency-project.github.io/get_started/demos/detective_aigency/
155
+
156
+ Documentation site:
157
+ - https://aigency-project.github.io/
158
+
159
+ ## Observability
160
+ Aigency‑based apps can be observed with:
161
+ - Phoenix dashboard (tracing/metrics)
162
+ - A2A Inspector (agent/task introspection)
163
+
164
+ Refer to the demo repositories for docker‑compose setups that launch these services.
165
+
166
+ ## Development
167
+ - Python 3.12+
168
+ - Install dev deps and run tests as usual; for versioning helpers, see `scripts/version_manager.py` in this repo.
169
+
170
+ ## License
171
+ This project’s license is provided in the `LICENSE` file.
@@ -0,0 +1,26 @@
1
+ aigency/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ aigency/agents/client.py,sha256=M2j6NpzjG4aeLmYY0NMsgjb6HQSLMVz9Cba7WJsEIQ8,2651
3
+ aigency/agents/communicator.py,sha256=qr77SolCIiNrp7nmuFfPOscmdPnCWmgQwPQcBwJIlt4,5712
4
+ aigency/agents/executor.py,sha256=0FdWQodUeTnYbMGe3CPOYxzhQ2uF0S7m2aJudTrdx20,7494
5
+ aigency/agents/generator.py,sha256=D1O0Vn96kyruv6yvuZUWhE5yGxDpoUrYiDQpOEcS6N8,7363
6
+ aigency/schemas/aigency_config.py,sha256=qbcHjmmMAG_-nWY689aS9wQ0gzbroQTpjPb9MlDBfmc,1817
7
+ aigency/schemas/agent/agent.py,sha256=NamGZsk9ajOmIJiLyoSdFZsbJ8av6-0d2mTgHNG5z64,1910
8
+ aigency/schemas/agent/model.py,sha256=FKLoXiPamrsFs1G8jFQkn0nvdp3rIlpMUg5BWmL1Klc,1381
9
+ aigency/schemas/agent/remote_agent.py,sha256=wfqirTisFGQFwOAU_oKLyiYw_61ZZVp7lIfe1g_11ZA,1244
10
+ aigency/schemas/agent/skills.py,sha256=LZntfTygAhuv09m5URbkygDhCD0-Sl2A9gEAJkgCncg,1287
11
+ aigency/schemas/agent/tools.py,sha256=ANyzJstAFn3dg5JjpiwTGmkOHSFJ4-Ry7Fw2nmj1XNk,3526
12
+ aigency/schemas/metadata/metadata.py,sha256=9mKSJgLfwjhRrKD3pvdNIuhk6b8c3pz1YaVIb5qOWMY,1108
13
+ aigency/schemas/observability/observability.py,sha256=DHY4zmFg_qy7U97YILRJ02Y0tWNgcNB9w7akZaNbyfo,1302
14
+ aigency/schemas/observability/phoenix.py,sha256=SpiStSw5xbXkEZH8HW56rCidMyjBi3OT3Y2i4D0tA_k,1018
15
+ aigency/schemas/service/capabilities.py,sha256=sMQtqCaXYVnDebdKhZ48iKDL1h9CoXWoxh7TFm1LO6E,898
16
+ aigency/schemas/service/interface.py,sha256=Jcp9Wy2sArhdeh_PiQNqcl0f2IMbipo3Muw5EWIoiiE,1140
17
+ aigency/schemas/service/service.py,sha256=E_KZNiM-7DJS4Ezd8xPfFq_W8HkzIFZvzGe4sreDfjY,1415
18
+ aigency/tools/generator.py,sha256=wMk5rt8wXSCci_K-vVyUMKvNuWlJcnpB7Y3SxRnfgG4,4355
19
+ aigency/utils/config_service.py,sha256=ZE7xptJ20zk9sAJMxcDa2QYWMPhzfiW95gHquSX8E3s,5852
20
+ aigency/utils/logger.py,sha256=kOIWbCTFiT4coz3cqcvD-YAu_EqIy4bqLBdaJ-sYOnk,6602
21
+ aigency/utils/singleton.py,sha256=zwIj5c-A3F6BhK16AnwwxUX_qr_AbPAab-477nSGf7w,2267
22
+ aigency/utils/utils.py,sha256=qjnzCV_5yOT0XG870_jU-xYnQeK1TUqVksU5Rnefxcs,4470
23
+ aigency-0.1.0.dist-info/METADATA,sha256=XNj8kLxh_5HpkN5xAJrNEeVD_DZa6-ktlfW7CqnNXgo,5400
24
+ aigency-0.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
25
+ aigency-0.1.0.dist-info/top_level.txt,sha256=nr33Htucgjs3wJFNugPV8w7b9ZgSnytxCtRiinR3eb8,8
26
+ aigency-0.1.0.dist-info/RECORD,,
@@ -1,267 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: aigency
3
- Version: 0.0.1rc235167702
4
- Summary: Add your description here
5
- Requires-Python: >=3.12
6
- Description-Content-Type: text/markdown
7
- Requires-Dist: google-adk>=1.11.0
8
- Requires-Dist: a2a-sdk==0.3.0
9
- Requires-Dist: litellm<1.73.0,>=1.72.6
10
- Requires-Dist: pyyaml==6.0.2
11
- Requires-Dist: PyJWT==2.10.1
12
-
13
- # aigency-lib
14
-
15
- A library for creating and managing AI agents.
16
-
17
- ## Quick Start
18
-
19
- To test a simple agent:
20
-
21
- ```bash
22
- cd examples/simple_agents/hello_world_agent
23
- docker compose up
24
- ```
25
-
26
- ## 🔧 Version Management
27
-
28
- This project includes an automated system for managing versions in both development and production.
29
-
30
- ### Version Manager
31
-
32
- The `scripts/version_manager.py` script helps you manage your package versions locally.
33
-
34
- #### Available Commands
35
-
36
- ##### 1. View current information
37
- ```bash
38
- python scripts/version_manager.py show
39
- ```
40
- **What it does:**
41
- - Shows the current version in `pyproject.toml`
42
- - Shows the current git branch
43
- - Shows the current commit
44
- - If you're not on `main`, suggests a development version
45
-
46
- **Example output:**
47
- ```
48
- Current version: 0.0.1
49
- Branch: feature/new-agent
50
- Commit: a1b2c3d
51
- Suggested dev version: 0.0.1.dev20250409143022+feature/new-agent.a1b2c3d
52
- ```
53
-
54
- ##### 2. Create development version
55
- ```bash
56
- python scripts/version_manager.py dev
57
- ```
58
- **What it does:**
59
- - Takes the current version and creates a development version
60
- - Format: `version.devYYYYMMDDHHMMSS+branch.commit`
61
- - Automatically updates the `pyproject.toml`
62
-
63
- **Example:**
64
- ```bash
65
- # If you're on branch "feature/auth" with commit "abc123"
66
- python scripts/version_manager.py dev
67
- # Result: 0.0.1.dev20250409143022
68
- ```
69
-
70
- ##### 3. Set specific version
71
- ```bash
72
- python scripts/version_manager.py set --version "0.1.0"
73
- ```
74
- **What it does:**
75
- - Changes the version to the one you specify
76
- - Useful for releases or to fix versions
77
-
78
- **Examples:**
79
- ```bash
80
- # Release version
81
- python scripts/version_manager.py set --version "1.0.0"
82
-
83
- # Beta version
84
- python scripts/version_manager.py set --version "1.0.0b1"
85
-
86
- # Alpha version
87
- python scripts/version_manager.py set --version "1.0.0a1"
88
- ```
89
-
90
- ##### 4. Create Release Candidate version
91
- ```bash
92
- python scripts/version_manager.py rc --version "1.0.1"
93
- ```
94
- **What it does:**
95
- - Creates an RC version with the format `version-rc<commit>`
96
- - Useful for preparing releases on `release/*` branches
97
-
98
- ##### 5. Validate current version
99
- ```bash
100
- python scripts/version_manager.py validate
101
- ```
102
- **What it does:**
103
- - Validates that the current version is appropriate for the branch
104
- - Verifies semantic format on `main` and `release/*` branches
105
-
106
- ##### 6. Create dev with custom base version
107
- ```bash
108
- python scripts/version_manager.py dev --base-version "0.2.0"
109
- ```
110
- **What it does:**
111
- - Uses a different base version than the current one
112
- - Useful when you want to prepare a dev version for the next release
113
-
114
- ### 🚀 Recommended Workflow
115
-
116
- #### For daily development:
117
- ```bash
118
- # 1. View current status
119
- python scripts/version_manager.py show
120
-
121
- # 2. If you're on a feature branch, create dev version
122
- python scripts/version_manager.py dev
123
-
124
- # 3. Make your changes and commits
125
- git add .
126
- git commit -m "feat: new functionality"
127
-
128
- # 4. If you need to update the dev version (optional)
129
- python scripts/version_manager.py dev
130
- ```
131
-
132
- #### For releases:
133
- ```bash
134
- # 1. On main branch, set release version
135
- python scripts/version_manager.py set --version "1.0.0"
136
-
137
- # 2. Commit the version
138
- git add pyproject.toml
139
- git commit -m "bump: version 1.0.0"
140
-
141
- # 3. Use GitHub workflow to publish
142
- ```
143
-
144
- #### For testing:
145
- ```bash
146
- # Create specific test version
147
- python scripts/version_manager.py set --version "1.0.0rc1"
148
- ```
149
-
150
- ### ⚠️ PyPI Limitations
151
-
152
- PyPI doesn't allow "local versions" (versions with `+` and local identifiers). That's why we've adapted the format:
153
-
154
- - ❌ Not allowed: `1.0.0.dev20250409+feature.abc123`
155
- - ✅ Allowed: `1.0.0.dev20250409`
156
-
157
- **Solution for Release Candidates:**
158
- - We convert the commit hash (hexadecimal) to decimal
159
- - Example: commit `abc123` → `11256099` → version `1.0.1rc11256099`
160
- - This maintains commit uniqueness in a PyPI-compatible format
161
-
162
- **Result:**
163
- - Dev versions include unique timestamp
164
- - RC versions include commit hash (in decimal)
165
- - We maintain traceability without using local versions
166
-
167
- ### 📋 Practical Use Cases
168
-
169
- **Scenario 1: Working on a feature**
170
- ```bash
171
- git checkout -b feature/new-auth
172
- python scripts/version_manager.py dev
173
- # Now you have: 0.0.1.dev20250409143022
174
- ```
175
-
176
- **Scenario 2: Preparing release**
177
- ```bash
178
- git checkout main
179
- python scripts/version_manager.py set --version "1.0.0"
180
- git add pyproject.toml
181
- git commit -m "release: v1.0.0"
182
- ```
183
-
184
- **Scenario 3: Preparing Release Candidate**
185
- ```bash
186
- git checkout -b release/1.0.1
187
- python scripts/version_manager.py rc --version "1.0.1"
188
- # Result: 1.0.1rc12345678 (where 12345678 is the commit hash in decimal)
189
- ```
190
-
191
- **Scenario 4: Urgent hotfix**
192
- ```bash
193
- git checkout -b hotfix/critical-bug
194
- python scripts/version_manager.py dev --base-version "1.0.1"
195
- # Result: 1.0.1.dev20250409143022
196
- ```
197
-
198
- ## 🔄 Intelligent CI/CD Workflow
199
-
200
- The project includes a single intelligent workflow (`python-publish.yml`) that automatically handles different version types based on the branch:
201
-
202
- ### Automatic behavior by branch:
203
-
204
- #### 🚀 `main` Branch - Production Versions
205
- - **Trigger**: Push to `main` or manual execution
206
- - **Version**: Uses exactly the version from `pyproject.toml`
207
- - **Validations**:
208
- - ✅ Verifies it's a valid semantic version (e.g.: `1.0.0`)
209
- - ✅ Verifies it doesn't already exist on PyPI
210
- - ❌ Fails if it contains development suffixes (`dev`, `rc`, `alpha`, `beta`)
211
- - **Target**: PyPI production
212
-
213
- #### 🎯 `release/*` Branches - Release Candidates
214
- - **Trigger**: Push to `release/X.Y.Z` branch or manual execution
215
- - **Version**: `X.Y.ZrcN` where N is the commit hash in decimal (e.g.: `1.0.1rc12345678`)
216
- - **Validations**:
217
- - ✅ Verifies that `X.Y.Z` is a valid semantic version
218
- - ✅ Extracts version from branch name
219
- - ✅ Uses commit hash as unique identifier
220
- - ✅ PyPI-compatible format
221
- - **Target**: PyPI production
222
- - **Example**: Branch `release/1.0.1` + commit `abc123` → Version `1.0.1rc11256099`
223
-
224
- #### 🔧 Other Branches - Development Versions
225
- - **Trigger**: Push to any other branch or manual execution
226
- - **Version**: `current.devYYYYMMDDHHMMSS` (e.g.: `0.0.1.dev20250409143022`)
227
- - **Target**: PyPI production
228
- - **Note**: No local versions for PyPI compatibility
229
-
230
- ### Recommended workflow:
231
-
232
- ```bash
233
- # 1. Development on feature branch
234
- git checkout -b feature/new-functionality
235
- # Automatic version: 0.0.1.dev20250409143022+feature-new-functionality.abc123
236
-
237
- # 2. Prepare release
238
- git checkout -b release/1.0.0
239
- git push origin release/1.0.0
240
- # Automatic version: 1.0.0rc12345678
241
-
242
- # 3. Final release
243
- git checkout main
244
- python scripts/version_manager.py set --version "1.0.0"
245
- git add pyproject.toml
246
- git commit -m "release: v1.0.0"
247
- git push origin main
248
- # Version: 1.0.0 (with validations)
249
- ```
250
-
251
- ## 📦 Installation
252
-
253
- ```bash
254
- pip install aigency
255
- ```
256
-
257
- ## 🛠️ Development
258
-
259
- 1. Clone the repository
260
- 2. Install development dependencies
261
- 3. Use the version manager to manage versions during development
262
-
263
- ```bash
264
- git clone <repo-url>
265
- cd aigency-lib
266
- pip install -e .
267
- ```
@@ -1,23 +0,0 @@
1
- aigency/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- aigency/agents/executor.py,sha256=ozT0wMwHLfyHi7bLcIPvs1gqnuj8w33SzlsSLB0W55k,5276
3
- aigency/agents/generator.py,sha256=I3TFZYFHF5GIH2Piuwe-7o5g7rpha4g1I93-ARqDrEk,2508
4
- aigency/schemas/aigency_config.py,sha256=trFOLAFCekuBtEcCofMTXw_e_d7DRMB9UYum9Ci8Qg4,491
5
- aigency/schemas/agent/agent.py,sha256=3Fm0tN3QG6hhxs0uo8Z2grb8SUeGS1t632Zqqcdaw18,440
6
- aigency/schemas/agent/model.py,sha256=8gY7xXJdpePESctRDMMFfXIZbRtHJEbIXSyvy89Bbyo,316
7
- aigency/schemas/agent/skills.py,sha256=5yhcoQmadaCf0Yg67PuOGDWy3ZIA-T-8dZ0uRyJw0EE,225
8
- aigency/schemas/agent/tools.py,sha256=VXdA0cKptAzu-4Oa0McxoI7uZtpsGXjXfAxUKzv2f4E,885
9
- aigency/schemas/metadata/metadata.py,sha256=wu4TM8f8eOMb40-uOLRffJjgGptW_KVOablW4EpJBLc,156
10
- aigency/schemas/observability/observability.py,sha256=WEeXyCrow9j2VO6HS7tOPkcKItISYsVfmHzGM-ap9nQ,320
11
- aigency/schemas/observability/phoenix.py,sha256=bTJ2vhe2Khtme5h5mCHEVH1o4LJAQ8GcKP6rkjPMpjo,131
12
- aigency/schemas/service/capabilities.py,sha256=vhMHP5pIYeOQTD-aBs79p_g5O3soHb5asfc_UhS1OFA,139
13
- aigency/schemas/service/interface.py,sha256=csYJhwbD9M29LrCnd1G6pBYagFauJ-WRSfrK8NIU9oI,210
14
- aigency/schemas/service/service.py,sha256=OajLiu5ICUFUi-M8yB9nH9jKbEuBUV6foIVcPfqx9QI,304
15
- aigency/tools/generator.py,sha256=sXqZBiHMCZN6iwyXBk7gTrvIN3plNEuWqwwD1heFGc8,2446
16
- aigency/utils/config_service.py,sha256=yN0Hj_IsDSSoTM4cYmBvR_x6vZ4bsxkoPc3Xle1SnjY,3201
17
- aigency/utils/logger.py,sha256=NYvEknt2BeSqn484ivaLFwP0KbAtBxDXFoJiiKiXKeI,3796
18
- aigency/utils/singleton.py,sha256=u5stRwgwiXRt6b2vTX4W8zuchWvQ9kbcvztQDceaF3E,313
19
- aigency/utils/utils.py,sha256=1eA-RxMZW6QIxhrK9TbxysxwKhGiJqjrvOk69xR-zKo,2698
20
- aigency-0.0.1rc235167702.dist-info/METADATA,sha256=13Xlzj93-2hRUloYGv_e1pQZ9JraZ6nxDxx8LvlEpGg,7170
21
- aigency-0.0.1rc235167702.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
22
- aigency-0.0.1rc235167702.dist-info/top_level.txt,sha256=nr33Htucgjs3wJFNugPV8w7b9ZgSnytxCtRiinR3eb8,8
23
- aigency-0.0.1rc235167702.dist-info/RECORD,,