dynamiq
dynamiq-ai/dynamiq
Dynamiq is an orchestration framework for agentic AI and LLM applications
Dynamiq is an orchestration framework for agentic AI and LLM applications
Categories
Tags
Similar tools
ECC
affaan-m/ECC
affaan-m/ECC
hermes-agent
NousResearch/hermes-agent
nousresearch/hermes-agent
AutoGPT
Significant-Gravitas/AutoGPT
AutoGPT
ollama
ollama/ollama
Local inference runtime and CLI for open-weight large language models
transformers
huggingface/transformers
huggingface/transformers
JavaGuide
Snailclimb/JavaGuide
Java guide for backend interviews & AI application development covering system design, LLMs, Agents, and RAG.
Install
pip install dynamiqREADME
Dynamiq is an orchestration framework for agentic AI and LLM applications
Welcome to Dynamiq! 🤖
Dynamiq is your all-in-one Gen AI framework, designed to streamline the development of AI-powered applications. Dynamiq specializes in orchestrating retrieval-augmented generation (RAG) and large language model (LLM) agents.
Getting Started
Ready to dive in? Here's how you can get started with Dynamiq:
Installation
First, let's get Dynamiq installed. You'll need Python, so make sure that's set up on your machine. Then run:
pip install dynamiq
Or build the Python package from the source code:
git clone https://github.com/dynamiq-ai/dynamiq.git
cd dynamiq
uv sync
Documentation
For more examples and detailed guides, please refer to our documentation.
Examples
Simple LLM Flow
Here's a simple example to get you started with Dynamiq:
from dynamiq.nodes.llms.openai import OpenAI
from dynamiq.connections import OpenAI as OpenAIConnection
from dynamiq.prompts import Prompt, Message
# Define the prompt template for translation
prompt_template = """
Translate the following text into English: {{ text }}
"""
# Create a Prompt object with the defined template
prompt = Prompt(messages=[Message(content=prompt_template, role="user")])
# Setup your LLM (Large Language Model) Node
llm = OpenAI(
id="openai", # Unique identifier for the node
connection=OpenAIConnection(api_key="OPENAI_API_KEY"), # Connection using API key
model="gpt-4o", # Model to be used
temperature=0.3, # Sampling temperature for the model
max_tokens=1000, # Maximum number of tokens in the output
prompt=prompt # Prompt to be used for the model
)
# Run the LLM node with the input data
result = llm.run(
input_data={
"text": "Hola Mundo!" # Text to be translated
}
)
# Print the result of the translation
print(result.output)
Simple ReAct Agent with asynchronous execution
An agent that has the access to E2B Code Interpreter and is capable of solving complex coding tasks.
from dynamiq.nodes.llms.openai import OpenAI
from dynamiq.connections import OpenAI as OpenAIConnection, E2B as E2BConnection
from dynamiq.nodes.agents import Agent
from dynamiq.nodes.tools.e2b_sandbox import E2BInterpreterTool
# Initialize the E2B tool
e2b_tool = E2BInterpreterTool(
connection=E2BConnection(api_key="E2B_API_KEY")
)
# Setup your LLM
llm = OpenAI(
id="openai",
connection=OpenAIConnection(api_key="OPENAI_API_KEY"),
model="gpt-4o",
temperature=0.3,
max_tokens=1000,
)
# Create the agent
agent = Agent(
name="react-agent",
llm=llm, # Language model instance
tools=[e2b_tool], # List of tools that the agent can use
role="Senior Data Scientist", # Role of the agent
max_loops=10
