"매 agent 의 'world 가 such-and-such' 의 internal model — 매 perception update · inference 로 부터 의 derive". Bratman 1987 BDI (Belief-Desire-Intention) 의 origin, 2026 의 LLM agent 의 working memory · scratchpad · long-term memory store 의 modern incarnation.
매 핵심
매 component
Belief base: fact set (logical · probabilistic · embedding-vector).
defbuild_prompt(beliefs:BeliefBase,task:str)->str:facts="\n".join(f"- {k}: {v} (conf={c:.2f})"fork,(v,c)in[(k,(bb.facts[k],bb.confidence[k]))forkinbb.facts])returnf"""You are an agent with the following beliefs:
{facts}Task: {task}Plan your next action and explain reasoning."""
Bayesian belief update (sensor fusion)
defbayes_update(prior:float,likelihood:float,evidence:float)->float:"""P(H|E) = P(E|H) * P(H) / P(E)"""returnlikelihood*prior/evidence# Door 의 open 의 prior 0.5, sensor 의 reading "open" 의 likelihood 0.9, evidence 0.6posterior=bayes_update(0.5,0.9,0.6)# 0.75
Vector belief store (long-term memory)
importchromadbclient=chromadb.PersistentClient("./agent_memory")beliefs=client.get_or_create_collection("beliefs")beliefs.upsert(ids=["b-001"],documents=["User prefers vegetarian restaurants in 5km radius"],metadatas=[{"source":"user_pref_2026-04-12","conf":0.95}],)hits=beliefs.query(query_texts=["restaurant recommendation"],n_results=5)
Belief revision (AGM contraction)
defcontract(bb:BeliefBase,fact:str):"""Remove fact + minimal additional facts to restore consistency."""iffactinbb.facts:delbb.facts[fact]delbb.confidence[fact]# Naive — production uses entrenchment ordering
언제: belief base 의 natural-language form 의 store (e.g. user preference summary), scratchpad 의 reasoning step 의 record.
언제 X: 매 safety-critical inference (medical · industrial) — LLM 의 hallucinate · 매 symbolic verifiable 의 require.
❌ 안티패턴
No revision policy: belief 의 add-only — contradictory state 의 accumulate.
Confidence 의 ignore: 매 fact 의 binary present/absent — sensor noise 의 not handle.
Global belief blob: 매 agent 의 share — privacy · ownership 의 unclear → BDI per-agent KB.
Vector-only memory: 매 deterministic recall (e.g. "what is user's name") 의 unreliable — symbolic key/value 의 mix.