docs

Microsoft Agent Framework

Give a Microsoft Agent Framework agent Bowmark's typed functions for live websites with agent-framework-bowmark: two function tools, their instructions, one API key.

Reading this with an agent?

This page as plain text: /docs/agent-framework.md. A summarising fetch tool paraphrases long pages, so for code to copy exactly, fetch it raw: curl -s https://bowmark.ai/docs/agent-framework.md. The whole site as one file: https://bowmark.ai/llms-full.txt. Index of every page: https://bowmark.ai/llms.txt.

agent-framework-bowmark gives a Microsoft Agent Framework agent the same two calls every Bowmark caller makes: read the function library for a task, then run a short script against it on the live sites. It also ships the instructions that tell the model how to use them. Source: bowmark-ai/agent-framework-bowmark.

Install

pip install agent-framework-bowmark
export BOWMARK_API_KEY="bmk_..."

Make the key at dashboard/keys. New accounts get $10 of free usage with no card (Pricing).

Use it

import asyncio
from agent_framework import Agent
from agent_framework.openai import OpenAIChatClient
from agent_framework_bowmark import BowmarkTools

bowmark = BowmarkTools()
agent = Agent(OpenAIChatClient(), instructions=bowmark.instructions, tools=bowmark.tools)

result = asyncio.run(agent.run("What are the top 3 stories on Hacker News right now?"))
print(result.text)

The tools

ToolWhat it does
bowmark_get_libraryReturns the typed functions for a task or a site, with their types and examples. Read-only, free, touches no site. Same as GET /v1/library.
bowmark_runRuns an async JavaScript script against those functions on the live sites and returns { ok, status, result, logs, error, runId }. Same as POST /v1/run.

Options

OptionDefaultWhat it does
api_keyBOWMARK_API_KEYYour Bowmark key.
base_urlhttps://api.bowmark.aiThe API to call.

bowmark.instructions is plain text: add it to your agent's instructions, or write your own.

A run that fails comes back as an envelope with error set, so the model can read it, fix its script and try again. See Scripting for what a script can call.