Commit 1c7bd91
feat: adding agents back to the experimental repo (#326)
* adding agents back to the experimental repo
* adding tests
* wip
* adding back dependencies
* for this branch make the dependency on the haystack main
* reverting dependency and commenting out test
* reverting dependency and commenting out test
* reverting dependency and commenting out test
* feat: breakpoints structure (#330)
* initial import
* formating and renaming file
* solving shadowing issues
* solving shadowing issues
* solving formating issues
* adding type annotation
* adding visit count to Tool
* updating AgentBreakpoint
* removing whitespace
* renaming shadow variable names
* improving eq in ToolBrekapoint
* setting dependency from haystack-ai main
* reverting pyproject.toml
* syncing with new haystack release
* typing
* updating all agent related with with latest haystack release
* more tpying issues
* feat: adding break points to `Agent` (#328)
* adding agents back to the experimental repo
* wip: adding breakpoints PoC to Agents
* wip
* typing
* formatting
* pylint issues
* fix typing
* reverting pyproject.toml
* fixing bug in component_visits
* linting
* adding/fixing tests
* all tests fixed
* cleaning up
* adding breakpoints to async version
* cleaning up
* refactoring tests
* adding more tests
* cleaning up
* formating issues
* typing
* cleaning
* adding async tests
* nit
* refactoring breakpoints logic to avoid duplicated code
* converting to staticmethod
* updating Agent + tests to use Breakpoint datastrcutures
* updating async tests to use Breakpoint datastrcutures
* refactoring tests
* refactoring tests
* wip: Pipeline accepting Breakpoint and Agentbreakpoint
* Pipeline accepting Breakpoint and Agentbreakpoint + fixing tests
* fix validate_input issue
* updating tests
* wip: adding breakpoints PoC to Agents
* WIP: testing breakpoints in agent within a pipeline
* wip: adding test for multiple breakpoints in Agent and Pipeline
* wip: adding test for multiple breakpoints in Agent and Pipeline
* adding tests for agent in pipeline
* nit
* reverting validate
* fixing agent in pipeline tests
* Update haystack_experimental/components/agents/agent.py
Co-authored-by: Sebastian Husch Lee <[email protected]>
* having one single BreakpointExecption
* parameters
* wip: fixing async tests
* nit: cleaning
* fixing imports
* reverting back to a single Breakpoint
* updating all tests due to reverting back to a single Breakpoint
* updating all tests due to reverting back to a single Breakpoint
* WIP: fixing tests
* updating tests without break_on_first and properly catching all the execptions
* updating integratiosn tests, reverting back to a single break point
* enabling back linter rules
* wip: resuming a pipeline agent, saving agent_name to state
* cleaning up
* all tests passing - working on pipeline agent resume from state
* updating tests to consider mandatory agent_name when having an Agent breakpoint
* serialisation with success of the pipeline where the agent is running plus the agent status serialisations into the the same resume JSON file
* updating linting and types due to new changes
* updating all tests due to new changes
* resuming an Agent within a pipeline
* replacing Path by PosixPath for Windows compatability
* reverting back to Path
* wip
* cleaning up - small improvments
* cleaning up validate pipeline
* simplifying the save state
* reducing parameters for save_state agent case
* saving all the main pipeline data nested under a single key
* more cleaning and small improvments
* helper function to handle the processing the state of the host pipeline where agent is running
* helper function to handle file saving
* adding tests for agent in pipeline break and resume on a tool
* refactoring pipeline.run
* refactoring pipeline methods
* removing hard-coded path for JSON resume files, using pytest tmpfile
* wip
* review commments/improvments
* review commments/improvments + updating tests
* Fix validate_breakpoint
* moving static methods to breakpoint.py
* Update haystack_experimental/core/pipeline/pipeline.py
Co-authored-by: Amna Mubashar <[email protected]>
* fixing LICENSE header in breakpoint.py
* Update haystack_experimental/dataclasses/breakpoints.py
Co-authored-by: Sebastian Husch Lee <[email protected]>
* Small changes
* wip
* attending PR comments
* attending PR comments
* homogenization of var names and function names
---------
Co-authored-by: Sebastian Husch Lee <[email protected]>
Co-authored-by: Amna Mubashar <[email protected]>
Co-authored-by: Sebastian Husch Lee <[email protected]>
---------
Co-authored-by: Sebastian Husch Lee <[email protected]>
Co-authored-by: Amna Mubashar <[email protected]>
Co-authored-by: Sebastian Husch Lee <[email protected]>1 parent 5895cfc commit 1c7bd91
File tree
25 files changed
+4304
-190
lines changed- haystack_experimental
- components/agents
- state
- core
- pipeline
- dataclasses
- utils
- test
- components/agents
- core/pipeline
25 files changed
+4304
-190
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
Lines changed: 77 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
0 commit comments