mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-10-10 03:30:56 +00:00
docs(agents): update coding conventions for state persistence (#342)
Some checks are pending
Pre-commit / run (ubuntu-latest) (push) Waiting to run
Tests ReMe / Unit Tests - py3.11 (push) Waiting to run
Tests ReMe / Unit Tests - py3.12 (push) Waiting to run
Tests ReMe / Unit Tests - py3.13 (push) Waiting to run
Windows Smoke / CLI smoke - py3.11 (push) Waiting to run
Some checks are pending
Pre-commit / run (ubuntu-latest) (push) Waiting to run
Tests ReMe / Unit Tests - py3.11 (push) Waiting to run
Tests ReMe / Unit Tests - py3.12 (push) Waiting to run
Tests ReMe / Unit Tests - py3.13 (push) Waiting to run
Windows Smoke / CLI smoke - py3.11 (push) Waiting to run
- Add guideline that steps should be stateless - Specify storing persistent state in self.app_context.metadata - Clarify avoiding state storage on step instances
This commit is contained in:
parent
bf7ca17705
commit
07d4527a0d
1 changed files with 2 additions and 0 deletions
|
|
@ -112,6 +112,8 @@ authorized the necessary environment.
|
|||
## Coding and Test Conventions
|
||||
|
||||
- Target Python 3.11+ and follow the surrounding typing and async style.
|
||||
- Steps are stateless. If a step needs to persist state, store it in
|
||||
`self.app_context.metadata` rather than on the step instance.
|
||||
- Keep public schemas explicit and backward-compatible where practical.
|
||||
- Close async clients, services, tasks, and other lifecycle resources deterministically.
|
||||
- Prefer clear failures over silently falling back to corrupt or ambiguous state.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue