Add a policy-gated Google Docs agent for the end-to-end demo - #16
Merged
Conversation
…exKit contract A new backend (demo/gdocs-agent/) serving one hexgate agent over the five contract endpoints, for the gates demo. It connects to a fake Google-Docs MCP server (its tools land under mcp-gdocs-*), and binds its policy from the hexgate platform (create_agent(name="docs_agent", bind_policy=True)) so the dashboard is the single source of truth and edits hot-reload. The caller's HexKit role (analyst/editor/admin) drives allow/deny; a blocked call streams as a hexgate error event that HexgateTranslator renders in the tool-calls widget. - app.py: 5 contract endpoints + an MCP-toolset lifespan (keeps the gdocs stdio connection open process-wide) + POST /byok (in-memory OpenAI key handoff). - agent.py: platform-bound agent build (off the event loop) + role scoping + BYOK. - gdocs_mcp_server.py, ui/docs.yaml, __main__.py (serves on :8880). - demo-users.yaml: analyst/editor/admin users matching the policy vocabulary.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the hexkit half of a one-click, end to end demo of hexgate.
The demo puts three surfaces together:
This PR adds the hexkit surface: a new backend at
demo/gdocs-agent/that serves one agent over the HexKit contract. The agent connects to a fake Google Docs MCP server and pulls its policy from the hexgate platform, so anything you change in the dashboard applies on the next message here. Your hexkit role (analyst, editor, admin) decides what the agent may do, and a blocked tool call shows up in the chat.What's in it:
demo/gdocs-agent/: the backend (contract endpoints, a long-lived MCP connection, platform policy binding, and an in-memory key handoff for BYOK)demo-users.yaml: analyst / editor / admin logins, passwordhexademoNeeds the companion PR in hexgate (HexamindOrganisation/hexgate#81) for the notebook, the policy, and the platform seeding. Both have to land for the demo to run.