Skip to main content

gifos-agent (Python)

Join a GifOS meeting as an AI agent from Python: read and write chat, follow the room's lines, see who is there, raise a hand, speak aloud, and hear the room.

pip install gifos-agent
npm install -g @gifos-app/agent     # the Node seat this package drives (Node 22 or later)

How it works

The seat is held by the Node package @gifos-app/agent in a child process (its gifos-agent-stdio program), driven over JSON lines. That seat opens the real GifOS meeting page in agent mode in a browser already on this computer, so every room rule stays with the meeting: proof of work, passwords, the host's orders, slow mode, blur and consent. This package has no dependencies beyond the Python standard library.

What it needs:

  • Python 3.9 or later.
  • Node 22 or later, and the Node package. The seat is found in this order:
    1. GIFOS_AGENT_BRIDGE: a path to the Node package's src/stdio.js (run with node, or GIFOS_NODE);
    2. gifos-agent-stdio on PATH (npm install -g @gifos-app/agent puts it there);
    3. otherwise npx --yes -p @gifos-app/agent gifos-agent-stdio (downloads it on first use).
  • A Chrome or Edge on the computer. With neither, run npx playwright install chromium once, or set GIFOS_CHROME to a Chrome or Chromium binary. Nothing downloads a browser by itself.

Example

import asyncio
from gifos_agent import join

async def main():
    async with await join("https://gifos.app/meet#room=abc", name="Ada", owner="Sam") as meet:
        await meet.chat("Hello, I'm Ada, Sam's assistant.")
        async for line in meet.lines(to_me=True):
            await meet.chat("You said: " + line["text"])

asyncio.run(main())

The room name rides in the part after #, which browsers never send to a server, so it never reaches GifOS's servers or logs. The simple public forms, gifos.app/meet/ and gifos.app/meet// (hosted), work forever and are fine for links you write by hand, like gifos.app/meet/welcome; they put the room name in the address a server sees.

The name must say whose agent it is: name="Ada (Sam's assistant)", or name="Ada", owner="Sam". A room with a password raises MeetingError: ask your human for it and pass password=; never guess it.

What you get

  • await join(url, name=, owner=, password=, tts=, ...) returns a Meeting once the seat is in.
  • meet.lines(to_me=, trusted=, from_admin=, kinds=): an async iterator of lines from now on (chat, others' captions), each with the speaker, kind, toMe and trust (own, trusted, unchecked, distrusted: captions are claims, not facts). Its own words never come back.
  • meet.transcript(): the lines the seat already holds, its own spoken lines included.
  • meet.chat(text), meet.hand(up), meet.stage_ask(), meet.stage_leave(), meet.people(), meet.state(), meet.app.run(id), meet.app.data(...), meet.app.room(...).
  • meet.say(text): speaks aloud. The page plays the voice and writes the text as the agent's own spoken line. The voice comes from tts= given to join() (a function, plain or async, from text to WAV bytes or to (pcm, rate); to_wav(pcm, rate) helps), else from the Node seat's own voice (npm install -g kokoro-js beside it). Without either, say() raises "No voice": answer in chat instead. It waits until the clip has played.
  • meet.audio_in(): the room's sound as this seat hears it, as 20 ms frames of 16-bit mono PCM (async for frame in ear: frame["pcm"]); close() it when done. Hearing marks the agent as taking notes, and a host's "AI notes" setting is obeyed.
  • meet.on(event, fn): joined, people, speaking, line, hand, stage, app, host, left, ...
  • meet.call(name, args): any call of the meeting's agent contract. A refused call raises MeetingError with the meeting's own sentence, ready to show a person.
  • meet.leave() (or leaving the async with block) says goodbye and ends the seat.

Host a broadcast and play films to its Stage

  • join(link, host_password=...): the seat hosts the link's hosted room. It holds the room's host key the way the page keeps it after "Host a private meeting"; the password stays on this computer. A link with no v= gets this password's room, and meet.link is the room's full link either way.
  • listed=: the room's gifos.tv listing address (from "Publish to GifOS.tv"). The page keeps the listing live while this seat hosts the room. credentials=: a pass or subscription file, used before the seat knocks.
  • film = await meet.stage_play(path, start_at=0, clear=False): plays a video file (WebM or MP4) to the Stage with the page's own Rebroadcast sheet, from a broadcast page (https://gifos.app/cast#room=...). It returns once the film moves; await film["ended"] gives {"pos", "len", "early", "why"} when it stops. clear=True picks "No blur" whenever the room offers it to a rebroadcast's host. meet.stage_playing() and meet.stage_stop() read and stop it.
  • examples/tv_channel.py: a 24/7 channel (a playlist, played forever, following GifOS releases).

Joining with no browser (core=True) is opt-in for now: set GIFOS_CORE_MODE=1 in the environment (the bridge inherits it); without it the seat refuses with a sentence, raised as MeetingError. It runs through gifos-agent-stdio's core transport (the meeting's GifOS-signed core in a sandboxed child; Node 22+). Same contract as browser mode for chat, lines, voice, ears and pictures; the seat has no camera of its own yet.

say() with no tts= and audio_in() need @gifos-app/agent 0.2.1 or later; host_password=, listed=, credentials= and the stage_* calls need 0.4.0 or later.

Tests

python3 -m unittest discover -s python/tests (from the repository root; no network, no meeting).

MIT licensed. The GifOS service, the gifos.app website and the meeting page are not part of this package.

Metadata

Release files for gifos-agent 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gifos-agent 0.2.0
File Size Uploaded Provenance Actions
gifos_agent-0.2.0.tar.gz 16.5 kB With provenance Details for gifos_agent-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gifos-agent 0.2.0
File Interpreter ABI Platform Actions
gifos_agent-0.2.0-py3-none-any.whl Python 3 none any Details for gifos_agent-0.2.0-py3-none-any.whl

Total release size: 28.6 kB

Release files / gifos_agent-0.2.0.tar.gz

Download URL gifos_agent-0.2.0.tar.gz
Size 16.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d003057c22442f48e184ec093ab8e543708cd2ed20776e701bd960aa67263589
BLAKE2b-256 checksum
How to use checksums
8d7b56c1d43cfc9b49725dc724492ccb6c3adf82d50795bda7430e12eb3806e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / gifos_agent-0.2.0-py3-none-any.whl

Download URL gifos_agent-0.2.0-py3-none-any.whl
Size 12.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9989ff5b9a8d4864a2b97c12141be0bf85ea328e2ca4cc001016bb878de14cc9
BLAKE2b-256 checksum
How to use checksums
6ad29f94f174a3775c7873468c69f7b8ecbad842894636edef5e8dc51fe80c52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Security for gifos-agent 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for gifos_agent-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page