Overseas access: www.kdjingpai.com
Bookmark Us
Current Position:fig. beginning " Course materials

12-Factor Agents 5. Harmonization of implementation status with operational status

2025-07-22 43

Even outside of the AI space, many infrastructure systems try to separate the "execution state" from the "business state". For AI applications, this can involve complex abstractions to keep track of information such as current step, next step, wait status, retries, and so on. This separation introduces complexity, and while it may be worthwhile, it may be too small for your use case.

As always, you'll need to decide for yourself what's right for your app. But don't assume that younecessarilyManage them separately.

More clearly:

  • execution status (computing): current step, next step, wait status, retry count, etc.
  • operational state: What has happened so far in the Intelligentsia workflow (e.g., OpenAI message lists, tool calls, and result lists, etc.).

If possible, simplify - harmonize the two as much as possible.

In fact, you can design your application so that it can infer all execution states from the context window. In many cases, the execution state (current step, wait state, etc.) is just metadata about what has happened so far.

You may have some things that won't fit into the context window, such as session IDs, password contexts, etc., but your goal should be to minimize those things. By adopting the Element 3, you can control what is actually fed into the big language model.

There are several advantages to this approach:

  1. simplicity: the only true source of all states
  2. serialize: threads can be easily serialized/deserialized
  3. adjust components during testing: The entire history at a glance
  4. dexterity: Easily add a new state by simply adding a new event type
  5. resumption: Recover from any point by simply loading the thread!
  6. stellate: threads can be forked at any point by copying a subset of the threads into a new context/state ID
  7. Human-computer interface and observability: Easily convert threads into human-readable Markdown or rich web application UIs!

Recommended

Can't find AI tools? Try here!

Just type in the keyword Accessibility Bing SearchYou can quickly find all the AI tools on this site.

inbox

Contact Us

Top

en_USEnglish