Repository navigation
Server & APIs SharePoint & OneDrive file managers
SharePointFileManager and OneDriveFileManager implement navigator's FileManagerInterface over Microsoft Graph, so anything that works with S3FileManager works with a SharePoint document library or a OneDrive (FEAT-603).
pip install "ai-parrot[msgraph]"
SharePoint:
from parrot.interfaces.file import SharePointFileManager
async with SharePointFileManager(
site="troc",
library="Documents",
prefix="reports/",
credentials={
"client_id": "your-client-id",
"client_secret": "your-client-secret",
"tenant_id": "your-tenant-id",
"tenant": "troc",
},
) as sp:
files = await sp.list_files("2026/", "*.xlsx")
for f in files:
print(f.name, f.size)OneDrive:
from parrot.interfaces.file import OneDriveFileManager
async with OneDriveFileManager(
user="me",
credentials={
"client_id": "your-client-id",
"client_secret": "your-client-secret",
"tenant_id": "your-tenant-id",
},
auth_mode="delegated",
) as od:
files = await od.list_files()
for f in files:
print(f.name, f.size)The managers support four auth_mode values:
-
direct— client credentials (app-only). Use this for background jobs that need to act on behalf of the app. -
on_behalf_of— on-behalf-of flow. Callers that already hold a user token (e.g., an OAuth2 callback) can pass it viauser_assertion. -
delegated— interactive login. The signed-in user consents;user="me"requires this mode. -
cached— cached token from the O365 client. Use this when you already have an authenticatedO365Clientand want to reuse its token.
For username/password (ROPC) credentials, pass username and password in the credentials dict; the underlying O365Client picks them up.
If you already hold an authenticated O365Client (e.g., the O365 tools do), use adopt_client(client) to let the manager reuse it instead of creating a new one.
All paths are drive-relative (not site-relative). The prefix parameter works like S3: it's prepended to every key before sending to Graph.
-
siteis a sub-site path like"parent/sub". The manager resolves it to/sites/parent/sub. -
librarydefaults to"Documents". The manager resolves it to the drive for that library. -
"Shared Documents"is an alias for"Documents"on SharePoint. -
..segments are rejected; the manager validates paths before sending them to Graph.
Example:
sp = SharePointFileManager(
site="parent/sub",
library="Documents",
prefix="reports/2026/",
)
# Uploads to: /drives/{drive-id}/items/root:/reports/2026/q3.xlsx-
Threshold routing: files smaller than
small_file_threshold(default 4 MiB) are uploaded in a single request, but only whenconflict_behavior == "replace"— Graph's simple content-PUT endpoint has noconflictBehaviorparameter, so"fail"/"rename"always go through the resumable upload session regardless of size, even for a tiny file. -
Conflict behavior:
conflict_behaviordefaults to"replace". Set to"fail"to raise on collision, or"rename"to append a suffix. -
MIME type: derived from the file name (
content_typeis not sent to Graph). -
Bytes uploads:
upload_file_from_bytes(data, path, content_type)returns a sharing link (organization, view) for the uploaded item.
# File upload
await sp.upload_file(Path("q3.xlsx"), "2026/q3.xlsx")
# Bytes upload (returns sharing link)
url = await sp.upload_file_from_bytes(
data=b"content",
path="2026/q3.pdf",
content_type="application/pdf",
)
# Download
await sp.download_file("2026/q3.xlsx", Path("/tmp/q3.xlsx"))-
get_file_url(path, expiry=0)creates an organization/view sharing link. Ifexpiry > 0, the link expires atnow + expiryseconds. -
create_sharing_link(path, *, link_type="view", scope="organization", expiry=0)creates a sharing permission on the item with explicit options.
# Get a view link (no expiration)
url = await sp.get_file_url("2026/q3.xlsx")
# Create an edit link for users only, expiring in 1 hour
link = await sp.create_sharing_link(
"2026/q3.xlsx",
link_type="edit",
scope="users",
expiry=3600,
)upload_files and download_files process multiple items in parallel:
- Each item gets a
BatchItemResultwithstate(succeeded/failed/skipped). - No exception is raised for a single item; failures are reported in the results.
- If an auth failure occurs, the rest of the batch is skipped (
aborted=True). - A stream object may not appear twice in the same batch.
- Concurrency defaults to 5; retries default to 3. Retryable status codes: 429, 503, 504.
Retry-Afteris capped at 60 seconds.
# Upload multiple files
results = await sp.upload_files([
(Path("a.csv"), "in/a.csv"),
(Path("b.bin"), "in/b.bin"),
])
# Download multiple files
results = await sp.download_files([
("in/a.csv", Path("/tmp/a.csv")),
("in/b.bin", Path("/tmp/b.bin")),
])-
find_files(keywords, extension=None, prefix=None, max_results=None)performs server-side search on the drive. -
find_entries(path, max_results=None)returnsDriveEntryrows (including folders) for a directory. - Both methods follow
@odata.nextLinkto the end;max_resultsis applied after filtering all pages.
# Find files by keyword and extension
files = await sp.find_files(
keywords="q3",
extension=".xlsx",
prefix="2026/",
)
# List entries (including folders)
entries = await sp.find_entries("2026/")
for e in entries:
print(e.name, e.is_folder)setup(app, route) registers a GET handler that serves files through FileServingExtension. The extension buffers whole files in memory; files larger than serving_max_bytes (default 64 MiB) return HTTP 413.
from aiohttp import web
app = web.Application()
sp.setup(app, route="/sp")
web.run_app(app, port=8080)
# GET http://localhost:8080/sp/2026/q3.xlsx streams the fileFileManagerToolkit(manager_type="sharepoint" | "onedrive", ...) exposes the manager as a set of tools:
-
fs_list_files,fs_list_entries,fs_find_files,fs_exists,fs_get_file_metadata -
fs_upload_file,fs_create_file,fs_upload_file_from_bytes,fs_download_file,fs_copy_file,fs_delete_file -
fs_create_folder,fs_remove_folder,fs_rename_file,fs_rename_folder,fs_get_file_url,fs_create_sharing_link -
fs_batch_upload,fs_batch_download
The toolkit also provides the agent-facing operations from the base FileManagerTool:
-
find— server-side search (or in-memory fallback for backends without nativefind_files). -
batch_upload— parallel upload of multiple items. -
batch_download— parallel download of multiple items.
from parrot.tools.filemanager import FileManagerToolkit
toolkit = FileManagerToolkit(
manager_type="sharepoint",
site="troc",
library="Documents",
credentials={...},
auth_mode="direct",
)
# Tools are auto-exposed as fs_* methods
await toolkit.fs_find_files(keywords="q3", extension=".xlsx")
await toolkit.fs_batch_upload([(Path("a.csv"), "in/a.csv")])
await toolkit.fs_batch_download([("in/a.csv", Path("/tmp/a.csv"))])The managers require the following permissions, depending on the auth mode:
| Mode | Permission | Why |
|---|---|---|
| Application (app-only) | Sites.ReadWrite.All |
read/write SharePoint document libraries |
| Application (app-only) | Files.ReadWrite.All |
read/write any user's OneDrive (user="<upn>") |
| Delegated | Files.ReadWrite |
the signed-in user's OneDrive (user="me") |
| Delegated | Sites.ReadWrite.All |
SharePoint libraries the user can write to |
Application permissions require admin consent.
The feature includes an opt-in live test suite gated on environment variables:
-
PARROT_LIVE_SHAREPOINT_ENABLED— enable SharePoint live tests. -
PARROT_LIVE_ONEDRIVE_ENABLED— enable OneDrive live tests. -
PARROT_LIVE_SHAREPOINT_SITE— SharePoint site to test against. -
PARROT_LIVE_ONEDRIVE_USER— OneDrive user to test against.
Run the live suite manually before /sdd-done:
pytest packages/ai-parrot/tests/test_graph_filemanager_docs.py -m liveThe suite exercises the real Graph API with a small synthetic dataset and validates the manager's behavior against the documented contract.
- 1. MCP Server — exposing tools as a service
- 2. A2A — exposing agents and orchestrators as services
- 3. Toolkits for third party services and Cloud Security composition
- 4. Interaction surface — WebSockets, audio, integrations
- 5. Hardening — anti prompt injection, PBAC and tool gating
- 6. Cross cutting concerns and reference deployment
- 7. AgentCrew — Sequential, Parallel, Flow and Loop execution
- 8. AgentsFlow — DAG first orchestration with per node FSM
- 9. Ontologic RAG — graph first retrieval, intent routing & multi tenant knowledge
- 10. Observability — OpenLIT + OpenTelemetry
- Class Catalog by Module
- Module level Functions Catalog
- AI Parrot — Exposure, Interoperability & Hardening Architecture
- Agent Mesh
- AgentService — Standalone Runtime for Autonomous Agents
- AbstractClient: The Provider Client Family
- Anthropic client
- Bedrock Mantle Client
- TypeSafe System One Client (
JevClient) - Meta Model API Client (Muse Spark)
- OpenAI Compatible Client Base (
OpenAIBaseClient) - Per Loop LLM Client Cache
- Question Token Budgets (Bedrock Converse, Nova text, Bedrock Mantle)
- Agent Configure Lifecycle
- AgentTalk Integration Guide
- Agent Configuration via
agents.yaml - AgentFactory HTTP API
- Agent Studio — API Reference
- Agent CLI Daemon (agentd)
- FirefliesInsightsAgent
- Follow up Suggestion Chips (FEAT 752)
- Agents and Chatbots: The Bot Class Hierarchy
- Agent Studio — database storage (host guide)
- Ephemeral User Agents — Frontend Integration Handoff
parrot agent— Agent Terminal Workspace- Crew Handler
- Database Agent
- Running the CVE Experts
- Domain Experts (FEAT 778)
- FEAT 437
- Technical Voice Guide (AgentTalk Voice) for Frontend
- AgentDashboard — A2UI v1.0 Technical Reference for
navigator frontend next - Semantic UI Model → Adaptive Cards (FEAT 303)
- Exposing an AI Parrot Agent as an MCP Server
- AgentCrew User Guide
- AgentsFlow User Guide
- Crew Definition Storage
- A2UI Agent Functions Runtime — the v1.0 RPC leg (FEAT 469)
- Capabilities of an AI Parrot Analytical Agent (PandasAgent)
- Agent Security Guardrails (FEAT 761)
- SpawnSubAgentTool
- Testagent
- Agentic End to End Testing (FEAT 581)
- Uiagent
- WebAgent — Browser Interaction via Chrome DevTools
- WebNavigatorAgent — Catalogued Web Navigation on Your Chrome Profile
- ExecutionMemory Integration Guide
- Agent Brain
- Agent Memory
- Conversation History Ownership
- Conversation Memory Subsystem Overview
- Dream Cycle — episodic → wiki brain consolidation
- Durable Conversation Memory
- Memory Dynamics
- Per Turn Conversation Compaction
- Recoverable Task Memory (FEAT 538)
- Task Memory — Phase 0 Integration Map (FEAT 538 / TASK 2970)
- User Memory
- Bookstore Agentic Retrieval
- Bookstore in Codex
- Bookstore Conceptual Relations — the book graph (FEAT 533)
- Bookstore notebooks
- Contracts catalog performance (FEAT 539, AC14)
- Contracts pilot acceptance — Bob's twelve cases (FEAT 539, AC15)
- Contracts Card & Ontology (FEAT 539)
- Luau parser resource policy (FEAT 532 TASK 2896)
- Glossary of Terms (FEAT 917)
- GraphIndex core seams (FEAT 540)
- GraphIndex — Structured Knowledge Graph Indexing
- Local Knowledge Base
- Procedure Graph — Assembly Manuals (FEAT 601)
- Ontology backend programme
- Ontology vocabulary store
- PageIndex Agentic Retrieval and Citations
- PageIndex Generation Publication
- PageIndex Layout Structure Builder
- PageIndex Local MCP Toolkit
- PageIndex Segment Store
- PageIndex Tree Optimizer
- PageIndex — Tree Based RAG for Document Retrieval
- ArxivTool for AI Parrot
- Accounting metrics layer
- Tool Result Compression Pipeline (FEAT 380)
- DatasetManager Implementation Walkthrough
- FredAPITool Documentation
- EmployeesTool Employee Hierarchy Tool for AI Parrot
- HoobaToolkit
- Jira text templates (JiraToolkit)
- Expose Toolkits as Local MCP (
parrot mcp local) - MultiStoreSearch Toolkit — Multi Origin Retrieval for Agents
- Supervised Obscura Browser Integration
- OdooHelpdeskToolkit — Softhealer helpdesk on Odoo 19
- OdooToolkit Capabilities
- QuerysourceToolkit
- ReadOnlyRepoToolkit (FEAT 484)
- PythonREPLTool Sandbox: Worker Process Execution Model
- Research Tools for Agents
- gVisor Installation Guide for AI Parrot Secure Sandbox
- SDD Sandbox — OS Setup
- Governed semantic layer
- Tool optimizations for Claude Code and Codex (FEAT 543)
- AbstractTool Clone Method
- Toolbar API Documentation
- AudioNoteCaptureToolkit
- ExecutionPlanToolkit — Reference
- Host toolkits for Agent Studio
- Infographic Authoring for Data Agents (FEAT 326)
- InfographicToolkit — Reference
- Tool System Internals: Tools, Toolkits and ToolManager
- AI Parrot Tools Documentation
- What If Scenario Analysis
- Workday worker history
- DecisionFlowNode Usage Guide
- Multi Agent Orchestration: AgentCrew and AgentsFlow
- Docker Tool Executor & Execution Policy
- Generic Gate Host
- HeartbeatManager — Per Agent Autonomous Heartbeat Loop
- JobManager
- Node Types Reference
- OrchestratorAgent — Multi Party Conferencing (
confer) - Planogram compliance cycle (perceive → identify → compare)
- Planogram compliance — migrating configurations to the new cycle (FEAT 574, FEAT 612)
- Planogram perception spike — FEAT 574
- Scheduler backends in multi worker deployments
- Thales User Guide
- Per tenant skills (FEAT 707)
- Skill routing and trigger caching
- Skills system: discovery, toolkits and mixin
- Contextual Embedding Headers
- DocumentDB Usage Patterns
- DocumentDB Interface Guide
- DynamoDB Local (docker compose)
- Fully offline local agent with LanceDB (FEAT 542)
- LanceDB vector, full text and hybrid store (FEAT 542)
- Loader Metadata Standard
- Document Loaders for RAG
- Matryoshka Embedding Truncation
- Parent Child Retrieval (Small to Big)
- Storage Backends Guide
- User stores (Redis by default)
- Vector Stores and Embeddings Reference
- Vector Store Handler — API Reference
- A2A Secure Communication Demo
- Agent as a Local MCP Server (parrot toolkits install agent)
- add repository:
- GitHub MCP Installation and Usage
- MCP integration: client, server and agent tools
- Create and configure agent
- Roost — local inter agent sub protocol
- Roost carriers
- Roost performatives, protocols and obligations
- Simple Mcp Server
- SimpleMCPServer Configuration
- API Endpoints Reference
- Admin UI (FEAT 468)
- Infographic Render Endpoint — Reference
- EventBus v2 Configuration Reference (
[bus]/[bus.alerts]) - EventBus v2 Migration Notes (FEAT 310)
- EventBus v2 — Unified Event Fabric (FEAT 310)
- Session file store
- A2UI Dashboard + Widget Renderer — Frontend Build Guide
- Avatar Technical Guide (LiveAvatar Phase A) for Frontend
- Frontend Guide for SvelteKit: LiveAvatar FULL Mode and VoiceBot (FEAT 248)
- DEPRECATED: Native Voice Avatar (LiveAvatar Phase C) Technical Guide for Frontend
- Technical Guide to Structured Artifacts for Frontend
- VoiceBot · VoiceChatHandler · FEAT 245 — Frontend Guide for Realtime Conversation with Agents
- Server Layer: BotManager and HTTP Handlers
- Infographic Handler — Frontend API Contract
- Interactive Artifacts — Frontend API Contract
- Google Drive file manager
- SharePoint & OneDrive file managers
- WhatsApp Integration Implementation Summary
- WhatsApp Integration for AI Parrot
- P3 — parrot admin ui inventory (canvases / A2UI / infographic / builders)
- WhatsApp + AutonomousOrchestrator Integration
- Audio Form Voice Modes — Developer Guide
- Who owns an OAuth2 (3LO) credential
- CommCenter — Bulk Notification Sender (FEAT 417)
- FormDesigner → MS Teams: Adaptive Card renderer and bot submit path (FEAT 551)
- GitHub reviewer
- Google OAuth 2.0 — AI Parrot Integration
- Fireflies Agent Examples
- HITL Tool Call Confirmation (FEAT 235)
- Teams HITL Channel Setup Guide (FEAT 205)
- JiraSpecialist Prompt Layer Stack
- JiraSpecialist — Daily Standup Lanes
- Jira Transition Actions — Activating
TRIGGER_AGENTDispatch - Jupyter Output Mode Documentation
- Knowledge upload from chat (FEAT 647)
- LiveAvatar over your own LiveKit (Cloud or self hosted)
- Matrix Bridges for the AI Parrot Swarm (FEAT 463)
- Matrix Clients for the AI Parrot Swarm (FEAT 463)
- Migration Guide: FEAT 202 — ai parrot integrations
- Connections on Microsoft Teams
- MS Teams Toolkit for AI Parrot
- Nova Sonic Voice Protocol Reference
- Office 365 OAuth 2.0 (Delegated) — AI Parrot Integration
- PR Review Command — Setup Guide
- Queued chat commands
- Runbook — the
issuesnamespace (Jira ticket corpus) - Dev loop kick off from Slack (FEAT 555)
- Telegram Auth Open Mode (webview | browser)
- Telegram connections
- Telegram Bot Integration Guide
- FEAT 536 — VoiceBot Nova Dual Output + LiveAvatar: Real Live Operational Acceptance
- FEAT 537 — Nova VoiceBot avatar broadcast: operational acceptance
- FEAT 537 — Nova PCM → LiveAvatar LITE → LiveKit multi subscriber live gate
- speech_report TTS backends
- Nova VoiceBot avatar broadcast for multiple browsers (FEAT 537)
- 🦜 AI Parrot Voice Chat
- WhisperX Setup Guide for AI Parrot
- A2UI Linked Surfaces (FEAT 598)
- A2UI v1.0 Wire (FEAT 470)
- === D3.js ===
- Backend HTML Design System (FEAT 493)
- FEAT 488
- FormDesigner Audio Renderer
- Form Designer — Autonomous FormSchema Persistence (Standalone Forms)
- Form Designer — Conditional Sections: Pre/Post Dependencies
- FormBuilder — LLM answer plausibility enforcement
- FormDesigner — orphan upload cleanup (FEAT 731)
- FormDesigner — public response controls
- Form Designer — Relational Fields
- Serving FormDesigner forms from a Teams agent
- Form Designer — Unknown Field Capture Policy for Form Submissions
- FormDesigner — validation audit trail
- Infographic Recipes (FEAT 324)
- Inline A2UI Component Routing (FEAT 755)
- Metric Definition Registry (FEAT 756)
- Smart OutputFormatter Documentation
- N4 — navigator api backend inventory (dashboards / widgets / templates / modules / programs)
- P1 — ai parrot HTTP/WS endpoint inventory (report builder lens)
- P2 — ai parrot (Python) UI components, models, renderers, persistence — inventory for a REPORT BUILDER
- P4 — ai parrot prior art for a Report Builder (SDD inventory)
- ai parrot server — Admin / Bots / Studio / misc endpoint inventory
- P1 — ai parrot HTTP/WS endpoint inventory (report builder lens) ( core)
- parrot formdesigner — HTTP/WS endpoint inventory
- Report Builder — ai parrot inventory and analysis
- WeasyPrint 69.0 CSS Support — Empirical Findings
- Identity Capability User Guide
- Layers Reference
- Output Language (FEAT 638)
- PromptBuilder — User Modifiable Variables
- PromptBuilder User Guide
- Delegated OAuth2 connections
- Delegated OAuth2 connections on the web channel — deployment recipe and live harness
- Deterministic Groundedness Scoring
- ONNX Backend for the Prompt Injection Guardrail (FEAT 439)
- PBAC Guardrails — Policy Driven Tool Call Denial (FEAT 406)
- SecurityAdvisor — SOC2 Oriented Read Only Advisory Agent
- User Profile Management
- AI Parrot MCP Server AWS Deployment Guide
- Bot Cleanup Lifecycle
- Business Automation — Operator Runbook
parrot loginand connections- CompanyInfoToolkit
- Per component and per agent LLM defaults (FEAT 796, FEAT 882)
- Answer Accuracy Metrics for the Evaluation Harness (FEAT 652)
- Infographic CSP and Signed URLs — Operations Guide
- Global install: the parrot managed runtime (reference)
- Runbook — the Fireflies Meeting Registry
- Wiki standup briefs — runbook
parrot.finance— the finance satellite- Migration — FEAT 201: ai parrot embeddings
- Migration — FEAT 203: ai parrot server
- FEAT 223 — Structured Artifact Contract: Migration Guide
- FEAT 273 — Legacy output mode deprecations → A2UI
- Migration — FEAT 315: Unified NovaClient for all Amazon Nova models
- Migration — FEAT 421: Client declared tenant in the forms URL
- Migration — FEAT 446: SaaS Auth Hardening (S0 of Parrot Research Cloud)
- Migration — FEAT 473: A2UI v1.0 for STRUCTURED_CHART / STRUCTURED_TABLE / STRUCTURED_MAP
- Migration — FEAT 523: PEP 420 LLM Client Extraction
- Gemini 2.5 retirement (FEAT 798)
- Migration — FEAT 564: Reliable video reels with Gemini Omni and Veo 3.1
- Native Claude sandbox for SDD sessions (FEAT 768)
- Complementary (collaborative) research partner (FEAT 482)
- Dev flow per seat LLM configuration (
DevFlowModelPlan) - Dev loop
novabackend (AWS Bedrock) - sdd worker as orchestrator of parallel sdd coder seats (FEAT 549)
- SDD compaction capability record
- SDD execution optimization — operation and rollout
- Proposals to Reduce SDD Execution Time
- Dev flow / dev loop telemetry accounting
- Language Agnostic Validation Runners (FEAT 709)
- Spec Driven Development in Google Gemini / Antigravity CLI
- Guide to using the SDD slash commands
- AI Parrot Spec Driven Development (SDD) Platform
- SDD on Google Antigravity (agy)
/sdd donecloseout hooks- Decision Audit (FEAT 784)
- SDD experience memory
- SDD Expert Consult
- Ledger outbox (FEAT 758)
- FEAT 580 LSP Pilot — Live Evaluation Results
- SDD LSP research pilot (FEAT 580)
- Necessity Ladder (FEAT 908)
- Procedure Graph
- Test selection in the SDD flow — the Validation Contract (FEAT 699)
- wikitoolkit Cheatsheet
- wikitoolkit inbox
- wikitoolkit lint
- LLM Wiki — an agent maintained knowledge repository
- Schema Plane — Operator Guide (FEAT 600)
- SQLite concurrency for wiki and ledger
- wikitoolkit standup
- WikiToolkit as Claude Code infrastructure
- Authentication uses Navigator Auth
- AbstractClient base changes require a decision
- Clients are memory less
- Configuration uses NavConfig
- Graph backends — retire ArangoDB for PostgreSQL + SurrealDB
- Conversation history has one writer
- HTTP stack uses aiohttp
- LangChain is not part of the stack
- Async code remains non blocking
- Concrete tools live in ai parrot tools