dynabots-core
Core primitives for the DynaBots orchestration framework family.
Overview
dynabots-core provides the foundational building blocks shared across all DynaBots orchestration frameworks:
- Protocols:
Agent,LLMProvider,Judge,Tool- interfaces that define contracts - Value Objects:
TaskResult,LLMMessage,LLMResponse- immutable data structures - Providers: Ready-to-use LLM adapters for OpenAI, Ollama, Anthropic
Installation
# Core only (bring your own LLM client)
pip install dynabots-core
# With OpenAI support
pip install dynabots-core[openai]
# With Ollama (local LLMs)
pip install dynabots-core[ollama]
# With all providers
pip install dynabots-core[all]
Quick Start
Define an Agent
from dynabots_core import Agent, TaskResult
class MyAgent:
@property
def name(self) -> str:
return "MyAgent"
@property
def capabilities(self) -> list[str]:
return ["search", "summarize"]
async def process_task(self, task_description: str, context: dict) -> TaskResult:
# Your agent logic here
result = await self._do_work(task_description)
return TaskResult.success(
task_id=context["task_id"],
data=result
)
Use an LLM Provider
from dynabots_core.providers import OllamaProvider
# Local LLM via Ollama
llm = OllamaProvider(model="qwen2.5:72b")
response = await llm.complete([
LLMMessage(role="system", content="You are a helpful assistant."),
LLMMessage(role="user", content="Hello!")
])
print(response.content)
Create a Judge (for Orc!!)
from dynabots_core import Judge, Verdict
class LLMJudge:
def __init__(self, llm: LLMProvider):
self.llm = llm
async def evaluate(self, task: str, submissions: list[dict]) -> Verdict:
# Compare submissions and pick a winner
prompt = f"Task: {task}\n\nSubmission A: {submissions[0]}\nSubmission B: {submissions[1]}\n\nWhich is better?"
response = await self.llm.complete([LLMMessage(role="user", content=prompt)])
return Verdict(winner=..., reasoning=response.content)
Framework Family
This package is part of the DynaBots framework family:
| Package | Description |
|---|---|
dynabots-core |
Shared primitives (this package) |
dynabots |
DAG-based orchestration with parallel waves |
orc |
Challenge-based hierarchy with contested leadership |
Protocols
Agent
class Agent(Protocol):
@property
def name(self) -> str: ...
@property
def capabilities(self) -> list[str]: ...
async def process_task(self, task_description: str, context: dict) -> TaskResult: ...
LLMProvider
class LLMProvider(Protocol):
async def complete(
self,
messages: list[LLMMessage],
temperature: float = 0.1,
max_tokens: int = 2000,
json_mode: bool = False,
) -> LLMResponse: ...
Judge
class Judge(Protocol):
async def evaluate(self, task: str, submissions: list[dict]) -> Verdict: ...
Tool
class Tool(Protocol):
@property
def name(self) -> str: ...
@property
def description(self) -> str: ...
@property
def parameters_schema(self) -> dict: ...
async def execute(self, **kwargs) -> Any: ...
License
MIT
Release files for dynabots-core 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dynabots_core-0.1.1.tar.gz | 34.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dynabots_core-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 65.8 kB
Release files / dynabots_core-0.1.1.tar.gz
| Download URL | dynabots_core-0.1.1.tar.gz |
|---|---|
| Size | 34.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
019d96c1e117fd7978544b08b5bcf305fdb267ab9e4d6a78b3e47c2025353451
|
|
BLAKE2b-256 checksum How to use checksums |
a63118d93baefdba8f098d34d019573c6b47b27b69681bcc79a04672716a2aa9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / dynabots_core-0.1.1-py3-none-any.whl
| Download URL | dynabots_core-0.1.1-py3-none-any.whl |
|---|---|
| Size | 31.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4a95dd97c8b394c22f9b84a9b18c4ab05ca85ad6b20e1fc8d98357da7462ef28
|
|
BLAKE2b-256 checksum How to use checksums |
c3d3d4994b94d8440e66af681db58af5bd43811e7ca1a32c86b34e93a4d95a45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|