Commit Graph

12 Commits

Author SHA1 Message Date
Samantha Coyle 8601054a0b
style: appease linter
Signed-off-by: Samantha Coyle <sam@diagrid.io>
2025-09-08 13:58:29 -05:00
Samantha Coyle 728be553ee
fix: resume workflows only if same input
Signed-off-by: Samantha Coyle <sam@diagrid.io>
2025-09-08 13:32:46 -05:00
Samantha Coyle be67f7136f
fix: ensure telemetry works with this and clean up
Signed-off-by: Samantha Coyle <sam@diagrid.io>
2025-09-05 15:54:45 -05:00
Samantha Coyle f966a12f6c
style: clean up and ensure proper agent wf state
Signed-off-by: Samantha Coyle <sam@diagrid.io>
2025-09-04 17:52:29 -05:00
Samantha Coyle 1d445369c7
feat: ensure durability on durable agent no matter startup means
Signed-off-by: Samantha Coyle <sam@diagrid.io>
2025-09-04 08:59:53 -05:00
Yaron Schneider d4e6c76353
Fix hang after multiple .run() calls (#189)
* fix hang after multiple .run() calls

Signed-off-by: yaron2 <schneider.yaron@live.com>

* linter

Signed-off-by: yaron2 <schneider.yaron@live.com>

---------

Signed-off-by: yaron2 <schneider.yaron@live.com>
2025-08-30 18:56:16 -04:00
Roberto Rodriguez d325cc07de
Update Tool Execution Final Message and Dependencies (#175)
* Update final message when max iteration hits in durable agent

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Update dependencies

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Fix lint

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Update testenv deps to include vectorstore

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

---------

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>
2025-08-11 12:15:13 -07:00
Roberto Rodriguez dce6623150
Workflow App updates to Register Tasks and LLM client Fix (#172)
* Update quickstarts

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Update stream parameter in LLM generation

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Update initialization of LLM client for agent base

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Switch comment to debug logging

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Improve logic to handle api key and other parameters in openai clients

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Add Workflow register_task method

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Fix lint errors

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Update version

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

---------

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>
2025-08-01 21:07:26 -07:00
Roberto Rodriguez 963cef6cb9
Observability Module with OpenTelemetry and Phoenix Integration (#168)
* add condition for opentelemetry import

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* feat: add observability optional dependencies and update lock file

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* feat: add observability dapr agents module

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* add and update quickstarts to show new observability module

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* style: fix ruff linting and formatting issues across codebase

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* style: fix flake8 linting issues

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* config: ignore mypy errors for optional observability module

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Updtate Workflow Task to use Agent instances without a task description

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Update tool_choice in Agent flow to not be part of chat completion request if not set

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Remove comments ;)

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Update quickstarts README

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Update tool_choice to not be added to chat completion request if not set

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Add quickstart to show agents as tasks with tracing and multi-model

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* style: fix ruff linting and formatting issues across codebase

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

---------

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
2025-08-01 11:44:55 -07:00
Yaron Schneider f2d6831ea2
Refactor LLM Workflows and Orchestrators for Unified Response Handling and Iteration (#163) (#165)
* Refactor ChatClientBase: drop Pydantic inheritance and add typed generate() overloads



* Align all LLM chat clients with refactored base and unified response models



* Unify LLM utils across providers and delegate streaming/response to provider‑specific handlers



* Refactor LLM pipeline: add HuggingFace tool calls, unify chat client/response types, and switch DurableAgent to loop‑based workflow



* Refactor orchestrators with loops and unify LLM response handling using LLMChatResponse



* test remaining quickstarts after all changes



* run pytest after all changes



* Run linting and formatting checks to ensure code quality



* Update logging, Orchestrator Name and OTel module name



---------

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>
Co-authored-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>
2025-07-28 13:31:53 -07:00
Roberto Rodriguez 3e767e03fb
Refactor agent workflows, orchestrators, and integrations for reliability and modularity (#161)
* Remove cookbook to avoid confusion

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Update Hugging Face integration and quickstart to use SmolLM3-3B model

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Refactor Agent and AgentBase for improved tool execution, prompt handling, and message metadata

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Refactor workflow features into mixins for messaging, pub/sub, state management, and service logic

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Refactor DurableAgent for improved workflow state, tool execution, and message handling

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Refactor workflow base and AgenticWorkflow to modularize Dapr integration and delegate service/state logic to mixins

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Update text printer logic to flush messages

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Split Workflow decorators for better organization.

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Refactor ConversationDaprStateMemory to return full message objects and improve logging.

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Refactor VectorStoreBase to return document IDs

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Refactor orchestrators to standardize broadcast messages, unify decorator imports, and improve workflow robustness

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Test quickstarts to validate all changes and update main README

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Set broadcast_topic_name to None to disable broadcasting

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Improve package exports and clean up imports for linter compliance

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Fix code style and lint errors flagged by Ruff

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Fix mypy type errors and improve

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Fix lint errors and code style issues with ruff

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* fix mypy attr-defined and call-arg errors

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* fix lint errors and code style issues

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* mypy type errors

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Updated test state class to DurableAgentWorkflowEntry

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Fix mypy errors

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Set DurableAgent to not broadcast messages by default and clarified dapr client private attribute in agentic workflow

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Update tests with latest changes

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Minor updates identified while working on test files

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Clarify AgentTool use in docstrings

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Centralize tool_history and tool_choice in AgentBase and unify tool execution record schema for tool_history

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* fix mypy errors

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Update dapr_agents/agents/base.py

Update default basic agent prompt

Co-authored-by: Sam <sam@diagrid.io>
Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Update quickstarts/03-durable-agent-tool-call/durable_weather_agent.py

Update durable weather agent with the right comments

Co-authored-by: Sam <sam@diagrid.io>
Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

---------

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>
Co-authored-by: Sam <sam@diagrid.io>
2025-07-28 07:40:58 -07:00
Sam 6d55c383b9
feat: unify agent types (#139)
* style: save my todo comments

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* feat: unify agent types and save my wip

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* feat: save as i got 03 poc quickstart working

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* feat: add durable agent examples and fixes

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* fix(bug): support both template formats

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* fix(bug): support our custom format with vars inline

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* feat: agent + durableagent types, new cfg class, updated quickstarts/docs

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* fix: some clean up

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* style: more clean up on things reviewing my pr

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* style: just more clean up of logs

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* style: update docs

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* fix: actorAgent -> assistantAgent and rm actoragent

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* style: make linter happy

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* test: add init test setup and cases

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* feat: save an ex i created for what openapi agent looks like

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* style: rm up openapi react agent ex

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* style: more clean up for now

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* refactor: rm openapireact + react agents

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* refactor: mv durable agent with agent

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* fix: update imports

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* refactor: make agent + durable agent use same base class + rm config for now

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* tests: add some init tests

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* style: make linter happy

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* fix: use tcp conn instead of app layer

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* style: make linter happy

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* style: make linter happy

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* tests: add agent class tests + some clean up

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* tests: add durableagent class tests

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* style: make linter happy

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* fix: make linter happy

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* style: acct for linter errs

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* style: run ruff

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* fix: address many tox -e type errs, fix class inheritance mvment, replace generic data types with specific types

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* fix: final type fix

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* style: update docs on new quickstarts

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* style: tox -e ruff + clean up comments

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* fix: update for tox -e flake8

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* style: clean up print outs

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* tests: make things testable and fix some existing test errs

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* fix: clean up quickstarts, add tests i forgot earlier

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* fix: last few fixes

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* style: tox -e ruff

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* fix(build): acct for build errs

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* fix: add tox ini file

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* style: fix linter

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* fix: acct for posthog breaking change

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* fix: address feedback

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* fix: push test fixes

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* style: rm actor references

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* style: tox -e ruff

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* fix(quickstart): use local agent updates

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* fix: tox -e flake8 fixes

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* fix: style dirs we want

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* fix(build): install test deps properly

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* fix: see if this fixes build err

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* fix(cookbook): update one more reqs file to use local agent deps instead of old release tag

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* fix: register agent properly in db

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* style: rm duplicate quickstart sample

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* style: make linter happy

Signed-off-by: Samantha Coyle <sam@diagrid.io>

* fix: ruff check --fix .

Signed-off-by: Samantha Coyle <sam@diagrid.io>

---------

Signed-off-by: Samantha Coyle <sam@diagrid.io>
2025-07-07 07:36:23 -07:00