Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/scout-agent/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
.blink
**/.claude
dist
node_modules
*.tgz
33 changes: 25 additions & 8 deletions packages/scout-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ All integrations are optional - include only what you need.

### ScoutOptions

| Option | Type | Required | Description |
| ----------- | ---------------------- | -------- | --------------------------------------- |
| `agent` | `blink.Agent<Message>` | Yes | Blink agent instance |
| `github` | `GitHubConfig` | No | GitHub App configuration |
| `slack` | `SlackConfig` | No | Slack App configuration |
| `webSearch` | `WebSearchConfig` | No | Exa web search configuration |
| `compute` | `ComputeConfig` | No | Docker or Daytona compute configuration |
| `logger` | `Logger` | No | Custom logger instance |
| Option | Type | Required | Description |
| ----------- | ---------------------- | -------- | ----------------------------------------------- |
| `agent` | `blink.Agent<Message>` | Yes | Blink agent instance |
| `github` | `GitHubConfig` | No | GitHub App configuration |
| `slack` | `SlackConfig` | No | Slack App configuration |
| `webSearch` | `WebSearchConfig` | No | Exa web search configuration |
| `compute` | `ComputeConfig` | No | Docker, Daytona, or Coder compute configuration |
| `logger` | `Logger` | No | Custom logger instance |

### GitHub

Expand Down Expand Up @@ -151,6 +151,23 @@ Execute code in isolated environments:
}
```

**Coder (self-hosted workspaces):**

```typescript
{
type: "coder",
options: {
coderUrl: string // Coder deployment URL (e.g., https://coder.example.com)
sessionToken: string // Coder session token for authentication
template: string // Template name to create workspaces from
computeServerPort?: number // Port for compute server (default: 22137)
presetName?: string // Optional preset name for workspace creation
richParameters?: Array<{ name: string; value: string }> // Optional template parameters
startTimeoutSeconds?: number // Workspace start timeout (default: 300)
}
}
```

## API Reference

### Scout Class
Expand Down
17 changes: 15 additions & 2 deletions packages/scout-agent/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ import { type Message, Scout } from "./lib";

export const agent = new blink.Agent<Message>();

const ensure = (value: string | undefined): string => {
if (value === undefined) {
throw new Error("value is undefined");
}
return value;
};

const scout = new Scout({
agent,
github: {
Expand All @@ -20,7 +27,13 @@ const scout = new Scout({
exaApiKey: process.env.EXA_API_KEY,
},
compute: {
type: "docker",
type: "coder",
options: {
url: ensure(process.env.CODER_URL),
sessionToken: ensure(process.env.CODER_SESSION_TOKEN),
template: ensure(process.env.CODER_TEMPLATE),
presetName: ensure(process.env.CODER_PRESET_NAME),
},
},
});

Expand All @@ -39,7 +52,7 @@ agent.on("chat", async ({ id, messages }) => {
const params = await scout.buildStreamTextParams({
messages,
chatID: id,
model: "anthropic/claude-sonnet-4.5",
model: "anthropic/claude-opus-4.5",
providerOptions: { anthropic: { cacheControl: { type: "ephemeral" } } },
tools: {
get_favorite_color: tool({
Expand Down
Loading