Skip to content

docs(samples): add memory-aware-agent sample#1615

Open
mjnovice wants to merge 1 commit intomainfrom
sample/memory-aware-agent
Open

docs(samples): add memory-aware-agent sample#1615
mjnovice wants to merge 1 commit intomainfrom
sample/memory-aware-agent

Conversation

@mjnovice
Copy link
Copy Markdown
Contributor

@mjnovice mjnovice commented May 6, 2026

Summary

Adds a new sample at packages/uipath/samples/memory-aware-agent/ that demonstrates how to wire UiPath Agent Memory into a coded agent.

The sample:

  1. Searches a memory space via UiPath().memory.search_async
  2. Stitches the LLMOps-rendered system_prompt_injection into the system prompt
  3. Calls the LLM Gateway with the augmented context

Motivation: the Memory Spaces API landed recently (packages/uipath-platform/src/uipath/platform/memory/) but has no end-user sample. The SDK does not auto-wire memory based on the is_agent_memory_enabled flag in agent definitions — recall and prompt injection are explicit calls in agent code. The README spells that out so users do not look for magic that does not exist.

Files:

  • main.py — async main(input: AgentInput) -> AgentOutput, traced
  • pyproject.toml, uipath.json, bindings.json — match hello-world/llm_chat_agent conventions
  • README.md — prereqs, run instructions, data-flow diagram

Test plan

  • python -c "import ast; ast.parse(...)" — parses
  • uvx ruff check . — passes (samples are excluded from lint, but the code is clean)
  • uvx ruff format --check . — passes
  • Resolved real imports in the package's uv env: uipath.platform.UiPath, uipath.platform.memory.{MemorySearchRequest, SearchField, SearchSettings, SearchMode}, uipath.platform.chat.ChatModels, uipath.tracing.traced — all present
  • AgentInput / AgentOutput Pydantic models construct cleanly
  • End-to-end run: requires UIPATH_URL, UIPATH_ACCESS_TOKEN, UIPATH_FOLDER_KEY, and a real memory space — left for a reviewer with credentials

🤖 Generated with Claude Code

Demonstrates how a coded agent wires in UiPath Agent Memory: search a
memory space, stitch the LLMOps-rendered system_prompt_injection into the
LLM system prompt, then call the LLM Gateway. Includes a README clarifying
that the SDK does not auto-wire memory based on is_agent_memory_enabled
— recall and prompt injection are explicit calls in the agent code.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant