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
3 changes: 3 additions & 0 deletions agent-think/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ npm run seed:r2 # push skills/** to the R2 bucket (add -- --local for dev)
and team AI Gateway token, with a client-side fallback to
`claude-opus-4-8` when the primary dispatch fails. Responses use
`store: false`, so agent-think does not persist provider reasoning state.
- The observability-preview packages are pinned to PR #1860 commit
`be4f7abc`. Agent-think opts into full message/tool payload spans while this
preview is validated in production. The turn safety cap is 250 steps.
Production reads `CLOUDFLARE_AIG_TOKEN` from a Worker secret and
attributes every request to the `agents-team-agent-think` project. Local
agent turns read the same variable from `.env`.
Expand Down
6 changes: 3 additions & 3 deletions agent-think/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
"dependencies": {
"@ai-sdk/anthropic": "^3.0.83",
"@ai-sdk/openai": "^3.0.70",
"@cloudflare/ai-chat": "workspace:*",
"@cloudflare/think": "workspace:*",
"@cloudflare/ai-chat": "https://pkg.pr.new/cloudflare/agents/@cloudflare/ai-chat@be4f7abcf892a39449ec630b24e7f19e61309e92",
"@cloudflare/think": "https://pkg.pr.new/cloudflare/agents/@cloudflare/think@be4f7abcf892a39449ec630b24e7f19e61309e92",
"@cloudflare/workspace": "https://pkg.pr.new/cloudflare/workspace/@cloudflare/workspace@18",
"@platformatic/vfs": "^0.4.0",
"agents": "workspace:*",
"agents": "https://pkg.pr.new/cloudflare/agents/agents@be4f7abcf892a39449ec630b24e7f19e61309e92",
"ai": "^6.0.202",
"diff": "^9.0.0",
"isomorphic-git": "^1.38.5",
Expand Down
4 changes: 4 additions & 0 deletions agent-think/src/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ export class ThinkAgent extends ThinkBase {
/** repro/pr can be long: clone, install, deploy or fix, verify. */
override maxSteps = AGENT_THINK_MAX_STEPS;

/** Capture full model/tool payloads while validating the tracing preview. */
override storeMessages = true;
override storeTools = true;

/**
* We expose our own container-backed `bash` tool; skip Think's built-in
* just-bash. Note: even if this flag is ever flipped back,
Expand Down
2 changes: 1 addition & 1 deletion agent-think/src/turn-outcome.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const AGENT_THINK_MAX_STEPS = 100;
export const AGENT_THINK_MAX_STEPS = 250;

export type TurnOutcomeReason =
| "completed"
Expand Down
4 changes: 4 additions & 0 deletions agent-think/test/turn-outcome.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ function result(
}

describe("classifyTurnOutcome", () => {
it("allows 250 steps for long review and demo runs", () => {
expect(AGENT_THINK_MAX_STEPS).toBe(250);
});

it("reports max-step exhaustion when the final step ends with a tool call", () => {
const outcome = classifyTurnOutcome(
result(toolSteps(AGENT_THINK_MAX_STEPS)),
Expand Down
197 changes: 191 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading