A teenager accused of fatally stabbing a showgrounds worker had a fascination with knives and later wrote rap lyrics about the killing, a judge has heard.

Uati 'Pele' Faletolu, 17, was working Sydney's Royal Easter Show when a 14-year-old boy stabbed him in the heart about 8pm on April 11, 2022.

The teen defendant, who cannot be named due to his age at the time, pleaded guilty to manslaughter in the NSW Supreme Court at Parramatta on Monday.

But he pleaded not guilty to the murder of Mr Faletolu.

The prosecution did not accept this plea and the matter proceeded to trial.

Police found a series of entries in the notes app on the teen's phone with poems and raps describing how he killed Mr Faletolu, prosecutor Michelle England SC told the judge-alone trial.

A note created on July 6 - ti

See Full Page