examples

package module
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

README

examples

examples holds runnable programs that demonstrate Scope end to end. It is not a library: nothing in the repository depends on it, and it is not published for consumption.

Running an example

Each subdirectory is a main package:

go run ./mcp/mcpagent

Examples that need a provider key read it from the environment and say so when it is missing, rather than failing with a transport error.

What belongs here

A program that shows how the pieces compose — an agent driving MCP tools, a bridge between two protocols, a fake provider that makes a flow runnable offline. A demonstration tool that a real caller might want belongs in tools instead, as an assemblable capability.

Boundaries

Example code may import any Scope module. No Scope module may import an example. That direction is what keeps a demonstration from quietly becoming an API.

See ARCHITECTURE.md for the rules this rests on.

Documentation

Overview

Package examples is the overview for Scope's runnable demonstrations. It declares no API; each subdirectory is a main package showing how several modules compose.

Nothing in the repository depends on this module, and it is not published for consumption. Example code may import any Scope module; no Scope module may import an example. That one-way direction is what keeps a demonstration from quietly becoming an API nobody agreed to support.

A capability a real caller would want does not belong here — it belongs in tools or its owning domain module, where it gets a contract and tests. An example that needs a provider key reads it from the environment and says so when it is missing, rather than failing with a transport error.

See README.md for how to run one and ARCHITECTURE.md for the rules this rests on.

Directories

Path Synopsis
Package fakeweather is a chat.Tool that returns synthesized weather data for a given (location, date).
Package fakeweather is a chat.Tool that returns synthesized weather data for a given (location, date).
mcp
mcpagent command
Command mcpagent shows the complete client-side MCP integration in one file:
Command mcpagent shows the complete client-side MCP integration in one file:
mcpbridge command
Command mcpbridge shows the reverse direction: scope exposes a chat.Tool as an MCP server so external hosts (Claude Desktop, Cursor, ...) can drive a scope agent's tools.
Command mcpbridge shows the reverse direction: scope exposes a chat.Tool as an MCP server so external hosts (Claude Desktop, Cursor, ...) can drive a scope agent's tools.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL