Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions first-agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ if __name__ == "__main__":
session_id="session_1",
stream=True,
)
lm = agent.get_learning_machine()
lm = agent.learning_machine
lm.user_profile_store.print(user_id=user_id)
lm.user_memory_store.print(user_id=user_id)

Expand Down Expand Up @@ -144,7 +144,7 @@ if __name__ == "__main__":
session_id="session_1",
stream=True,
)
lm = agent.get_learning_machine()
lm = agent.learning_machine
lm.user_profile_store.print(user_id=user_id)
lm.user_memory_store.print(user_id=user_id)

Expand Down Expand Up @@ -208,7 +208,7 @@ if __name__ == "__main__":
session_id="session_1",
stream=True,
)
lm = agent.get_learning_machine()
lm = agent.learning_machine
lm.learned_knowledge_store.print(query="cloud")

# Session 2: User 2 benefits from the learning
Expand Down
2 changes: 1 addition & 1 deletion learning/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Some stores support configurable sharing scope via `namespace`:

The Curator keeps memories healthy:
```python
lm = agent.get_learning_machine()
lm = agent.learning_machine

# Remove memories older than 90 days
lm.curator.prune(user_id="alice", max_age_days=90)
Expand Down
6 changes: 3 additions & 3 deletions learning/stores/decision-log.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ agent.print_response(
)

# View logged decisions
lm = agent.get_learning_machine()
lm = agent.learning_machine
lm.decision_log_store.print(agent_id="my-agent", limit=5)
```

Expand Down Expand Up @@ -105,7 +105,7 @@ Tradeoff: logs every tool call, may generate noise.

Update decisions with what actually happened to build feedback loops:
```python
lm = agent.get_learning_machine()
lm = agent.learning_machine

# Via store directly
lm.decision_log_store.update_outcome(
Expand All @@ -119,7 +119,7 @@ Or the agent can use the `record_outcome` tool during conversation.

## Accessing Decisions
```python
lm = agent.get_learning_machine()
lm = agent.learning_machine

# Search decisions
decisions = lm.decision_log_store.search(
Expand Down
2 changes: 1 addition & 1 deletion learning/stores/entity-memory.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Available tools: `search_entities`, `create_entity`, `update_entity`, `add_fact`

## Accessing Entity Memory
```python
lm = agent.get_learning_machine()
lm = agent.learning_machine

# Search for entities
entities = lm.entity_memory_store.search(
Expand Down
2 changes: 1 addition & 1 deletion learning/stores/learned-knowledge.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Tradeoff: extra LLM call per interaction, may save low-value insights.

## Accessing Learned Knowledge
```python
lm = agent.get_learning_machine()
lm = agent.learning_machine

# Search for relevant learnings
results = lm.learned_knowledge_store.search(query="cloud costs", limit=5)
Expand Down
2 changes: 1 addition & 1 deletion learning/stores/session-context.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ agent.print_response(

## Accessing Session Context
```python
lm = agent.get_learning_machine()
lm = agent.learning_machine

context = lm.session_context_store.get(session_id="api_design")
if context:
Expand Down
4 changes: 2 additions & 2 deletions learning/stores/user-memory.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Tradeoff: agent may miss implicit observations.

## Accessing Memories
```python
lm = agent.get_learning_machine()
lm = agent.learning_machine

# Get all memories
memories = lm.user_memory_store.get_memories(user_id="alice@example.com")
Expand All @@ -134,7 +134,7 @@ Relevant memories are injected into the system prompt:

Over time, memories accumulate. Use the Curator to maintain them:
```python
lm = agent.get_learning_machine()
lm = agent.learning_machine

# Remove memories older than 90 days
lm.curator.prune(user_id="alice@example.com", max_age_days=90)
Expand Down
2 changes: 1 addition & 1 deletion learning/stores/user-profile.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ The `metadata["description"]` tells the LLM what each field captures.

## Accessing Profile Data
```python
lm = agent.get_learning_machine()
lm = agent.learning_machine

# Get profile
profile = lm.user_profile_store.get(user_id="alice@example.com")
Expand Down