augagent 0.1.0__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.
- augagent-0.1.0/PKG-INFO +139 -0
- augagent-0.1.0/README.md +106 -0
- augagent-0.1.0/pyproject.toml +68 -0
- augagent-0.1.0/setup.cfg +4 -0
- augagent-0.1.0/src/augagent/__init__.py +90 -0
- augagent-0.1.0/src/augagent/agent.py +420 -0
- augagent-0.1.0/src/augagent/models.py +291 -0
- augagent-0.1.0/src/augagent/task.py +156 -0
- augagent-0.1.0/src/augagent/team.py +163 -0
- augagent-0.1.0/src/augagent/telemetry.py +50 -0
- augagent-0.1.0/src/augagent/tools.py +262 -0
- augagent-0.1.0/src/augagent.egg-info/PKG-INFO +139 -0
- augagent-0.1.0/src/augagent.egg-info/SOURCES.txt +15 -0
- augagent-0.1.0/src/augagent.egg-info/dependency_links.txt +1 -0
- augagent-0.1.0/src/augagent.egg-info/requires.txt +13 -0
- augagent-0.1.0/src/augagent.egg-info/top_level.txt +1 -0
- augagent-0.1.0/tests/test_smoke.py +142 -0
augagent-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: augagent
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A multi-agent Python framework with intuitive DX, powered by Pydantic.
|
|
5
|
+
Author: augagent contributors
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/augagent/augagent
|
|
8
|
+
Project-URL: Documentation, https://augagent.readthedocs.io
|
|
9
|
+
Project-URL: Repository, https://github.com/augagent/augagent
|
|
10
|
+
Project-URL: Issues, https://github.com/augagent/augagent/issues
|
|
11
|
+
Keywords: agents,multi-agent,ai,llm,pydantic,framework
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
19
|
+
Classifier: Typing :: Typed
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
Requires-Dist: pydantic>=2.0
|
|
23
|
+
Requires-Dist: httpx>=0.24
|
|
24
|
+
Provides-Extra: dev
|
|
25
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
26
|
+
Requires-Dist: pytest-asyncio>=0.21; extra == "dev"
|
|
27
|
+
Requires-Dist: ruff>=0.1; extra == "dev"
|
|
28
|
+
Requires-Dist: mypy>=1.5; extra == "dev"
|
|
29
|
+
Provides-Extra: docs
|
|
30
|
+
Requires-Dist: mkdocs>=1.5; extra == "docs"
|
|
31
|
+
Requires-Dist: mkdocs-material>=9.0; extra == "docs"
|
|
32
|
+
Requires-Dist: mkdocstrings[python]>=0.23; extra == "docs"
|
|
33
|
+
|
|
34
|
+
# AugAgent 🤖
|
|
35
|
+
|
|
36
|
+
**AugAgent** is a multi-agent framework designed in Python, providing a deeply intuitive Developer Experience (DX) heavily inspired by industry standards like CrewAI and AutoGen, but supercharged with **Pydantic** for rigid type safety and data validation.
|
|
37
|
+
|
|
38
|
+
By utilizing strict Pydantic schemas under the hood, AugAgent ensures that Language Models produce predictable, structured outputs, effectively eliminating hallucinated parameters and malformed function arguments before they ever reach your runtime code.
|
|
39
|
+
|
|
40
|
+
## 🚀 Why AugAgent?
|
|
41
|
+
|
|
42
|
+
- **Familiar, Intuitive DX**: If you've used CrewAI or AutoGen, you'll feel right at home. The `AugAgent` (Role/Goal/Backstory), `AugTask`, and `AugTeam` abstractions are heavily aligned with the latest industry orchestration standards.
|
|
43
|
+
- **Pydantic Native**: LLM configurations, chat schemas, and tool arguments are built on Pydantic v2.
|
|
44
|
+
- **OpenAI Compatible**: Easily plug in any OpenAI-compatible API endpoint (e.g. OpenAI, Azure, vLLM, Ollama) directly into the `LLMConfig`.
|
|
45
|
+
- **Automatic Tool Schemas**: The `@aug_tool` decorator dynamically generates strict OpenAI function-calling JSON schemas from standard Python type hints.
|
|
46
|
+
- **Context Chaining**: `AugTeam` orchestrators automatically chain task outputs as context for subsequent tasks.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 🛠️ Quick Start
|
|
51
|
+
|
|
52
|
+
Install AugAgent:
|
|
53
|
+
```bash
|
|
54
|
+
pip install augagent
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Below is an example of an orchestrated Research and Writing team using the framework:
|
|
58
|
+
|
|
59
|
+
```python
|
|
60
|
+
import asyncio
|
|
61
|
+
from augagent import AugAgent, AugTask, AugTeam, aug_tool, LLMConfig
|
|
62
|
+
from pydantic import Field
|
|
63
|
+
|
|
64
|
+
# 1. Define tools
|
|
65
|
+
|
|
66
|
+
@aug_tool
|
|
67
|
+
def search_web(query: str = Field(description="Search query")) -> str:
|
|
68
|
+
"""Search the web for information."""
|
|
69
|
+
print(f" [Tool Executing] Searching the web for: {query}")
|
|
70
|
+
# Mock search results for demonstration
|
|
71
|
+
if "quantum" in query.lower():
|
|
72
|
+
return "Quantum computing uses qubits. It can solve complex problems faster than classical computers."
|
|
73
|
+
return f"Found generic results for {query}."
|
|
74
|
+
|
|
75
|
+
@aug_tool
|
|
76
|
+
def fetch_article(url: str = Field(description="URL to fetch")) -> str:
|
|
77
|
+
"""Fetch the contents of an article."""
|
|
78
|
+
print(f" [Tool Executing] Fetching article: {url}")
|
|
79
|
+
return "This is the content of the article regarding " + url
|
|
80
|
+
|
|
81
|
+
# 2. Define agents
|
|
82
|
+
|
|
83
|
+
llm_config = LLMConfig(model="gpt-4o-mini", temperature=0.2)
|
|
84
|
+
|
|
85
|
+
researcher = AugAgent(
|
|
86
|
+
name="Researcher",
|
|
87
|
+
role="Senior Technology Researcher",
|
|
88
|
+
goal="Find comprehensive and accurate information on emerging technologies.",
|
|
89
|
+
backstory="You have 10 years of experience researching deep tech.",
|
|
90
|
+
llm_config=llm_config,
|
|
91
|
+
tools=[search_web, fetch_article],
|
|
92
|
+
verbose=True
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
writer = AugAgent(
|
|
96
|
+
name="Writer",
|
|
97
|
+
role="Technical Content Writer",
|
|
98
|
+
goal="Write engaging, accurate articles about technology.",
|
|
99
|
+
backstory="You write clear, accessible articles for a wide audience.",
|
|
100
|
+
llm_config=llm_config,
|
|
101
|
+
verbose=True
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
# 3. Define tasks
|
|
105
|
+
|
|
106
|
+
research_task = AugTask(
|
|
107
|
+
description="Research the topic: {topic}. Find key facts and recent advancements.",
|
|
108
|
+
expected_output="A bulleted list of key facts about {topic}.",
|
|
109
|
+
agent=researcher
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
writing_task = AugTask(
|
|
113
|
+
description="Write a short, engaging article about {topic} based on the research provided.",
|
|
114
|
+
expected_output="A 2-paragraph article in Markdown format.",
|
|
115
|
+
agent=writer
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
# 4. Assemble the team and kickoff
|
|
119
|
+
|
|
120
|
+
team = AugTeam(
|
|
121
|
+
agents=[researcher, writer],
|
|
122
|
+
tasks=[research_task, writing_task],
|
|
123
|
+
verbose=True
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
if __name__ == "__main__":
|
|
127
|
+
print(f"=== Kicking off AugTeam ===")
|
|
128
|
+
results = team.kickoff(inputs={"topic": "Quantum Computing"})
|
|
129
|
+
|
|
130
|
+
print("\n=== Final Results ===")
|
|
131
|
+
for idx, result in enumerate(results):
|
|
132
|
+
print(f"\nTask {idx + 1} ({result.agent_name}):")
|
|
133
|
+
print("-" * 40)
|
|
134
|
+
print(result.output)
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## 📚 Documentation
|
|
138
|
+
- [Architecture & Design Choices (WHY)](docs/ARCHITECTURE_WHY.md)
|
|
139
|
+
- [Antigravity Ledger (HOW)](docs/ANTIGRAVITY_LEDGER.md)
|
augagent-0.1.0/README.md
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# AugAgent 🤖
|
|
2
|
+
|
|
3
|
+
**AugAgent** is a multi-agent framework designed in Python, providing a deeply intuitive Developer Experience (DX) heavily inspired by industry standards like CrewAI and AutoGen, but supercharged with **Pydantic** for rigid type safety and data validation.
|
|
4
|
+
|
|
5
|
+
By utilizing strict Pydantic schemas under the hood, AugAgent ensures that Language Models produce predictable, structured outputs, effectively eliminating hallucinated parameters and malformed function arguments before they ever reach your runtime code.
|
|
6
|
+
|
|
7
|
+
## 🚀 Why AugAgent?
|
|
8
|
+
|
|
9
|
+
- **Familiar, Intuitive DX**: If you've used CrewAI or AutoGen, you'll feel right at home. The `AugAgent` (Role/Goal/Backstory), `AugTask`, and `AugTeam` abstractions are heavily aligned with the latest industry orchestration standards.
|
|
10
|
+
- **Pydantic Native**: LLM configurations, chat schemas, and tool arguments are built on Pydantic v2.
|
|
11
|
+
- **OpenAI Compatible**: Easily plug in any OpenAI-compatible API endpoint (e.g. OpenAI, Azure, vLLM, Ollama) directly into the `LLMConfig`.
|
|
12
|
+
- **Automatic Tool Schemas**: The `@aug_tool` decorator dynamically generates strict OpenAI function-calling JSON schemas from standard Python type hints.
|
|
13
|
+
- **Context Chaining**: `AugTeam` orchestrators automatically chain task outputs as context for subsequent tasks.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 🛠️ Quick Start
|
|
18
|
+
|
|
19
|
+
Install AugAgent:
|
|
20
|
+
```bash
|
|
21
|
+
pip install augagent
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Below is an example of an orchestrated Research and Writing team using the framework:
|
|
25
|
+
|
|
26
|
+
```python
|
|
27
|
+
import asyncio
|
|
28
|
+
from augagent import AugAgent, AugTask, AugTeam, aug_tool, LLMConfig
|
|
29
|
+
from pydantic import Field
|
|
30
|
+
|
|
31
|
+
# 1. Define tools
|
|
32
|
+
|
|
33
|
+
@aug_tool
|
|
34
|
+
def search_web(query: str = Field(description="Search query")) -> str:
|
|
35
|
+
"""Search the web for information."""
|
|
36
|
+
print(f" [Tool Executing] Searching the web for: {query}")
|
|
37
|
+
# Mock search results for demonstration
|
|
38
|
+
if "quantum" in query.lower():
|
|
39
|
+
return "Quantum computing uses qubits. It can solve complex problems faster than classical computers."
|
|
40
|
+
return f"Found generic results for {query}."
|
|
41
|
+
|
|
42
|
+
@aug_tool
|
|
43
|
+
def fetch_article(url: str = Field(description="URL to fetch")) -> str:
|
|
44
|
+
"""Fetch the contents of an article."""
|
|
45
|
+
print(f" [Tool Executing] Fetching article: {url}")
|
|
46
|
+
return "This is the content of the article regarding " + url
|
|
47
|
+
|
|
48
|
+
# 2. Define agents
|
|
49
|
+
|
|
50
|
+
llm_config = LLMConfig(model="gpt-4o-mini", temperature=0.2)
|
|
51
|
+
|
|
52
|
+
researcher = AugAgent(
|
|
53
|
+
name="Researcher",
|
|
54
|
+
role="Senior Technology Researcher",
|
|
55
|
+
goal="Find comprehensive and accurate information on emerging technologies.",
|
|
56
|
+
backstory="You have 10 years of experience researching deep tech.",
|
|
57
|
+
llm_config=llm_config,
|
|
58
|
+
tools=[search_web, fetch_article],
|
|
59
|
+
verbose=True
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
writer = AugAgent(
|
|
63
|
+
name="Writer",
|
|
64
|
+
role="Technical Content Writer",
|
|
65
|
+
goal="Write engaging, accurate articles about technology.",
|
|
66
|
+
backstory="You write clear, accessible articles for a wide audience.",
|
|
67
|
+
llm_config=llm_config,
|
|
68
|
+
verbose=True
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
# 3. Define tasks
|
|
72
|
+
|
|
73
|
+
research_task = AugTask(
|
|
74
|
+
description="Research the topic: {topic}. Find key facts and recent advancements.",
|
|
75
|
+
expected_output="A bulleted list of key facts about {topic}.",
|
|
76
|
+
agent=researcher
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
writing_task = AugTask(
|
|
80
|
+
description="Write a short, engaging article about {topic} based on the research provided.",
|
|
81
|
+
expected_output="A 2-paragraph article in Markdown format.",
|
|
82
|
+
agent=writer
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
# 4. Assemble the team and kickoff
|
|
86
|
+
|
|
87
|
+
team = AugTeam(
|
|
88
|
+
agents=[researcher, writer],
|
|
89
|
+
tasks=[research_task, writing_task],
|
|
90
|
+
verbose=True
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
if __name__ == "__main__":
|
|
94
|
+
print(f"=== Kicking off AugTeam ===")
|
|
95
|
+
results = team.kickoff(inputs={"topic": "Quantum Computing"})
|
|
96
|
+
|
|
97
|
+
print("\n=== Final Results ===")
|
|
98
|
+
for idx, result in enumerate(results):
|
|
99
|
+
print(f"\nTask {idx + 1} ({result.agent_name}):")
|
|
100
|
+
print("-" * 40)
|
|
101
|
+
print(result.output)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## 📚 Documentation
|
|
105
|
+
- [Architecture & Design Choices (WHY)](docs/ARCHITECTURE_WHY.md)
|
|
106
|
+
- [Antigravity Ledger (HOW)](docs/ANTIGRAVITY_LEDGER.md)
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "augagent"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "A multi-agent Python framework with intuitive DX, powered by Pydantic."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
requires-python = ">=3.10"
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "augagent contributors" },
|
|
14
|
+
]
|
|
15
|
+
keywords = ["agents", "multi-agent", "ai", "llm", "pydantic", "framework"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 3 - Alpha",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Programming Language :: Python :: 3.10",
|
|
21
|
+
"Programming Language :: Python :: 3.11",
|
|
22
|
+
"Programming Language :: Python :: 3.12",
|
|
23
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
24
|
+
"Typing :: Typed",
|
|
25
|
+
]
|
|
26
|
+
dependencies = [
|
|
27
|
+
"pydantic>=2.0",
|
|
28
|
+
"httpx>=0.24",
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
[project.optional-dependencies]
|
|
32
|
+
dev = [
|
|
33
|
+
"pytest>=7.0",
|
|
34
|
+
"pytest-asyncio>=0.21",
|
|
35
|
+
"ruff>=0.1",
|
|
36
|
+
"mypy>=1.5",
|
|
37
|
+
]
|
|
38
|
+
docs = [
|
|
39
|
+
"mkdocs>=1.5",
|
|
40
|
+
"mkdocs-material>=9.0",
|
|
41
|
+
"mkdocstrings[python]>=0.23",
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
[project.urls]
|
|
45
|
+
Homepage = "https://github.com/augagent/augagent"
|
|
46
|
+
Documentation = "https://augagent.readthedocs.io"
|
|
47
|
+
Repository = "https://github.com/augagent/augagent"
|
|
48
|
+
Issues = "https://github.com/augagent/augagent/issues"
|
|
49
|
+
|
|
50
|
+
[tool.setuptools.packages.find]
|
|
51
|
+
where = ["src"]
|
|
52
|
+
|
|
53
|
+
[tool.ruff]
|
|
54
|
+
target-version = "py310"
|
|
55
|
+
line-length = 100
|
|
56
|
+
|
|
57
|
+
[tool.ruff.lint]
|
|
58
|
+
select = ["E", "F", "I", "N", "W", "UP", "ANN", "S", "B"]
|
|
59
|
+
ignore = ["ANN101", "ANN102"]
|
|
60
|
+
|
|
61
|
+
[tool.mypy]
|
|
62
|
+
python_version = "3.10"
|
|
63
|
+
strict = true
|
|
64
|
+
plugins = ["pydantic.mypy"]
|
|
65
|
+
|
|
66
|
+
[tool.pytest.ini_options]
|
|
67
|
+
testpaths = ["tests"]
|
|
68
|
+
asyncio_mode = "auto"
|
augagent-0.1.0/setup.cfg
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"""AugAgent — A multi-agent framework with intuitive DX, powered by Pydantic.
|
|
2
|
+
|
|
3
|
+
Quick Start::
|
|
4
|
+
|
|
5
|
+
from augagent import AugAgent, AugTask, AugTeam, aug_tool, LLMConfig
|
|
6
|
+
from pydantic import Field
|
|
7
|
+
|
|
8
|
+
@aug_tool
|
|
9
|
+
def greet(name: str = Field(description="Person to greet")) -> str:
|
|
10
|
+
\"\"\"Greet someone by name.\"\"\"
|
|
11
|
+
return f"Hello, {name}!"
|
|
12
|
+
|
|
13
|
+
assistant = AugAgent(
|
|
14
|
+
name="Assistant",
|
|
15
|
+
role="Friendly Helper",
|
|
16
|
+
goal="Help users with their requests",
|
|
17
|
+
llm_config=LLMConfig(model="gpt-4o"),
|
|
18
|
+
tools=[greet],
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
task = AugTask(
|
|
22
|
+
description="Greet the user warmly",
|
|
23
|
+
expected_output="A friendly greeting message",
|
|
24
|
+
agent=assistant,
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
team = AugTeam(agents=[assistant], tasks=[task], verbose=True)
|
|
28
|
+
result = team.kickoff()
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
from augagent.agent import Agent, AugAgent
|
|
32
|
+
from augagent.models import (
|
|
33
|
+
AgentConfig,
|
|
34
|
+
ChatCompletion,
|
|
35
|
+
ChatMessage,
|
|
36
|
+
ChatToolCall,
|
|
37
|
+
FunctionCall,
|
|
38
|
+
LLMConfig,
|
|
39
|
+
Message,
|
|
40
|
+
Role,
|
|
41
|
+
TaskResult,
|
|
42
|
+
TaskStatus,
|
|
43
|
+
TokenUsage,
|
|
44
|
+
ToolCall,
|
|
45
|
+
ToolResponse,
|
|
46
|
+
)
|
|
47
|
+
from augagent.task import AugTask, Task
|
|
48
|
+
from augagent.team import AugTeam, Process, Team
|
|
49
|
+
from augagent.telemetry import AgentLogger, get_logger
|
|
50
|
+
from augagent.tools import AugTool, Tool, aug_tool, tool
|
|
51
|
+
|
|
52
|
+
__version__ = "0.1.0"
|
|
53
|
+
|
|
54
|
+
__all__ = [
|
|
55
|
+
# Core orchestration
|
|
56
|
+
"AugAgent",
|
|
57
|
+
"AugTask",
|
|
58
|
+
"AugTeam",
|
|
59
|
+
"Process",
|
|
60
|
+
# Tools
|
|
61
|
+
"AugTool",
|
|
62
|
+
"aug_tool",
|
|
63
|
+
# Backward compatibility aliases
|
|
64
|
+
"Agent",
|
|
65
|
+
"Task",
|
|
66
|
+
"Team",
|
|
67
|
+
"Tool",
|
|
68
|
+
"tool",
|
|
69
|
+
# Models — LLM configuration
|
|
70
|
+
"LLMConfig",
|
|
71
|
+
# Models — chat completion response
|
|
72
|
+
"ChatCompletion",
|
|
73
|
+
"ChatMessage",
|
|
74
|
+
"ChatToolCall",
|
|
75
|
+
"FunctionCall",
|
|
76
|
+
"TokenUsage",
|
|
77
|
+
# Models — internal
|
|
78
|
+
"AgentConfig",
|
|
79
|
+
"Message",
|
|
80
|
+
"Role",
|
|
81
|
+
"TaskResult",
|
|
82
|
+
"TaskStatus",
|
|
83
|
+
"ToolCall",
|
|
84
|
+
"ToolResponse",
|
|
85
|
+
# Telemetry
|
|
86
|
+
"AgentLogger",
|
|
87
|
+
"get_logger",
|
|
88
|
+
# Metadata
|
|
89
|
+
"__version__",
|
|
90
|
+
]
|