- Notifications
You must be signed in to change notification settings - Fork0
kimtth/agent-guidance-driven-workflow
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Integrates 🦜Parlant's ARQ (Attentive Reasoning Queries) into 🔷Microsoft Agent Framework via middleware.
- Guideline Matching: 🚦Semantic matching with embeddings (cached in
.embedding_cache.pkl) - Journey State Tracking: Conversational flow as state machines
- ARQ Validation: 🛡️ Anchor → Reason → Predict (3-phase validation)
- Context Propagation: Shared state across agent handoffs
- Compliance: Validate responses before delivery ✔️
uv sync
fromcore.modelsimportGuideline,Journey,JourneyState,StateTypefrommiddleware.query_gatewayimportARQGatewayMiddlewarefromagent_framework.azureimportAzureOpenAIChatClient# Define guidelinesguidelines= [Guideline(id="g1",condition="Customer frustrated",action="Acknowledge feelings",priority=10)]# Create agent with ARQ middlewareagent=chat_client.create_agent(name="Agent",instructions="Your instructions",middleware=[ARQGatewayMiddleware(guidelines=guidelines)])# Runresult=awaitagent.run("User message")
View Embedding Cache:
python view_cache.py# Shows .embedding_cache.pkl contentsdemo_simple_arq_validation.py- Basic ARQ validationdemo_journey_state_tracking.py- Journey state flowdemo_customer_support_arq.py- Multi-agent support with handoffsdemo_travel_booking_arq.py- Travel booking workflow (paper example)
ARQ Flow: Guideline Matcher → Journey Manager → ARQ Generator → Agent Executor
Middleware: Non-invasive integration viaAgentMiddleware
Cache: Embeddings stored in.embedding_cache.pkl (persistent)
ARQ (Attentive Reasoning Queries) are prompts designed to guide an AI to think step-by-step, focus on key details, and produce accurate, logically grounded answers by directing its attention.
- ARQ Paper - Attentive Reasoning Queries
- Parlant - Original ARQ implementation
- Microsoft Agent Framework
About
An 🧪 experimental, 🧭Parlant's ARQ (Attentive Reasoning Queries) into 🔷Microsoft Agent Framework via middleware.
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.