vinc-agent-framework
Vinc for Microsoft Agent Framework. Vinc is a knowledge graph you share with AI: the decisions, records and documents your team wrote, with the reasons attached. This package brings the relevant part of it into each agent run.
Install
pip install vinc-agent-framework
Add context to every run
from agent_framework import Agent
from agent_framework.openai import OpenAIChatClient
from vinc_agent_framework import VincContextProvider
vinc = VincContextProvider() # reads VINC_API_KEY; use a vinc_ro_ key
agent = Agent(
client=OpenAIChatClient(),
instructions="You review design changes.",
context_providers=[vinc],
)
await agent.run("Why are our colour tokens stored as OKLCH?")
Before each run the provider looks up the newest user message in Vinc and, when something matches, adds a block to the instructions. The block is marked as data, not instructions, and it cites node ids the model can quote back.
- One call per run; two when the lookup found nothing or several nodes tied, because it then widens with a search (
search_fallback=Falseturns that off). - If Vinc is unreachable or the daily limit is spent, the run goes on without the block. A wrong key or space raises.
- For a team's graph pass
space="<team id>".
Let the model look things up
vinc = VincContextProvider(expose_tools=True)
adds two read-only tools, vinc_brief and vinc_search. You can also build them yourself with create_vinc_tools(client).
Writing, on purpose
The provider never stores the conversation: after_run does nothing. Record what happened when a person approved it, with a vinc_sk_ key:
from vinc_client import AsyncVincClient
from vinc_agent_framework import record_episode
writer = AsyncVincClient(api_key=WRITE_KEY)
await record_episode(
writer,
"Fixed contrast on the dark secondary button",
summary="text-secondary now passes 4.5:1 on the dark surface.",
about=["decision:tokens-are-oklch"],
)
Structured review with one parse retry
from vinc_agent_framework import run_review, UnparsedReview
try:
review = await run_review(reviewer_agent, "Review this draft against its cited rules")
except UnparsedReview:
# Stop the revision path and escalate to a person.
raise
The helper uses the framework's Pydantic response_format. A client without
structured output support must use native_structured=False explicitly.
It retains findings and citation IDs, rejects contradictory verdicts, retries
once on a parse failure, and then raises UNPARSED. Network, credential and
unsupported-provider errors propagate without parse retries. Each attempt is
stateless and disables executable tools. Use a reviewer agent with read-only
middleware and context providers. No graph write or approval happens here.
Caller options such as reasoning settings are retained; the helper owns the
review format and tool_choice="none".
Receive a handoff package
from vinc_client import AsyncVincClient
from vinc_agent_framework import PackageProvider
reader = AsyncVincClient(api_key=READ_KEY)
receiver = Agent(
chat_client,
instructions="Review the prior conclusion and cite available evidence.",
context_providers=[PackageProvider(reader, "record:dashboard-handoff", space="personal")],
)
PackageProvider reads that same-space Record before every run, using the
recipient's current key to recheck evidence. Bind a different provider for a
different handoff; shared provider objects do not hold per-session package ids.
Missing packages fail explicitly. after_run writes nothing. The producer uses
AsyncVincClient.write_package explicitly; the recipient calls record_episode
explicitly after review to write back what happened. Neither the provider nor
the helpers delegate to another agent or grant it permission.
Prefetch the selected role's evidence
provider = VincContextProvider(
reader, prefetch_role="concept:agent-reviewer", expose_tools=True,
)
Before every run this reads the chosen role's complete contract, its required spec briefs, and the task's brief/search evidence, with returned citation ids. The optional read tools remain available for further questions; the model does not have to decide to call them to receive the initial evidence. Required spec misses, unavailable roles and authentication/service errors stop this prefetch mode explicitly. Ordinary question-only lookup keeps its existing behavior.
For a manual pipeline, await prefetch(reader, role_id, task) returns the same
block. Both paths are read only and use no permission cache. prefetch_max_chars
sets the combined provider budget (default 24,000 characters). A new role must be
chosen by the application/operator, never by text found in the graph.
License
MIT
Final output gate
from vinc_client import OutputGate
from vinc_agent_framework import VincOutputGateMiddleware
gate = OutputGate(fresh_role["props"])
middleware = VincOutputGateMiddleware(gate, evidence=host_evidence_for_this_run)
# Pass middleware=[middleware] to Agent and use non-streaming run().
The middleware checks the final response outside the model and raises
OutputGateStopped on block or pending person approval. Configure it outermost
if other middleware changes responses. Streaming is rejected before the agent
runs, so unchecked tokens cannot leave through this middleware. A host callback
supplies actual execution evidence; structured response person-only requests are
model data and match adopted action IDs. This is an output barrier, not tool
authorization. It neither calls another model nor writes a graph record.
Approval after the model
Have your model executor emit a vinc_client.RoleOutput, using
agent.run(..., tools=[], options={"response_format": RoleOutput, "tool_choice": "none"}). Connect a separate approval executor downstream:
from agent_framework import WorkflowBuilder
from vinc_agent_framework import VincPersonOnlyExecutor
approval = VincPersonOnlyExecutor(gate, role_id=fresh_role["id"], run_id=run_id)
workflow = WorkflowBuilder(start_executor=model_executor).add_edge(model_executor, approval).build()
Structured person-only requests and gate-detected actions emit the native
request_info event. The authenticated host constructs
ApprovalDecision(request_id=event.data.request_id, approved=True) from the human
response, then calls workflow.run(responses={event.request_id: decision}).
The response handler uses the saved draft and does not call the model again.
Rejection yields no deliverable; blocking checks never become approvable. Approval
releases this output only and does not execute or authorize a side-effect tool.
Never expose unchecked model stream events. Configure workflow checkpoints when pending approval must survive a process restart. This uses the framework's native request and response mechanism.
Metadata
Release files for vinc-agent-framework 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vinc_agent_framework-0.1.1.tar.gz | 15.8 kB | With provenance | Details for vinc_agent_framework-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vinc_agent_framework-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for vinc_agent_framework-0.1.1-py3-none-any.whl |
Total release size: 27.0 kB
Release files / vinc_agent_framework-0.1.1.tar.gz
| Download URL | vinc_agent_framework-0.1.1.tar.gz |
|---|---|
| Size | 15.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
428610ee717438166d2ddf43b1f964b3a49d020c14bf81d21557e7ea56f16ade
|
|
BLAKE2b-256 checksum How to use checksums |
904af6dd75a0f349aa32b171572922922d00dc738e980128578e71f21cec49e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.
Transparency logRelease files / vinc_agent_framework-0.1.1-py3-none-any.whl
| Download URL | vinc_agent_framework-0.1.1-py3-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9bd7b217ac88e885ec8267b34751498a1cdd1b8a899e08d32433484f3fe065a9
|
|
BLAKE2b-256 checksum How to use checksums |
0c795915b49e927374fb578fb1688ddaa2d9cf7e256db5a60b5f3357c8ea66f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.
Transparency logSecurity for vinc-agent-framework 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for vinc_agent_framework-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.