Skip to content

feat: add Lightcone integration with a Wikipedia search example and docs#270

Open
eddieogola wants to merge 6 commits into
inngest:mainfrom
eddieogola:tzafon-integration
Open

feat: add Lightcone integration with a Wikipedia search example and docs#270
eddieogola wants to merge 6 commits into
inngest:mainfrom
eddieogola:tzafon-integration

Conversation

@eddieogola

@eddieogola eddieogola commented Dec 30, 2025

Copy link
Copy Markdown

This PR adds an integration for Lightcone (by Tzafon), enabling AgentKit agents to autonomously browse the web using managed cloud browsers. It adds an integration guide plus a runnable Wikipedia search example.

What's included

Integration guidedocs/src/content/docs/integrations/tzafon.mdx

  • Written for the current Astro Starlight docs system (Steps / Tabs / TabItem / LinkCard and :::note / :::tip asides), matching the other integration pages.
  • Walks through installing AgentKit + @tzafon/lightcone + playwright-core, wiring up an Agent/Network, and building a browser tool.
  • Added Lightcone to the integrations list on the overview page (index.mdx).

Example projectexamples/wikipedia-search-tzafon/

  • A Wikipedia search agent powered by AgentKit + Lightcone (src/main.ts), with .env.example, package.json, lockfile, and README.
  • Uses the current Lightcone SDK: client.computers.create({ kind: "browser" }), CDP URL from session.endpoints.cdp, Bearer-token auth, and session cleanup.

Notes

  • Refreshed from the original draft, which used the legacy tzafon SDK and Mintlify-era doc components — both since superseded by @tzafon/lightcone and the Astro Starlight docs.
  • Verified end-to-end against the live Lightcone API (browser session create → CDP connect → Wikipedia lookup → extract → session delete).

@changeset-bot

changeset-bot Bot commented Dec 30, 2025

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 0128f8e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@eddieogola eddieogola marked this pull request as draft February 28, 2026 09:44
@eddieogola eddieogola marked this pull request as ready for review February 28, 2026 09:44
@eddieogola eddieogola marked this pull request as draft March 11, 2026 13:13
@eddieogola eddieogola marked this pull request as ready for review March 11, 2026 13:13
@eddieogola eddieogola marked this pull request as draft March 31, 2026 19:40
@eddieogola eddieogola marked this pull request as ready for review March 31, 2026 19:41
@eddieogola eddieogola marked this pull request as draft April 5, 2026 12:58
@eddieogola eddieogola marked this pull request as ready for review April 5, 2026 12:58
# Conflicts:
#	docs/docs.json
#	docs/src/content/docs/integrations/tzafon.mdx
@vercel

vercel Bot commented Apr 10, 2026

Copy link
Copy Markdown

@eddieogola is attempting to deploy a commit to the Inngest Team on Vercel.

A member of the Team first needs to authorize it.

@eddieogola eddieogola marked this pull request as draft April 15, 2026 19:26
@eddieogola eddieogola marked this pull request as ready for review April 15, 2026 19:26
eddieogola and others added 2 commits May 3, 2026 21:28
Refresh the integration to the current Lightcone product surface:

- Example: switch from the legacy `tzafon` SDK to `@tzafon/lightcone`
  (`client.computers.create`, CDP endpoint from `session.endpoints.cdp`,
  Bearer-token auth, session cleanup), use `LIGHTCONE_API_KEY`, and make the
  Wikipedia lookup robust by navigating the search endpoint directly.
- Docs: rewrite `tzafon.mdx` using Astro Starlight components (Steps/Tabs/
  TabItem/LinkCard, ::: asides) to match the migrated docs system, and rebrand
  to Lightcone (docs.lightcone.ai).

Verified end-to-end against the live Lightcone API.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@eddieogola eddieogola changed the title feat: add Tzafon integration with a Wikipedia search example and corresponding documentation feat: add Lightcone integration with a Wikipedia search example and docs Jul 10, 2026
Register the integrations/tzafon page in the manual Astro Starlight sidebar
so it appears in the Integrations nav section.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@eddieogola eddieogola marked this pull request as draft July 10, 2026 19:13
@eddieogola eddieogola marked this pull request as ready for review July 10, 2026 19:13

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0128f8e136

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

// Build the CDP URL from the session's endpoint path and connect,
// authenticating with a Bearer token.
const cdpUrl = `${BASE_URL}${session.endpoints?.cdp}`;
const browser = await chromium.connectOverCDP(cdpUrl, {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Delete the session if CDP connection fails

If client.computers.create() succeeds but chromium.connectOverCDP() rejects (for example because the endpoint is missing/invalid, the token is wrong, or the network flakes), execution never enters the try/finally, so client.computers.delete(session.id!) is skipped and the managed Lightcone browser is left running. Wrap the connect and browser use in a try/finally or delete the session from a catch so failed connections do not leak sessions.

Useful? React with 👍 / 👎.


async function main() {
const server = createServer({
agents: [searchAgent],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Do not register a standalone agent without a model

Registering searchAgent here creates an extra agent-wikipedia_searcher Inngest function, but the agent has no model of its own and only works through wikipediaSearchNetwork.defaultModel; triggering that standalone function from the Dev Server will call agent.run() without a network and throw No model provided to agent. Either remove the agents entry or give the agent its own model so every exposed function is runnable.

Useful? React with 👍 / 👎.

description: "An agent that searches Wikipedia for relevant information",
system:
"You are a helpful assistant that searches Wikipedia for relevant information.",
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Attach the Lightcone tool in the guide snippet

Following the guide as written creates searchWikipedia in the next step but never adds it to searchAgent, so the documented network has an agent with no tools and cannot actually browse Wikipedia via Lightcone. The complete example includes tools: [searchWikipedia]; the integration guide should also instruct readers to add that property when defining or updating the agent.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant