This directory contains three complete, runnable examples demonstrating how to integrate the AUGMANITAI terminology database into popular Python multi-agent frameworks. All examples run entirely offline with no API calls required.
| Example | Framework | Pattern | Key Feature | Lines of Code |
|---|---|---|---|---|
| langgraph-example | LangGraph >= 0.2 | StateGraph with 3 sequential nodes | Typed state, linear workflow | ~250 |
| crewai-example | CrewAI >= 0.70 | Multi-agent crew with sequential tasks | Role-based agents, structured tasks | ~280 |
| autogen-example | AutoGen >= 0.4 | RoundRobinGroupChat with 3 agents | Asynchronous group conversation | ~300 |
Each example follows the same structure:
cd <example-directory>
pip install -r requirements.txt
python run_example.py
To run tests:
pytest test_example.py -v
All three examples solve the same problem: collaborative terminology research and explanation.
"How do AI systems influence human language adoption and terminology usage?"
Research Query: How do AI systems influence human language adoption?
Relevant Terminology:
Symbiotic Linguistic Evolution (SLE)
Domain: linguistic_dynamics
Definition: The process by which human language and AI-generated language patterns
co-evolve through repeated interaction...
Compound Cognition (CC)
Domain: cognitive_processes
Definition: The cognitive state wherein an individual's thinking process
incorporates internalized AI-generated conceptual structures...
Best for: Beginners learning agent workflows
StateGraph for explicit state managementBest for: Complex multi-agent scenarios with specialized roles
Best for: Research-grade multi-agent systems with rich interactions
Each example integrates the AUGMANITAI database via:
from augmanitai.core import AugmanitaiDBdb.search(query) and db.get_term(term_id)name, definition, domain, examplesAugmanitaiDB.search(query, domain=None, threshold=0.3, limit=None) — Fuzzy search for termsAugmanitaiDB.get_term(term_id) — Retrieve specific term by IDAugmanitaiDB.get_domain(domain) — Get all terms in a domainAugmanitaiDB.get_related_terms(term_id, direction="both") — Find connected termsdemo-swarms/
├── README.md (this file)
│
├── langgraph-example/
│ ├── state.py # State TypedDict
│ ├── nodes.py # Node implementations
│ ├── stategraph_example.py # Graph construction
│ ├── test_example.py # Tests
│ ├── run_example.py # CLI runner
│ ├── requirements.txt
│ └── README.md
│
├── crewai-example/
│ ├── tools.py # AUGMANITAI tool wrapper
│ ├── agents.py # Agent definitions
│ ├── tasks.py # Task definitions
│ ├── mock_llm.py # Offline LLM mock
│ ├── crew_example.py # Crew orchestration
│ ├── test_example.py # Tests
│ ├── run_example.py # CLI runner
│ ├── requirements.txt
│ └── README.md
│
└── autogen-example/
├── agents.py # AssistantAgent definitions
├── tools.py # AUGMANITAI toolset
├── mock_client.py # Mock ChatCompletionClient
├── groupchat_example.py # RoundRobinGroupChat setup
├── test_example.py # Tests
├── run_example.py # CLI runner
├── requirements.txt
└── README.md
Replace the mock LLM with Claude, GPT-4, or another provider:
LangGraph:
from anthropic import Anthropic
client = Anthropic()
def query_parser(state: AugmanitaiState) -> AugmanitaiState:
response = client.messages.create(
model="claude-3-5-sonnet-20241022",
max_tokens=200,
messages=[{"role": "user", "content": f"Extract terms from: {state['query']}"}]
)
# Parse response...
CrewAI:
from crewai import Agent
agent = Agent(
role="Terminology Researcher",
goal="Find AUGMANITAI terms",
model="gpt-4", # or "claude-3-5-sonnet-20241022"
tools=tools,
)
AutoGen:
from autogen_core.models import ChatCompletionClient
from autogen_agentchat.agents import AssistantAgent
client = ChatCompletionClient(
model_id="gpt-4",
api_key="YOUR_API_KEY"
)
LangGraph: Add parallel branches with graph.add_edge(start, ["branch1", "branch2"])
CrewAI: Switch to hierarchical process: process=Process.hierarchical
AutoGen: Use SelectorGroupChat for tournament-style agent competition
Save agent interactions to database:
# Log all agent decisions
with open("augmanitai_interactions.jsonl", "w") as f:
f.write(json.dumps({"query": q, "response": r}))
Insert human feedback loop between agent steps:
# LangGraph: Add conditional edge with human input
graph.add_conditional_edges(
"term_retriever",
lambda x: "human_review" if x["retrieved_terms"] else "response_composer"
)
All three examples include pytest tests that verify:
Run tests from each directory:
pytest test_example.py -v
Recommended order for learning:
If you use these examples in research or publications, please cite AUGMANITAI:
@software{ehstand2025augmanitai,
author = {Ehstand, Andreas},
title = {AUGMANITAI: Academic Terminology Database for Human-AI Interaction},
year = {2025},
doi = {10.5281/zenodo.20161494},
url = {https://zenodo.org/record/20161494}
}
AUGMANITAI is published under CC BY-NC-ND 4.0 license.
For questions about AUGMANITAI integration:
agents.py, nodes.py, and tools.py--verbose flags to see agent behaviorBuilt with AUGMANITAI by Andreas Ehstand (ORCID 0009-0006-3773-7796)
Bound by the Ethical Disclaimer §1–§20 (DISCLAIMER.md) and the repository licenses (LICENSE). Contact and provider: IMPRESSUM.md.