Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

An 🧪 experimental, 🧭Parlant's ARQ (Attentive Reasoning Queries) into 🔷Microsoft Agent Framework via middleware.

NotificationsYou must be signed in to change notification settings

kimtth/agent-guidance-driven-workflow

Repository files navigation

Integrates 🦜Parlant's ARQ (Attentive Reasoning Queries) into 🔷Microsoft Agent Framework via middleware.

Key Features

  • 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 ✔️

Installation

uv sync

Quick Start

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")

Utilities

View Embedding Cache:

python view_cache.py# Shows .embedding_cache.pkl contents

Examples

  • demo_simple_arq_validation.py - Basic ARQ validation
  • demo_journey_state_tracking.py - Journey state flow
  • demo_customer_support_arq.py - Multi-agent support with handoffs
  • demo_travel_booking_arq.py - Travel booking workflow (paper example)

Architecture

ARQ Flow: Guideline Matcher → Journey Manager → ARQ Generator → Agent Executor
Middleware: Non-invasive integration viaAgentMiddleware
Cache: Embeddings stored in.embedding_cache.pkl (persistent)

References

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.

About

An 🧪 experimental, 🧭Parlant's ARQ (Attentive Reasoning Queries) into 🔷Microsoft Agent Framework via middleware.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp